/* ============================================
   STUDY AURA — MAIN STYLES v3
   Premium Gen-Z dark SaaS aesthetic
   Glassmorphism · Gradients · Micro-interactions
   ============================================ */

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Instant theme apply — no flash */
body {
  transition:
    background 0.25s,
    color 0.25s;
}

/* =============================================
   SCREENS
   ============================================= */
.screen {
  display: none;
}
.screen.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#app-screen.active {
  flex-direction: row;
}

/* =============================================
   AUTH SCREEN
   ============================================= */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.15;
  animation: orbFloat 10s infinite ease-in-out;
}
.orb1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}
.orb2 {
  width: 350px;
  height: 350px;
  background: var(--purple);
  bottom: -100px;
  right: -100px;
  animation-delay: 3.5s;
}
.orb3 {
  width: 250px;
  height: 250px;
  background: var(--teal);
  top: 45%;
  left: 55%;
  animation-delay: 7s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-40px) scale(1.06);
  }
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.auth-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}
.auth-brand h1 {
  font-family: "Syne", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand p {
  color: var(--text2);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--accent-grad);
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 24px var(--accent-glow);
  animation: logoPulse 3s ease-in-out infinite;
}
.brand-logo svg {
  color: #fff;
}
@keyframes logoPulse {
  0%,
  100% {
    box-shadow: 0 8px 24px var(--accent-glow);
  }
  50% {
    box-shadow: 0 12px 36px var(--accent-glow);
    transform: translateY(-2px);
  }
}

/* Auth card — glassmorphism */
.auth-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1;
  padding: 0.65rem;
  border: none;
  background: none;
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
  animation: fadeSlide 0.25s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 0.45rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  resize: vertical;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--border-hover);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg3);
}
.form-group select option {
  background: var(--bg2);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-error {
  color: var(--red);
  font-size: 0.82rem;
  margin-top: 0.5rem;
  min-height: 1.1rem;
}
.form-success {
  color: var(--green);
  font-size: 0.82rem;
  margin-top: 0.5rem;
  min-height: 1.1rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: none;
  background: var(--accent-grad);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: "Syne", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
  margin-top: 0.5rem;
  box-shadow: 0 4px 16px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  filter: brightness(1.08);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* =============================================
   AVATAR UPLOAD
   ============================================= */
.avatar-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.avatar-preview:hover {
  border-color: var(--accent);
}
.avatar-preview.large {
  width: 108px;
  height: 108px;
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-upload-btn {
  font-size: 0.82rem;
  color: var(--accent);
  cursor: pointer;
  border: 1px solid var(--accent);
  padding: 0.35rem 1.1rem;
  border-radius: 50px;
  transition: all 0.2s;
  font-weight: 600;
}
.avatar-upload-btn:hover {
  background: var(--accent-glow);
}
.onboarding-card {
  max-height: 90vh;
  overflow-y: auto;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.875rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.625rem;
  margin-bottom: 1.75rem;
}
.sidebar-brand .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  animation: none;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.sidebar-brand .brand-logo svg {
  width: 16px;
  height: 16px;
}
.sidebar-brand span {
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* User card in sidebar */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}
.sidebar-user:hover {
  border-color: var(--border-hover);
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-class {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 1px;
}
.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

/* Nav links */
.nav-links {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
}
.nav-link:hover {
  background: var(--bg3);
  color: var(--text);
}
.nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.nav-link.active .nav-svg {
  color: var(--accent);
}
.nav-svg {
  flex-shrink: 0;
  color: var(--text3);
  transition: color 0.18s;
}
.nav-link:hover .nav-svg {
  color: var(--text2);
}

/* Active left indicator */
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-grad);
}

.notif-badge {
  position: absolute;
  right: 0.75rem;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  min-width: 18px;
  text-align: center;
}

.logout-btn {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  background: none;
  color: var(--text3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}
.logout-btn:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(248, 113, 113, 0.06);
}

/* =============================================
   MOBILE TOP BAR
   ============================================= */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  align-items: center;
  z-index: 99;
}
.mobile-brand {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  flex: 1;
  text-align: center;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hamburger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}
.mobile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
}
.mobile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  backdrop-filter: blur(4px);
}
.sidebar-overlay.visible {
  display: block;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 2.5rem 2.25rem;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-w));
}
.page {
  display: none;
}
.page.active {
  display: block;
  animation: pageIn 0.3s ease;
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  margin-bottom: 2rem;
}
.page-header h2 {
  font-family: "Syne", sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.page-header p {
  color: var(--text2);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* =============================================
   DASHBOARD — stat cards
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hover);
}
/* Gradient top line */
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.accent-blue::before {
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.accent-purple::before {
  background: linear-gradient(90deg, var(--purple), var(--accent));
}
.accent-green::before {
  background: linear-gradient(90deg, var(--green), var(--teal));
}
.accent-orange::before {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

/* Glow dot */
.stat-card::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.6;
}
.accent-blue::after {
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}
.accent-purple::after {
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}
.accent-green::after {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.accent-orange::after {
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}

.stat-icon {
  margin-bottom: 0.85rem;
}
.stat-value {
  font-family: "Syne", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Dashboard bottom */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.weekly-chart-card,
.quick-actions-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.weekly-chart-card h3,
.quick-actions-card h3 {
  font-family: "Syne", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weekly-bars {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  height: 90px;
  margin-bottom: 0.5rem;
}
.weekly-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.weekly-bar {
  width: 100%;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  border-radius: 5px 5px 0 0;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
  position: relative;
  opacity: 0.55;
}
.weekly-bar.today {
  opacity: 1;
  background: linear-gradient(to top, var(--green), var(--teal));
}
.weekly-bar:hover {
  opacity: 1;
}
.weekly-bar:hover::after {
  content: attr(data-val);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.weekly-labels {
  display: flex;
  gap: 0.4rem;
}
.weekly-labels span {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text3);
  font-weight: 500;
}

/* Quick action buttons */
.qa-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}
.qa-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateX(3px);
}
.qa-btn:active {
  transform: translateX(0) scale(0.98);
}

/* =============================================
   TIMER
   ============================================= */
.timer-container {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}
.timer-ring {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 2rem;
}
.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 7;
}
.ring-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 553;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.timer-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer-time {
  font-family: "Syne", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.timer-status {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 0.3rem;
}
.timer-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.timer-btn {
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-family: "Syne", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.timer-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  pointer-events: none;
}
.timer-btn.start {
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #fff;
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3);
}
.timer-btn.stop {
  background: linear-gradient(135deg, var(--red), #ff4488);
  color: #fff;
  box-shadow: 0 6px 20px rgba(248, 113, 113, 0.3);
}
.timer-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}
.timer-btn:active {
  transform: scale(0.97);
}

.session-history {
  text-align: left;
}
.session-history h3 {
  font-family: "Syne", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.session-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  transition: border-color 0.18s;
}
.session-item:hover {
  border-color: var(--border-hover);
}
.session-duration {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.session-time {
  color: var(--text2);
}

/* =============================================
   COMMUNITY
   ============================================= */
.community-layout {
  max-width: 100%;
}

.post-composer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s;
}
.post-composer:focus-within {
  border-color: var(--accent);
}

.post-composer textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  transition: all 0.2s;
}
.post-composer textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg3);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}
.composer-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text3);
}
.composer-post-btn {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

/* Post cards */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.post-body {
  padding: 1.1rem 1.25rem;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid var(--border);
  transition: border-color 0.18s;
}
.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-header-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.post-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.post-avatar-btn:hover {
  transform: scale(1.05);
}
.post-avatar-btn:hover .post-avatar {
  border-color: var(--accent);
}

.post-author-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-author-link:hover {
  color: var(--accent);
}
.post-time {
  font-size: 0.73rem;
  color: var(--text3);
  margin-top: 1px;
}
.post-content {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Post actions row */
.post-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Emoji votes */
.emoji-vote-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.4rem;
}
.emoji-vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.45rem;
  border-radius: 50px;
  transition:
    background 0.15s,
    transform 0.12s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text2);
}
.emoji-vote-btn:hover {
  background: var(--bg3);
  transform: scale(1.15);
}
.emoji-vote-btn:active {
  transform: scale(0.92);
}
.emoji-vote-btn.emoji-vote-active {
  background: var(--accent-glow);
}
.emoji-count {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 10px;
}
.score-pos {
  color: var(--green);
}
.score-neg {
  color: var(--red);
}

.post-action-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.28rem 0.75rem;
  font-size: 0.77rem;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.post-action-btn:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-hover);
}

.post-report-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  transition:
    color 0.15s,
    background 0.15s;
  font-family: inherit;
}
.post-report-btn:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.1);
}

.post-mod-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  opacity: 0.65;
  transition:
    opacity 0.15s,
    background 0.15s;
  font-family: inherit;
}
.post-mod-btn:hover {
  opacity: 1;
  background: rgba(248, 113, 113, 0.1);
}

/* Comment preview inline */
.comments-preview {
  margin-top: 0.85rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  border-left: 2px solid var(--border);
}
.comment-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.comment-preview-item:last-of-type {
  margin-bottom: 0;
}
.comment-preview-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.comment-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comment-preview-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text2);
  flex: 1;
}
.comment-preview-author {
  font-weight: 700;
  color: var(--text);
  margin-right: 0.3rem;
}

.view-more-comments-btn {
  background: none;
  border: none;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.77rem;
  cursor: pointer;
  padding: 0.3rem 0 0;
  display: block;
  font-weight: 600;
  transition: opacity 0.15s;
  font-family: inherit;
}
.view-more-comments-btn:hover {
  opacity: 0.7;
}

/* =============================================
   NOTIFICATIONS
   ============================================= */
.admin-panel {
  background: var(--card);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(251, 146, 60, 0.08);
}
.admin-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Syne", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 600px;
}
.notif-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.notif-card:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.notif-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.notif-msg {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.55;
}
.notif-date {
  font-size: 0.73rem;
  color: var(--text3);
  margin-top: 0.5rem;
}
.notif-personal {
  border-left-color: var(--purple);
  background: linear-gradient(
    90deg,
    rgba(192, 132, 252, 0.06),
    transparent 50%
  );
}
.notif-personal-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(192, 132, 252, 0.12);
  padding: 0.1em 0.5em;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

/* =============================================
   WHITE NOISE
   ============================================= */
.noise-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.noise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 700px;
}
.noise-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.22s;
  position: relative;
}
.noise-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hover);
}
.noise-card.playing {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.noise-visual {
  height: 80px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}
.rain-visual {
  background: linear-gradient(180deg, #0a1a28, #0d2a3a);
}
.forest-visual {
  background: linear-gradient(180deg, #061806, #0a2a0a);
}
.cafe-visual {
  background: linear-gradient(180deg, #1a0e06, #2a1a08);
}
.white-visual {
  background: linear-gradient(180deg, #0f0f20, #1a1a30);
}
.custom-visual {
  background: var(--accent-grad);
  opacity: 0.85;
}
.user-visual {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  opacity: 0.85;
}

.noise-card.playing .noise-visual {
  animation: noiseGlow 2s infinite;
}
@keyframes noiseGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25);
  }
}

.noise-info h3 {
  font-family: "Syne", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}
.noise-info p {
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 0.75rem;
}

.noise-btn {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.noise-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.noise-card.playing .noise-btn {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.volume-wrap .volume-slider {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}

.noise-delete-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.noise-card:hover .noise-delete-btn {
  opacity: 1;
}

/* =============================================
   SETTINGS
   ============================================= */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
}
.settings-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}
.settings-section h3 {
  font-family: "Syne", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text2);
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.theme-btn {
  border: 2px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.theme-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.theme-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.theme-btn span {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.theme-preview {
  width: 100%;
  height: 34px;
  border-radius: 6px;
}
.dark-prev {
  background: linear-gradient(135deg, #080b12, #7c6fff);
}
.light-prev {
  background: linear-gradient(135deg, #f1f4fb, #6355e8);
}
.neon-prev {
  background: linear-gradient(135deg, #04040a, #00ffb4);
}
.minimal-prev {
  background: linear-gradient(135deg, #f9f9f9, #111);
}
.aurora-prev {
  background: linear-gradient(135deg, #060d1a, #38e8d0);
}
.sunset-prev {
  background: linear-gradient(135deg, #100810, #ff7055);
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
 display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.modal h3 {
  font-family: "Syne", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.modal p {
  color: var(--text2);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1rem;
}
.resume-info {
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--border);
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
}
.modal-actions .btn-primary {
  margin-top: 0;
}

/* ---- Body scroll lock when any modal is open ---- */
/* ---- Body scroll lock when any modal is open ---- */
body.modal-open {
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg2);
  color: var(--text2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--bg3);
  color: var(--text);
}
.accent-icon-btn {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.accent-icon-btn:hover {
  opacity: 0.9;
  background: var(--accent-grad);
  color: #fff;
}

/* Reddit-style comment modal */
.modal-reddit {
  max-width: 640px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.modal-reddit .modal-header {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* THE single scrollable region — post + comments scroll together */
.modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  /* Hide scrollbar — Chrome/Safari/Edge */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge legacy */
}
.modal-body-scroll::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Opera */
}

/* Post wrapper inside scroll — no overflow of its own */
.modal-post-wrapper {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.modal-post {
  padding: 1rem 1.25rem;
}
.modal-post-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}
.post-avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.post-avatar.small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-author-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}
.modal-post-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}
.modal-post-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.4rem 0 0.5rem;
  line-height: 1.35;
}
.modal-post .img-grid {
  margin: 0.75rem 0 0.25rem;
  border-radius: 10px;
}

/* Composer pinned at bottom of both modals */
.modal-composer-pinned {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
}
.modal-composer-pinned textarea {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  resize: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.modal-composer-pinned textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Comments list — NO overflow here, parent modal-body-scroll handles it */
.modal-reddit .comments-list-modal,
.popular-post-modal-inner .comments-list-modal {
  padding: 0.5rem 1.25rem 1rem;
}

/* Comment items */
.comment-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comment-content {
  flex: 1;
}
.comment-author {
  font-weight: 700;
  font-size: 0.83rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.comment-time {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text3);
}
.comment-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text2);
}
.comment-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.comment-action-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--text3);
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  transition:
    color 0.15s,
    background 0.15s;
  font-family: inherit;
}
.comment-action-btn:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
}
.comment-action-btn.mod-btn {
  color: var(--orange);
}
.comment-action-btn.mod-btn:hover {
  background: rgba(251, 146, 60, 0.1);
}

/* Inline comment composer (non-modal) */
.comment-composer-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: flex-end;
}
.comment-composer-row textarea {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  resize: none;
}
.comment-composer-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* =============================================
   PROFILE MODAL
   ============================================= */
.profile-modal {
  max-width: 340px;
  text-align: center;
  padding: 2.25rem 1.75rem 1.75rem;
  position: relative;
}
.profile-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.pm-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--bg3);
  overflow: hidden;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.pm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-name {
  font-family: "Syne", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.pm-meta {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pm-bio {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  min-height: 1rem;
}
.pm-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
}
.pm-stat {
  text-align: center;
  flex: 1;
}
.pm-stat-val {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.pm-stat-label {
  font-size: 0.7rem;
  color: var(--text3);
  margin-top: 0.15rem;
}
.pm-stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
  margin: 0 0.25rem;
}

/* =============================================
   ROLE BADGES
   ============================================= */
.role-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 0.12em 0.45em;
  border-radius: 5px;
  vertical-align: middle;
  margin-left: 0.35rem;
  text-transform: uppercase;
}
.badge-admin {
  background: linear-gradient(135deg, #ff6b35, #f7b731);
  color: #fff;
}
.badge-mod {
  background: linear-gradient(135deg, #7c6fff, #a78bfa);
  color: #fff;
}
.badge-member {
  background: var(--bg3);
  color: var(--text3);
}

/* =============================================
   REPORT MODAL
   ============================================= */
#report-reason {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}
#report-reason:focus {
  outline: none;
  border-color: var(--accent);
}

/* =============================================
   MUTE MODAL
   ============================================= */
.mute-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.mute-option-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.15s;
}
.mute-option-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: scale(1.02);
}

/* =============================================
   CUSTOM CONFIRM MODAL
   ============================================= */
.confirm-modal {
  max-width: 380px;
  text-align: center;
}
.confirm-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.confirm-modal h3 {
  margin-bottom: 0.25rem;
}
.confirm-modal .modal-actions {
  margin-top: 1.25rem;
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #ff4488);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(248, 113, 113, 0.3);
}
.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn-danger:active {
  transform: scale(0.97);
}

/* =============================================
   ADMIN PANEL
   ============================================= */
.page#page-admin {
  max-width: 900px;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}
.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.admin-stat-card.highlight {
  border-color: var(--red);
  background: rgba(248, 113, 113, 0.04);
}
.admin-stat-icon {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}
.admin-stat-val {
  font-family: "Syne", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 0.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-tabs-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.admin-tab-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.admin-tab-btn.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.admin-tab-btn:hover:not(.active) {
  background: var(--bg3);
  color: var(--text);
}

.admin-tab-pane {
  display: none;
}
.admin-tab-pane.active {
  display: block;
  width: 100%;
  min-height: 200px;
  animation: fadeSlide 0.2s ease;
}
.admin-tabs-content {
  display: block;
  width: 100%;
  min-height: 200px;
}

/* Reports */
.admin-report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.admin-report-card:hover {
  border-color: var(--border-hover);
}
.admin-report-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.report-type-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--bg3);
  color: var(--text2);
  padding: 0.15em 0.55em;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.report-status-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15em 0.55em;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-pending {
  background: rgba(251, 146, 60, 0.15);
  color: var(--orange);
}
.badge-resolved {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
}
.badge-dismissed {
  background: var(--bg3);
  color: var(--text3);
}
.admin-report-time {
  font-size: 0.73rem;
  color: var(--text3);
  margin-left: auto;
}
.admin-report-target {
  font-size: 0.86rem;
  color: var(--text);
  background: var(--bg2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.4rem;
  font-style: italic;
  border-left: 2px solid var(--border);
}
.admin-report-reason {
  font-size: 0.82rem;
  color: var(--text2);
  margin-bottom: 0.2rem;
}
.admin-report-reporter {
  font-size: 0.75rem;
  color: var(--text3);
}
.admin-report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.btn-danger-sm {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-danger-sm:hover {
  background: var(--red);
  color: #fff;
}
.btn-secondary-sm {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-secondary-sm:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-hover);
}

/* Users table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg2);
  color: var(--text2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: var(--bg2);
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-user-name {
  font-weight: 700;
  font-size: 0.88rem;
}
.admin-user-email {
  font-size: 0.73rem;
  color: var(--text3);
}

.role-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.role-select:focus {
  outline: none;
  border-color: var(--accent);
}
.mute-active-badge {
  font-size: 0.7rem;
  background: rgba(251, 146, 60, 0.1);
  color: var(--orange);
  padding: 0.15em 0.5em;
  border-radius: 5px;
  margin-left: 0.4rem;
}

/* Admin posts */
.admin-post-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.18s;
}
.admin-post-row:hover {
  border-color: var(--border-hover);
}
.admin-post-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.admin-post-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}
.admin-post-time {
  font-size: 0.72rem;
  color: var(--text3);
}
.admin-post-content {
  font-size: 0.87rem;
  color: var(--text2);
  margin-bottom: 0.55rem;
  line-height: 1.5;
}

/* Admin nav link */
.nav-link-admin {
  color: var(--orange) !important;
}
.nav-link-admin .nav-svg {
  color: var(--orange) !important;
}
.nav-link-admin.active {
  background: rgba(251, 146, 60, 0.12) !important;
}
.nav-link-admin.active::before {
  background: linear-gradient(to bottom, var(--orange), #fbbf24) !important;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 0.7rem 1.75rem;
  font-size: 0.88rem;
  z-index: 2000;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  font-weight: 500;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* =============================================
   LOADING STATES
   ============================================= */
.loading-text {
  color: var(--text2);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text3);
  font-size: 0.9rem;
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg2) 25%,
    var(--bg3) 50%,
    var(--bg2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-xs);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-topbar {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: 5rem 1rem 2rem;
    max-width: 100vw;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .noise-grid {
    grid-template-columns: 1fr;
  }
  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .timer-ring {
    width: 200px;
    height: 200px;
  }
  .timer-time {
    font-size: 1.8rem;
  }
  .admin-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .admin-stats-row .admin-stat-card:last-child {
    grid-column: span 2;
  }
  .community-layout {
    max-width: 100%;
  }
  .page-header h2 {
    font-size: 1.5rem;
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .auth-container {
    padding: 1rem;
  }
  .auth-card {
    padding: 1.25rem;
  }
  .admin-table {
    font-size: 0.78rem;
  }
  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.6rem;
  }
  .modal {
    padding: 1.5rem 1.25rem;
  }
  .modal-reddit {
    max-height: 95vh;
  }
}
/* Aura Card */
.aura-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--card) 0%,
    color-mix(in srgb, var(--accent) 12%, var(--card)) 100%
  );
  border: 1px solid var(--accent-glow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.aura-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px var(--accent-glow),
    var(--shadow-card);
}

.aura-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aura-glow-ring {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.6;
}

.aura-icon {
  font-size: 1.6rem;
  animation: aura-pulse 3s ease-in-out infinite;
}

@keyframes aura-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.15);
    filter: brightness(1.3);
  }
}

.aura-level {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent2);
  margin-top: 0.1rem;
  letter-spacing: 0.03em;
}

.aura-percentile {
  font-size: 0.7rem;
  color: var(--text3);
  margin-top: 0.1rem;
}

/* Loaded animation */
.aura-card.aura-loaded .stat-value {
  animation: aura-count-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes aura-count-in {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Tab switcher row ────────────────────────── */
/* ── Premium Tab Switcher ───────────────────── */
.community-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 1.2rem;

  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;

  box-shadow: var(--shadow-card);
}

/* Buttons */
.community-tab-btn {
  flex: 1;
  position: relative;
  z-index: 2;

  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: none;
  background: transparent;

  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text3);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* SVG style */
.community-tab-btn svg {
  color: var(--text3);
  transition: color 0.2s;
}

/* Hover */
.community-tab-btn:hover {
  color: var(--text);
}

.community-tab-btn:hover svg {
  color: var(--text);
}

/* ACTIVE TEXT */
.community-tab-active {
  color: #fff !important;
}

.community-tab-active svg {
  color: #fff !important;
}

/* 🔥 Sliding Glow Indicator */
.community-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;

  width: calc(50% - 4px);

  border-radius: 10px;
  background: var(--accent-grad);

  box-shadow: 0 6px 20px var(--accent-glow);

  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Move indicator when "My Posts" active */
.community-tabs.mine-active .community-tab-indicator {
  transform: translateX(100%);
}

/* ── My Post card — accent left border ──────── */
.my-post-card {
  position: relative;
  border-left: 3px solid var(--accent, #6c63ff) !important;
}

/* ── "My Post" badge top-right ──────────────── */
.my-post-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #6c63ff);
  background: color-mix(in srgb, var(--accent, #6c63ff) 12%, transparent);
  padding: 0.18rem 0.55rem;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--accent, #6c63ff) 30%, transparent);
}

/* ── Delete button (always visible on My Posts) */
.my-post-delete-btn {
  background: none;
  border: none;
  color: var(--text3, #888);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition:
    color 0.15s,
    background 0.15s;
  margin-left: auto;
}
.my-post-delete-btn:hover {
  color: var(--red, #f87171);
  background: color-mix(in srgb, var(--red, #f87171) 10%, transparent);
}

/* ── Stats strip under each My Post card ────── */
.my-post-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, #2a2a3a);
}
.my-post-stat {
  font-size: 0.72rem;
  color: var(--text3, #888);
}

/* ── Empty state for My Posts ───────────────── */
.my-posts-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.my-posts-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2, #ccc);
  margin-bottom: 0.25rem;
}
.my-posts-empty-sub {
  font-size: 0.82rem;
  color: var(--text3, #888);
}

/* === Skeleton Enhancements === */
/* Skeleton Post Layout */
.skeleton-post {
  pointer-events: none;
}

/* Rounded avatar skeleton */
.post-avatar.skeleton {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

/* Lines */
.skeleton-line {
  border-radius: 6px;
}

/* Optional: softer shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg2) 25%,
    var(--bg3) 50%,
    var(--bg2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.community-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: flex-start;
}

/* LEFT SIDE — main feed */
.community-main {
  min-width: 0;
}

/* RIGHT SIDEBAR */
.community-sidebar {
  position: sticky;
  top: 20px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Sidebar sections */
.sidebar-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  overflow: hidden;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-section-icon {
  font-size: 1rem;
  line-height: 1;
}

.sidebar-section-title {
  font-family: "Syne", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  margin: 0;
}

/* ── Popular Posts ──────────────────────────── */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popular-posts-loading {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 8px 0;
  text-align: center;
}

.popular-post-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.15s;
  text-align: left;
  width: 100%;
}

.popular-post-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.popular-post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.popular-post-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-author {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.popular-post-score {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.popular-post-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-post-excerpt {
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-posts-empty {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 8px 0;
  text-align: center;
}

/* Popular Post Modal */
.popular-post-modal-inner {
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.popular-post-modal-inner .modal-header {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* modal-body-scroll is the single scroll region — shared rule above handles it */

.popular-modal-vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Accordion */
.accordion-item {
  margin-bottom: 6px;
}

.accordion-btn {
  width: 100%;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.accordion-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  font-size: 0.78rem;
  color: var(--text2);
  padding: 0 10px;
}

.accordion-content ul {
  padding: 6px 0 6px 16px;
}

.accordion-content li {
  margin-bottom: 4px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-sidebar {
    display: none;
  }
}
/* ============================================================
   COMMENT IMAGES & VOTES — new feature styles
   ============================================================ */

/* ── Comment composer restructure ── */
.comment-composer-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

.comment-composer-inputs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
}

.comment-composer-inputs textarea {
  flex: 1;
}

.comment-composer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Image attach button in comment box ── */
.comment-image-btn {
  background: transparent;
  color: var(--text3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comment-image-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft, rgba(99,102,241,0.08));
}

/* ── Preview strip above the comment textarea ── */
.comment-img-preview {
  width: 100%;
}
.comment-img-preview-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 160px;
}
.comment-img-preview-wrap img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  border: 1.5px solid var(--border);
}
.comment-img-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.comment-img-uploading-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.68rem;
  text-align: center;
  padding: 3px 0;
}

/* ── Image inside a rendered comment ── */
.comment-image-wrap {
  margin-top: 8px;
  margin-bottom: 4px;
}
.comment-img {
  max-width: min(260px, 100%);
  max-height: 200px;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
  border: 1.5px solid var(--border);
  display: block;
  transition: opacity 0.15s;
}
.comment-img:hover {
  opacity: 0.88;
}

/* ── Comment vote group ── */
.comment-vote-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 6px;
}
.comment-vote-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text3);
  padding: 2px 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}
.comment-vote-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
}
.comment-vote-btn.emoji-vote-active {
  color: var(--accent);
}
.comment-vote-score {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  padding: 0 1px;
}
.comment-vote-score.score-pos { color: var(--green, #22c55e); }
.comment-vote-score.score-neg { color: var(--red,   #ef4444); }

/* ── comment-actions row spacing adjustment ── */
.comment-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
#admin-booklets-list {
  color: var(--text);
  padding: 0.5rem 0;
}
/* ── Booklets tab fix ── */
#admin-tab-booklets {
  color: var(--text);
}
#admin-tab-booklets input,
#admin-tab-booklets select,
#admin-tab-booklets textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
}
#admin-tab-booklets label {
  color: var(--text2);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.3rem;
}
#admin-tab-booklets .loading-text,
#admin-booklets-list {
  color: var(--text2);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}
/* ── Terms Checkbox Wrapper ── */
.terms-check-wrap {
  margin: 0.9rem 0 0.2rem;
}
 
.terms-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
}
 
/* ── Hide native checkbox ── */
.terms-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
 
/* ── Custom checkbox visual ── */
.checkbox-visual {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(124, 111, 255, 0.3);
  background: rgba(124, 111, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  margin-top: 1px;
}
 
.terms-check-label:hover .checkbox-visual {
  border-color: rgba(124, 111, 255, 0.55);
  background: rgba(124, 111, 255, 0.09);
}
 
/* Checked state */
.terms-check-label input:checked ~ .checkbox-visual {
  background: var(--accent, #7c6fff);
  border-color: var(--accent, #7c6fff);
  box-shadow: 0 0 10px rgba(124, 111, 255, 0.45);
}
 
.check-icon {
  display: none;
  width: 10px;
  height: 10px;
  color: #fff;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 0.22s ease;
}
 
.terms-check-label input:checked ~ .checkbox-visual .check-icon {
  display: block;
  stroke-dashoffset: 0;
}
 
/* ── Text & links ── */
.terms-check-text {
  font-size: 0.82rem;
  color: var(--text2, #8b90a8);
  line-height: 1.55;
}
 
.terms-link {
  color: var(--accent2, #00d4ff);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
 
.terms-link:hover {
  color: var(--accent, #7c6fff);
  text-decoration: underline;
}
 
/* ── Error message ── */
.terms-check-error {
  font-size: 0.78rem;
  color: var(--red, #ff3b5c);
  margin-top: 0.4rem;
  min-height: 1rem;
  padding-left: 0.2rem;
  display: none;
  font-weight: 500;
}
 
.terms-check-error.visible {
  display: block;
  animation: termsShake 0.38s cubic-bezier(.36,.07,.19,.97) both;
}
 
/* ── Error border highlight on checkbox ── */
.terms-check-wrap.error .checkbox-visual {
  border-color: rgba(255, 59, 92, 0.6);
  background: rgba(255, 59, 92, 0.07);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.12);
}
 
/* ── Shake animation ── */
@keyframes termsShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-5px); }
  30%       { transform: translateX(5px); }
  45%       { transform: translateX(-4px); }
  60%       { transform: translateX(4px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(2px); }
}