/* =============================================
   BBAU CONNECT — Dual Theme (Light Default + Dark)
   Minimalist · Borderless cards · Clean accents
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

/* ===== LIGHT THEME (Default) ===== */
:root {
  --bg: #F5F3EF;
  --bg2: #FFFFFF;
  --bg3: #EDE9E3;
  --bg-hover: #E8E4DE;
  --card: #FFFFFF;
  --card-hover: #FAFAF8;
  --border: rgba(0,0,0,0.06);
  --border2: rgba(0,0,0,0.10);
  --text: #1A1A2E;
  --text2: #4A4A5A;
  --text3: #8A8A98;
  --blue: #2563EB;
  --blue2: #1D4ED8;
  --blue-light: rgba(37, 99, 235, .08);
  --green: #059669;
  --amber: #D97706;
  --pink: #DB2777;
  --red: #DC2626;
  --purple: #7C3AED;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --sidebar-w: 250px;
  --nav-h: 62px;
  --bottom-nav-h: 60px;
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.06);
  --t: .2s ease
}

/* ===== DARK THEME ===== */
body.dark-theme {
  --bg: #000000;
  --bg2: #0A0A0A;
  --bg3: #141414;
  --bg-hover: #1F1F1F;
  --card: #141414;
  --card-hover: #1A1A1A;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);
  --text: #F0F0F0;
  --text2: #8B8B8B;
  --text3: #555555;
  --blue: #3B82F6;
  --blue2: #2563EB;
  --blue-light: rgba(59, 130, 246, .10);
  --green: #10B981;
  --amber: #F59E0B;
  --pink: #EC4899;
  --red: #EF4444;
  --purple: #8B5CF6;
  --accent: #3B82F6;
  --accent-soft: rgba(59, 130, 246, 0.10);
  --shadow: none;
  --shadow-lg: none
}

html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s ease, color 0.35s ease
}

/* Smooth transition for all themed surfaces */
.navbar, .sidebar, .post-card, .qa-card, .listing-card, .resource-card,
.modal-container, .toast, .mobile-bottom-nav, .create-post-area,
.admin-stat-card, .quiz-card, .quiz-sidebar, .legal-card, .legal-search-box,
.form-input, .search-input, .sort-tabs, .admin-tabs, .auth-tabs,
.filter-chip, .vote-group, .comment-item, .profile-menu, .notif-panel,
.sidebar-stats, .hero-banner, .flagged-item, .skeleton-card {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em
}

a {
  color: var(--blue);
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit
}

input,
select,
textarea {
  font-family: inherit
}

.hidden {
  display: none !important
}

::-webkit-scrollbar {
  width: 4px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.20)
}

body.dark-theme::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08) }
body.dark-theme::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14) }

/* ===== AUTH SPLIT ===== */
.auth-screen {
  display: flex;
  min-height: 100vh
}

.auth-left {
  width: 460px;
  min-width: 360px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: none;
  padding: 2.5rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.5rem
}

.logo-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text)
}

.logo-subtitle {
  font-size: .72rem;
  color: var(--text3);
  margin-top: 2px;
  letter-spacing: 0.02em
}

.auth-tabs {
  display: flex;
  background: var(--bg3);
  border: none;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 2rem;
  gap: 4px
}

.auth-tab {
  flex: 1;
  padding: .6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .875rem;
  color: var(--text3);
  transition: all var(--t);
  position: relative;
  background: transparent;
  border: none
}

.auth-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s ease
}

.auth-tab.active::after {
  width: 100%
}

.auth-tab.active {
  background: var(--blue);
  color: #fff
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 1.1rem
}

.auth-form.active {
  display: flex
}

.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text)
}

.form-subtitle {
  font-size: .85rem;
  color: var(--text2);
  margin-top: -.4rem
}

.input-row {
  display: flex;
  gap: .75rem
}

.input-row .input-group {
  flex: 1
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: .4rem
}

.input-group label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: .4rem;
  text-transform: uppercase;
  letter-spacing: .08em
}

.badge-visible {
  background: var(--blue-light);
  color: var(--blue);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: .65rem;
  text-transform: none;
  letter-spacing: 0
}

.badge-hidden {
  background: var(--bg3);
  color: var(--text3);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: .65rem;
  text-transform: none;
  letter-spacing: 0
}

.form-input {
  background: var(--bg3);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: .82rem 1rem;
  color: var(--text);
  font-size: .875rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%
}

.form-input:focus {
  border-color: var(--blue);
  background: rgba(59,130,246,0.04);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
  transform: translateY(-1px)
}

.form-input::placeholder {
  color: var(--text3)
}

select.form-input option {
  background: var(--bg3)
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--blue);
  color: #fff;
  padding: .88rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  transition: all 0.3s ease;
  width: 100%;
  white-space: nowrap;
  border: none;
  position: relative
}

.btn-primary:hover {
  background: var(--blue2);
  transform: translateY(-2px)
}

.btn-primary:active {
  transform: translateY(0) scale(0.98)
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: .65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--t)
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(59,130,246,0.06)
}

.auth-hint {
  background: rgba(59,130,246,0.06);
  border: none;
  border-radius: 12px;
  padding: .7rem .85rem;
  font-size: .74rem;
  color: var(--text3);
  text-align: center
}

.auth-hint strong {
  color: var(--blue)
}

.auth-switch {
  text-align: center;
  font-size: .84rem;
  color: var(--text3)
}

.verify-icon {
  text-align: center;
  font-size: 3rem
}

.otp-inputs {
  display: flex;
  gap: .6rem;
  justify-content: center
}

.otp-box {
  width: 48px;
  height: 56px;
  background: var(--bg3);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  outline: none;
  transition: all var(--t)
}

.otp-box:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12)
}

/* AUTH RIGHT HERO */
.auth-right {
  flex: 1;
  background: linear-gradient(-45deg, #1e3a5f, #2563EB, #1D4ED8, #1e3a5f);
  background-size: 400% 400%;
  animation: bgBreathe 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  color: white
}

.auth-right::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  animation: floatOrb 12s infinite alternate ease-in-out;
  background: rgba(255, 255, 255, 0.12);
  top: -100px;
  left: -50px
}

.auth-right::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  animation: floatOrb 12s infinite alternate ease-in-out;
  animation-delay: -6s;
  background: rgba(139, 92, 246, 0.10);
  bottom: -100px;
  right: -50px
}

.auth-right-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  width: 100%;
  animation: fadeIn 1.5s ease-out forwards
}

.hero-headline {
  margin-bottom: 2.5rem
}

.hero-headline h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.12;
  margin-bottom: .9rem;
  letter-spacing: -0.02em
}

.hero-accent {
  color: var(--blue);
  font-style: italic
}

.hero-headline p {
  color: rgba(255, 255, 255, .5);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 380px
}

.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  margin-bottom: 2rem
}

.feature-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(6px) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12)
}

.fc-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.12)
}

.fc-title {
  font-weight: 700;
  font-size: .88rem;
  color: #fff
}

.fc-sub {
  font-size: .7rem;
  color: rgba(255, 255, 255, .4);
  margin-top: 2px
}

.auth-right-footer {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap
}

.stat-pill {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  padding: .35rem .85rem;
  font-size: .76rem;
  color: rgba(255, 255, 255, .6);
  font-weight: 600
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  z-index: 100
}

.nav-left {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: var(--sidebar-w)
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text3);
  transition: all var(--t)
}

.sidebar-toggle:hover {
  background: var(--bg3);
  color: var(--text)
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer
}

.nav-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em
}

.nav-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center
}

.nav-search>svg {
  position: absolute;
  left: 14px;
  color: var(--text3);
  pointer-events: none
}

.search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 24px;
  padding: .55rem 1rem .55rem 2.4rem;
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: all var(--t)
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .08);
  background: var(--bg-hover)
}

.search-input::placeholder {
  color: var(--text3)
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  z-index: 200
}

.search-result-item {
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  transition: background var(--t)
}

.search-result-item:hover {
  background: var(--bg-hover)
}

.search-result-type {
  font-size: .7rem;
  color: var(--text3)
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  position: relative
}

.nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text3);
  transition: all var(--t);
  position: relative
}

.nav-btn:hover {
  background: var(--bg3);
  color: var(--text)
}

.notif-badge {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  line-height: 1;
  pointer-events: none
}

.nav-avatar-wrap {
  cursor: pointer
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  color: #fff;
  transition: all var(--t);
  border: 2px solid transparent
}

.nav-avatar-wrap:hover .avatar-circle {
  border-color: var(--blue2)
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  width: 220px;
  padding: .5rem;
  z-index: 200;
  animation: dropIn .2s ease
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .6rem
}

.profile-menu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff
}

.profile-menu-username {
  font-weight: 700;
  font-size: .875rem
}

.profile-menu-email {
  font-size: .72rem;
  color: var(--text3)
}

.menu-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin: .2rem 0
}

.menu-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .6rem .75rem;
  border-radius: 10px;
  color: var(--text2);
  font-size: .855rem;
  font-weight: 500;
  transition: all var(--t);
  text-align: left
}

.menu-item:hover {
  background: var(--bg-hover);
  color: var(--text)
}

.menu-item.danger:hover {
  background: rgba(239, 68, 68, .08);
  color: var(--red)
}

/* NOTIFICATIONS */
.notif-panel {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 1rem;
  width: 320px;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  z-index: 150;
  animation: dropIn .2s ease;
  overflow: hidden
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-weight: 700;
  font-size: .9rem
}

.notif-panel-header button {
  color: var(--text3)
}

.notif-list {
  max-height: 340px;
  overflow-y: auto
}

.notif-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--t)
}

.notif-item:hover {
  background: var(--bg-hover)
}

.notif-item.unread {
  background: rgba(59,130,246,0.06)
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 4px
}

.notif-text {
  font-size: .83rem;
  color: var(--text)
}

.notif-time {
  font-size: .72rem;
  color: var(--text3);
  margin-top: 2px
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  padding-top: var(--nav-h);
  min-height: 100vh
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  background: var(--bg2);
  border-right: 1px solid rgba(255,255,255,0.03);
  overflow-y: auto;
  padding: 1.25rem .75rem;
  transition: transform var(--t);
  z-index: 50
}

.sidebar.collapsed {
  transform: translateX(-100%)
}

.sidebar-section {
  margin-bottom: 1.75rem
}

.sidebar-label {
  font-size: .63rem;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: .12em;
  padding: 0 .5rem;
  margin-bottom: .5rem;
  text-transform: uppercase
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .62rem .75rem;
  border-radius: 12px;
  color: var(--text2);
  font-size: .865rem;
  font-weight: 500;
  transition: all var(--t);
  text-align: left;
  margin-bottom: 2px
}

.sidebar-item:hover {
  background: var(--bg3);
  color: var(--text)
}

.sidebar-item.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600
}

.sidebar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
  color: #fff
}

.si-indigo { background: var(--blue) }
.si-red { background: var(--red) }
.si-amber { background: var(--amber) }
.si-purple { background: var(--purple) }
.si-blue { background: #3B82F6 }
.si-green { background: #10B981 }
.si-teal { background: #14B8A6 }
.si-pink { background: #EC4899 }

.cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0
}

.sidebar-item.cat {
  padding-left: .6rem;
  font-size: .84rem
}

.sidebar-stats {
  background: var(--bg3);
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: .4rem;
  text-align: center;
  margin-top: .5rem
}

.stat-item {
  flex: 1
}

.stat-number {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text)
}

.stat-label {
  font-size: .62rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 1.75rem;
  max-width: calc(100% - var(--sidebar-w));
  transition: margin var(--t)
}

.main-content.full-width {
  margin-left: 0;
  max-width: 100%
}

/* ===== PAGE ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: .75rem
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em
}

.page-subtitle {
  font-size: .83rem;
  color: var(--text3);
  margin-top: 2px
}

.sort-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg3);
  border: none;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.25rem
}

.sort-tab {
  flex: 1;
  padding: .48rem .8rem;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text3);
  transition: all var(--t)
}

.sort-tab.active {
  background: var(--blue);
  color: #fff
}

.hero-banner {
  background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(139,92,246,.04));
  border: none;
  border-radius: 20px;
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden
}

.hero-banner h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .5rem
}

.hero-banner p {
  color: var(--text2);
  font-size: .875rem;
  max-width: 450px
}

.hero-btns {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap
}

/* POST CARDS */
.post-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--t);
  position: relative;
  overflow: hidden
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--blue));
  opacity: 0.5
}

.post-card:hover {
  background: var(--card-hover);
  transform: translateY(-1px)
}

.post-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .85rem
}

.post-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  flex-shrink: 0
}

.post-author-info {
  flex: 1
}

.post-author-name {
  font-size: .85rem;
  font-weight: 700
}

.post-meta {
  font-size: .72rem;
  color: var(--text3)
}

.post-cat-badge {
  padding: .28rem .8rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  flex-shrink: 0
}

.post-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.4
}

.post-body {
  font-size: .855rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: .8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.post-footer {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-wrap: wrap
}

.vote-group {
  display: flex;
  align-items: center;
  gap: .2rem;
  background: var(--bg3);
  border: none;
  border-radius: 24px;
  padding: .28rem .5rem;
  flex-shrink: 0;
  white-space: nowrap
}

.vote-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text3);
  font-size: .85rem;
  transition: transform .1s ease, color .1s ease !important;
  will-change: transform
}

.vote-btn:hover {
  background: var(--bg-hover)
}

.vote-btn:active {
  transform: scale(1.35) !important
}

.vote-btn.upvoted {
  color: var(--green) !important;
  font-weight: 800
}

.vote-btn.downvoted {
  color: var(--red) !important;
  font-weight: 800
}

.vote-count {
  font-size: .85rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  word-break: keep-all;
  transition: transform .15s ease;
  display: inline-block
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .75rem;
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--t)
}

.post-action-btn:hover {
  background: var(--bg3);
  color: var(--text)
}

.post-action-btn.danger:hover {
  color: var(--red)
}

/* CREATE POST */
.create-post-area {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1.1rem
}

.create-post-trigger {
  display: flex;
  align-items: center;
  gap: .7rem
}

.create-post-trigger input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 24px;
  padding: .6rem 1.1rem;
  color: var(--text3);
  font-size: .845rem;
  cursor: pointer;
  outline: none;
  transition: all var(--t)
}

.create-post-trigger input:hover {
  border-color: var(--blue);
  color: var(--text)
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  will-change: opacity;
  animation: overlayIn .18s cubic-bezier(.4,0,.2,1) forwards
}

@keyframes overlayIn {
  from { opacity: 0 }
  to { opacity: 1 }
}

.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  width: 92%;
  max-width: 960px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 1.75rem;
  animation: modalIn .2s cubic-bezier(.4,0,.2,1) forwards;
  will-change: transform, opacity;
  word-wrap: break-word;
  overflow-wrap: break-word
}

.modal-container img,
.modal-container video {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px;
  display: block
}

.modal-container.modal-closing {
  animation: modalOut .18s cubic-bezier(.4,0,.2,1) forwards
}

.modal-overlay.modal-closing {
  animation: overlayOut .18s cubic-bezier(.4,0,.2,1) forwards
}

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -54%) scale(.96) }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) }
}

@keyframes modalOut {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1) }
  to { opacity: 0; transform: translate(-50%, -46%) scale(.96) }
}

@keyframes overlayOut {
  from { opacity: 1 }
  to { opacity: 0 }
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text3);
  transition: all var(--t)
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text)
}

.form-group {
  margin-bottom: 1rem
}

.form-group label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .06em
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-hover);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: .72rem .9rem;
  color: var(--text);
  font-size: .86rem;
  outline: none;
  transition: all var(--t);
  resize: vertical
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .08)
}

.form-group textarea {
  min-height: 90px
}

select option {
  background: var(--bg3)
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem
}

.cat-chip {
  padding: .32rem .85rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-hover);
  color: var(--text2);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t)
}

.cat-chip.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue)
}

.image-upload-area {
  border: 2px dashed rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  position: relative
}

.image-upload-area:hover {
  border-color: var(--blue);
  background: rgba(59,130,246,0.04)
}

.image-upload-area input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5
}

.upload-icon {
  font-size: 2.2rem;
  margin-bottom: .4rem;
  pointer-events: none;
  transition: transform 0.2s ease
}

.upload-text {
  font-size: .85rem;
  color: var(--text2);
  pointer-events: none
}

.upload-subtext {
  font-size: .73rem;
  color: var(--text3);
  margin-top: .2rem;
  pointer-events: none
}

.mod-warning {
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .12);
  border-radius: 10px;
  padding: .6rem .9rem;
  font-size: .78rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem
}

/* MARKETPLACE */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem
}

.listing-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--t);
  cursor: pointer
}

.listing-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover)
}

.listing-card-img {
  width: 100%;
  height: 180px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text3)
}

.listing-card-body {
  padding: 1.1rem
}

.listing-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: .25rem
}

.listing-price.free {
  color: var(--blue)
}

.listing-title {
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .35rem
}

.listing-seller {
  font-size: .73rem;
  color: var(--text3)
}

.listing-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .5rem
}

.tag {
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 600
}

/* RESOURCES */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem
}

.resource-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: all var(--t);
  cursor: pointer;
  position: relative;
  overflow: hidden
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--card-accent, var(--purple));
  border-radius: 3px;
  opacity: 0.6
}

.resource-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover)
}

.resource-icon {
  font-size: 2rem;
  margin-bottom: .75rem
}

.resource-title {
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .3rem
}

.resource-meta {
  font-size: .73rem;
  color: var(--text3);
  margin-bottom: .75rem
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.resource-downloads {
  font-size: .73rem;
  color: var(--text3)
}

.progress-bar {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-top: .65rem
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 4px
}

/* Q&A */
.qa-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.35rem;
  margin-bottom: .85rem;
  transition: all var(--t);
  cursor: pointer
}

.qa-card:hover {
  background: var(--card-hover);
  transform: translateY(-1px)
}

.qa-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: .98rem;
  margin-bottom: .5rem
}

.qa-body {
  font-size: .855rem;
  color: var(--text2);
  margin-bottom: .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.qa-stats {
  display: flex;
  gap: .9rem;
  font-size: .76rem;
  color: var(--text3)
}

/* ===== RESOURCE UPLOAD PROGRESS CARD ===== */
.resource-upload-progress-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.08);
  background: var(--bg3);
  margin-bottom: 1rem
}

.resource-upload-text { flex: 1; min-width: 0; margin-right: 0.75rem }
.resource-upload-title { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem }
.resource-upload-meta { font-size: 0.78rem; color: var(--text3) }
.resource-upload-status { margin-top: 0.35rem; font-size: 0.78rem; color: var(--blue) }

.resource-upload-circle {
  --progress: 0;
  width: 52px; height: 52px; border-radius: 999px;
  background: conic-gradient(var(--blue) calc(var(--progress) * 1%), rgba(59, 130, 246, 0.12) 0);
  display: flex; align-items: center; justify-content: center
}

.resource-upload-circle-inner {
  width: 40px; height: 40px; border-radius: 999px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center
}

.resource-upload-percent { font-size: 0.78rem; font-weight: 600; color: var(--text) }
.resource-upload-tick { font-size: 1.1rem; color: var(--green) }
.resource-upload-progress-card.done .resource-upload-status { color: var(--green) }
.resource-upload-progress-card.error { border-color: var(--red); background: rgba(239, 68, 68, 0.04) }
.resource-upload-progress-card.error .resource-upload-status { color: var(--red) }

.qa-resolved {
  background: rgba(16, 185, 129, .12);
  color: var(--green);
  padding: .22rem .75rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700
}

.answer-card {
  background: rgba(16, 185, 129, .05);
  border: 1px solid rgba(16, 185, 129, .1);
  border-radius: 14px;
  padding: 1rem;
  margin-top: .7rem
}

.answer-accepted-badge {
  font-size: .7rem; font-weight: 700; color: var(--green);
  display: inline-flex; align-items: center; gap: .2rem; margin-bottom: .35rem
}

/* COMMENTS */
.comments-section { margin-top: 1.25rem }

.comment-list {
  display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem
}

.comment-item {
  background: var(--bg-hover);
  border-radius: 14px;
  padding: .8rem;
  display: flex;
  gap: .65rem
}

.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff; flex-shrink: 0
}

.comment-body { flex: 1 }
.comment-author { font-size: .78rem; font-weight: 700 }
.comment-text { font-size: .82rem; color: var(--text2); margin-top: .18rem; line-height: 1.5 }

.add-comment { display: flex; gap: .5rem; margin-top: .5rem }

.add-comment input {
  flex: 1; background: var(--bg3); border: 1px solid rgba(255,255,255,0.04);
  border-radius: 24px; padding: .55rem 1rem; color: var(--text);
  font-size: .83rem; outline: none; transition: all var(--t)
}

.add-comment input:focus { border-color: var(--blue) }

.add-comment button {
  padding: .55rem 1rem; background: var(--blue); border-radius: 24px;
  color: #fff; font-size: .83rem; font-weight: 600; transition: all var(--t)
}

.add-comment button:hover { background: var(--blue2) }

/* ADMIN */
.admin-header {
  background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(139,92,246,.04));
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem
}

.admin-badge {
  background: var(--blue);
  color: #fff;
  padding: .32rem .85rem;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 700
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .85rem;
  margin-bottom: 1.5rem
}

.admin-stat-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: all var(--t)
}

.admin-stat-card:hover { background: var(--card-hover) }

.admin-stat-number { font-family: 'Outfit', sans-serif; font-size: 1.9rem; font-weight: 800 }
.admin-stat-label { font-size: .78rem; color: var(--text3); margin-top: .2rem }
.admin-stat-card:nth-child(1) .admin-stat-number { color: var(--blue) }
.admin-stat-card:nth-child(2) .admin-stat-number { color: var(--green) }
.admin-stat-card:nth-child(3) .admin-stat-number { color: var(--amber) }
.admin-stat-card:nth-child(4) .admin-stat-number { color: var(--pink) }

.admin-tabs {
  display: flex; gap: 2px; background: var(--bg3); border: none;
  border-radius: 14px; padding: 4px; margin-bottom: 1.25rem
}

.admin-tab {
  flex: 1; padding: .52rem; border-radius: 10px; font-size: .8rem;
  font-weight: 600; color: var(--text3); transition: all var(--t)
}

.admin-tab.active { background: var(--blue); color: #fff }

.flagged-item {
  background: var(--card); border: 1px solid rgba(239, 68, 68, .15);
  border-radius: var(--radius); padding: 1.1rem; margin-bottom: .85rem;
  display: flex; gap: .9rem; align-items: flex-start
}

.flagged-content { flex: 1 }
.flagged-title { font-weight: 700; font-size: .9rem; margin-bottom: .25rem }
.flagged-body { font-size: .81rem; color: var(--text2); margin-bottom: .5rem }

.flagged-reason {
  font-size: .72rem; color: var(--red);
  background: rgba(239, 68, 68, .08);
  padding: .22rem .65rem; border-radius: 8px; display: inline-block
}

.flagged-actions { display: flex; gap: .45rem; flex-shrink: 0; flex-direction: column }

.btn-approve {
  background: rgba(16, 185, 129, .08); color: var(--green);
  border: 1px solid rgba(16, 185, 129, .15); padding: .4rem .85rem;
  border-radius: 10px; font-size: .78rem; font-weight: 600; transition: all var(--t)
}
.btn-approve:hover { background: rgba(16, 185, 129, .15) }

.btn-delete {
  background: rgba(239, 68, 68, .06); color: var(--red);
  border: 1px solid rgba(239, 68, 68, .12); padding: .4rem .85rem;
  border-radius: 10px; font-size: .78rem; font-weight: 600; transition: all var(--t)
}
.btn-delete:hover { background: rgba(239, 68, 68, .12) }

.btn-ban {
  background: rgba(245, 158, 11, .06); color: var(--amber);
  border: 1px solid rgba(245, 158, 11, .15); padding: .4rem .85rem;
  border-radius: 10px; font-size: .78rem; font-weight: 600; transition: all var(--t)
}
.btn-ban:hover { background: rgba(245, 158, 11, .12) }

.data-table { width: 100%; border-collapse: collapse }

.data-table th {
  text-align: left; font-size: .72rem; font-weight: 700; color: var(--text3);
  letter-spacing: .06em; padding: .65rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06)
}

.data-table td {
  padding: .75rem; font-size: .855rem; color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.03)
}

.data-table tr:hover td { background: var(--bg-hover) }
.data-table td:first-child { color: var(--text); font-weight: 600 }
.user-status-active { color: var(--green); font-weight: 600 }
.user-status-banned { color: var(--red); font-weight: 600 }

.table-action {
  padding: .24rem .65rem; border-radius: 8px; font-size: .73rem;
  font-weight: 600; cursor: pointer; border: 1px solid; transition: all var(--t)
}

.table-action.danger { color: var(--red); border-color: rgba(239, 68, 68, .15) }
.table-action.danger:hover { background: rgba(239, 68, 68, .08) }
.table-action.success { color: var(--green); border-color: rgba(16, 185, 129, .15) }
.table-action.success:hover { background: rgba(16, 185, 129, .08) }

/* MISC */
.filter-bar {
  display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center
}

.filter-chip {
  padding: .38rem .9rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg3);
  color: var(--text3);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t)
}

.filter-chip.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue)
}

.filter-chip:hover {
  border-color: rgba(255,255,255,0.12);
  color: var(--text)
}

#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  display: flex; flex-direction: column; gap: .5rem
}

.toast {
  background: var(--bg3); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: .78rem 1.1rem; font-size: .855rem;
  display: flex; align-items: center; gap: .5rem;
  animation: toastIn .28s ease; min-width: 240px; max-width: 360px
}

.toast.success { border-left: 4px solid var(--green) }
.toast.error { border-left: 4px solid var(--red) }
.toast.info { border-left: 4px solid var(--blue) }
.toast.warn { border-left: 4px solid var(--amber) }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(28px) }
  to { opacity: 1; transform: translateX(0) }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(28px) }
}

.full-post-body { font-size: .9rem; color: var(--text2); line-height: 1.75; white-space: pre-wrap }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--text3) }
.empty-state .emoji-big { font-size: 2.5rem; margin-bottom: .65rem }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; color: var(--text2); margin-bottom: .25rem }

.ai-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--blue-light); border: none; border-radius: 20px;
  padding: .22rem .7rem; font-size: .7rem; font-weight: 700; color: var(--blue)
}

/* ===== TABLET (768px) ===== */
@media(max-width:768px) {
  .auth-screen { flex-direction: column; min-height: 100vh }
  .auth-left { width: 100%; min-width: 0; border-right: none; padding: 2rem 1.5rem; flex: 1 }
  .auth-right { min-height: 220px; padding: 2rem 1.5rem }
  .hero-headline h1 { font-size: 2rem }

  .sidebar {
    position: fixed; top: var(--nav-h); left: 0; bottom: 0;
    z-index: 90; transform: translateX(-100%); transition: transform .25s ease
  }
  .sidebar.open { transform: translateX(0) }

  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; top: var(--nav-h);
    background: rgba(0,0,0,.55); z-index: 89; backdrop-filter: blur(4px)
  }
  .sidebar-backdrop.visible { display: block }

  .main-content { margin-left: 0 !important; max-width: 100% }
  .marketplace-grid { grid-template-columns: 1fr 1fr }
  .input-row { flex-direction: column }
  .nav-left { min-width: auto }
}

/* ===== MOBILE (640px) — bottom nav appears ===== */
@media(max-width:640px) {
  .mobile-bottom-nav { display: flex !important }
  .app-layout { padding-bottom: var(--bottom-nav-h) }

  #toast-container {
    bottom: calc(var(--bottom-nav-h) + .75rem);
    right: .75rem; left: .75rem
  }
  .toast { min-width: auto; max-width: 100% }
}

/* ===== MOBILE (560px) ===== */
@media(max-width:560px) {
  .auth-right { display: none }
  .auth-left { min-height: 100vh; padding: 2rem 1.25rem; justify-content: flex-start; padding-top: 3rem }
  .auth-logo { margin-bottom: 1.5rem }
  .otp-box { width: 40px; height: 50px; font-size: 1.3rem }
  .nav-search { display: none }
  .nav-left { min-width: auto }
  .nav-logo-text { font-size: .95rem }
  .marketplace-grid, .resources-grid { grid-template-columns: 1fr }
  .admin-stats { grid-template-columns: 1fr 1fr }
  .feature-cards { grid-template-columns: 1fr 1fr }

  .post-card { padding: 1rem; overflow: hidden; max-width: 100vw; box-sizing: border-box }
  .post-card img, .post-card video {
    max-width: 100% !important; height: auto !important;
    max-height: 350px; object-fit: contain; border-radius: 8px
  }

  .main-content { padding: 1rem .85rem }
  .page-title { font-size: 1.25rem }

  .sort-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; scrollbar-width: none; -ms-overflow-style: none
  }
  .sort-tabs::-webkit-scrollbar { display: none }
  .sort-tab { white-space: nowrap; flex-shrink: 0 }

  .admin-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; scrollbar-width: none
  }
  .admin-tabs::-webkit-scrollbar { display: none }
  .admin-tab { white-space: nowrap; flex-shrink: 0 }

  .data-table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.04)
  }
  .data-table { min-width: 600px }

  .flagged-item { flex-wrap: wrap; align-items: flex-start }
  .flagged-actions { flex-direction: row; width: 100%; margin-top: .6rem }
  .admin-header { flex-wrap: wrap; gap: .65rem }

  .post-footer {
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none
  }
  .post-footer::-webkit-scrollbar { display: none }

  /* Modal becomes bottom sheet */
  .modal-container {
    width: 100%; max-width: 100%; max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
    bottom: 0; top: auto; left: 0; right: 0; transform: none;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    animation: mobileSlideUp .25s cubic-bezier(.4,0,.2,1) forwards
  }
  .modal-container.modal-closing {
    animation: mobileSlideDown .2s cubic-bezier(.4,0,.2,1) forwards
  }

  @keyframes mobileSlideUp {
    from { opacity: 0; transform: translateY(100%) }
    to { opacity: 1; transform: translateY(0) }
  }
  @keyframes mobileSlideDown {
    from { opacity: 1; transform: translateY(0) }
    to { opacity: 0; transform: translateY(100%) }
  }

  .modal-container img { max-height: 50vh !important; object-fit: contain !important }
  .modal-container video { max-height: 40vh !important }

  .filter-bar {
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px
  }
  .filter-bar::-webkit-scrollbar { display: none }
  .filter-chip { font-size: .75rem; padding: .3rem .7rem; white-space: nowrap; flex-shrink: 0 }

  .notif-panel { right: .5rem; left: .5rem; width: auto }
  .profile-menu { width: calc(100vw - 1rem); right: -.5rem }
  .hero-banner { padding: 1.25rem 1.1rem }
  .hero-banner h2 { font-size: 1.15rem }
  .sidebar-stats { flex-wrap: wrap }
  .create-post-area { padding: .85rem }
}

/* ===== VERY SMALL PHONES (380px) ===== */
@media(max-width:380px) {
  .auth-left { padding: 1.5rem 1rem }
  .otp-box { width: 36px; height: 46px; font-size: 1.15rem }
  .otp-inputs { gap: .35rem }
  .hero-headline h1 { font-size: 1.6rem }
  .main-content { padding: .85rem .65rem }
  .admin-stats { grid-template-columns: 1fr 1fr }
  .admin-stat-card { padding: .85rem }
  .admin-stat-number { font-size: 1.5rem }
}

/* Sidebar backdrop */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(0,0,0,.55); z-index: 89; backdrop-filter: blur(4px)
}

/* Fun Zone carousel */
.fun-carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: 1.25rem; padding: 0.25rem 0 0.75rem
}
.fun-card {
  min-width: 85%; max-width: 85%; scroll-snap-align: center;
  border-radius: 20px; padding: 1.5rem 1.75rem; color: #f9fafb
}
.fun-card.cipher { background: radial-gradient(circle at top left,#22c55e,#0f172a) }
.fun-card.trivia { background: linear-gradient(135deg,#7c3aed,#f97316) }
.fun-card.poll { background: linear-gradient(135deg,#0f766e,#22c55e) }

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 .5rem;
  padding-bottom: env(safe-area-inset-bottom)
}

.mobile-bottom-nav-inner {
  display: flex; align-items: stretch; height: 100%; justify-content: space-around
}

.mob-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 1; padding: .35rem .2rem; border-radius: 10px;
  color: var(--text3); font-size: .58rem; font-weight: 600;
  letter-spacing: .02em; transition: all var(--t); text-transform: uppercase
}

.mob-nav-btn:hover, .mob-nav-btn.active { color: var(--blue) }
.mob-nav-btn svg { width: 20px; height: 20px; transition: transform var(--t) }
.mob-nav-btn.active svg { transform: scale(1.12) }
.mob-nav-icon { font-size: 1.2rem; line-height: 1 }

input[placeholder="Message..."],
textarea[placeholder="Message..."],
.message-content, .message-bubble, .chat-text, .chat-message {
  color: var(--text) !important
}

#dm-layout-wrapper {
  display: grid; grid-template-columns: 280px 1fr; gap: 1rem;
  height: calc(100vh - 180px)
}
@media (max-width: 768px) {
  #dm-layout-wrapper {
    grid-template-columns: 1fr; grid-template-rows: 150px 1fr;
    height: calc(100vh - 120px)
  }
}

.responsive-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem }
@media (max-width: 768px) { .responsive-2col { grid-template-columns: 1fr } }

/* ===== MOBILE CALENDAR FIX ===== */
.calendar-scroll-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px }
@media (max-width: 768px) { .calendar-grid { min-width: 650px } }

/* ===== DARK THEME COMPONENT OVERRIDES ===== */
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
  background: var(--bg3);
  color: var(--text) !important;
  border-color: rgba(255,255,255,0.06)
}

body.dark-theme .modal-container,
body.dark-theme .toast { background: var(--bg3) }

body.dark-theme .message-bubble,
body.dark-theme .chat-text { color: #ffffff !important }

body.dark-theme .btn-primary,
body.dark-theme .admin-badge,
body.dark-theme .admin-tab.active,
body.dark-theme .tab-btn.active {
  background: var(--blue) !important;
  color: #ffffff !important;
  border: none !important
}

body.dark-theme .admin-tab,
body.dark-theme .tab-btn { color: var(--text2) !important }

body.dark-theme .btn-secondary {
  background: var(--bg3) !important;
  color: var(--text) !important;
  border-color: rgba(255,255,255,0.06) !important
}

body.dark-theme .navbar {
  background: rgba(0, 0, 0, .85) !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important
}

body.dark-theme .nav-search input,
body.dark-theme input[type="search"] {
  background: var(--bg3) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255,255,255,0.04) !important
}

body.dark-theme .auth-tab.active,
body.dark-theme .sort-tab.active {
  background: var(--blue) !important;
  color: #ffffff !important
}

body.dark-theme .auth-tab,
body.dark-theme .sort-tab {
  color: var(--text3) !important;
  background: transparent !important
}

body.dark-theme .mobile-bottom-nav {
  background: rgba(10, 10, 10, .95) !important;
  border-top-color: rgba(255,255,255,0.04) !important
}

body.dark-theme .mob-nav-btn { color: var(--text3) }
body.dark-theme .mob-nav-btn.active { color: var(--blue) }

body.dark-theme .auth-right {
  background: linear-gradient(-45deg, #000000, #0A0A0A, #0F1419, #000000);
  background-size: 400% 400%
}
body.dark-theme .auth-right::before { background: rgba(59, 130, 246, 0.15) }
body.dark-theme .auth-right::after { background: rgba(139, 92, 246, 0.10) }

body.dark-theme .auth-left { background: var(--bg2) }
body.dark-theme .sidebar { background: var(--bg2) }

/* Real-time notification pulse animation */
@keyframes notifPulse {
  0% { transform: scale(1) }
  30% { transform: scale(1.4) }
  60% { transform: scale(0.9) }
  100% { transform: scale(1) }
}
.pulse-animation { animation: notifPulse 0.5s ease-out }

.skeleton-card {
  width: 100%; height: 140px;
  background: linear-gradient(90deg, var(--card) 25%, var(--bg3) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite ease-in-out;
  border-radius: 18px; margin-bottom: 1rem; border: none
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0 }
  100% { background-position: -200% 0 }
}

/* === BUTTER-SMOOTH OPTIMIZATIONS === */
/* Post card subtle entrance */
.post-card { animation: cardFadeIn .25s ease both }
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px) }
  to { opacity: 1; transform: translateY(0) }
}

.post-card:nth-child(2) { animation-delay: .04s }
.post-card:nth-child(3) { animation-delay: .08s }
.post-card:nth-child(4) { animation-delay: .12s }
.post-card:nth-child(5) { animation-delay: .16s }

.qa-card { animation: cardFadeIn .25s ease both }
.qa-card:nth-child(2) { animation-delay: .04s }
.qa-card:nth-child(3) { animation-delay: .08s }
.listing-card { animation: cardFadeIn .25s ease both }
.comment-item { animation: cardFadeIn .2s ease both }

#main-content { animation: contentFadeIn .15s ease }
@keyframes contentFadeIn {
  from { opacity: 0.6 }
  to { opacity: 1 }
}

.post-action-btn:active,
.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.96) !important;
  transition: transform .08s ease !important
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .qa-card, .listing-card, .comment-item { animation: none }
  .modal-container, .modal-overlay { animation-duration: .01s }
}

/* Hardware acceleration */
.calendar-scroll-wrap, #main-content {
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0)
}

#sidebar {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-height: 100vh !important;
  overscroll-behavior: contain
}

.post-card, .qa-card, .listing-card, .resource-card {
  content-visibility: auto;
  contain-intrinsic-size: 250px;
  will-change: transform, opacity
}

img { content-visibility: auto }

/* Auth animations */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-30px) }
  to { opacity: 1; transform: translateX(0) }
}

@keyframes bgBreathe {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) }
  100% { transform: translate(40px, 50px) }
}

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

/* ==========================================
   DAILY QUIZ STYLES
   ========================================== */
.quiz-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.75rem }
.quiz-main { min-width: 0 }
.quiz-sidebar {
  background: var(--card); border-radius: 20px; padding: 1.5rem;
  border: none; position: sticky; top: 80px; max-height: calc(100vh - 100px);
  overflow-y: auto; scrollbar-width: thin
}
.quiz-sidebar-title { font-weight: 800; font-size: 1rem; color: var(--text); margin-bottom: 1.25rem }
.quiz-card {
  background: var(--card); border-radius: 22px; padding: 2.25rem;
  border: none; animation: fadeInUp 0.4s ease;
  position: relative; overflow: hidden
}
.quiz-locked-card { text-align: center; padding: 3.5rem 2.25rem }
.quiz-locked-icon { font-size: 4rem; animation: quizPulse 2s ease infinite }
.quiz-countdown { display: flex; justify-content: center; gap: 4px; margin-top: 1.75rem }
.quiz-countdown-num {
  background: linear-gradient(135deg, var(--blue), var(--purple)); color: white;
  font-size: 2rem; font-weight: 800; padding: 0.5rem 0.8rem;
  border-radius: 14px; min-width: 48px; text-align: center;
  font-variant-numeric: tabular-nums
}
.quiz-countdown-sep { font-size: 2rem; font-weight: 800; color: var(--text3); align-self: center }
.quiz-progress-wrap { margin-bottom: 1.5rem }
.quiz-progress-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text3); margin-bottom: 0.4rem; font-weight: 500 }
.quiz-progress-bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); border-radius: 3px; transition: width 0.5s ease }
.quiz-dept-badge {
  display: inline-block; background: rgba(139,92,246,0.12); color: #a78bfa;
  font-weight: 700; font-size: 0.8rem; padding: 6px 16px; border-radius: 24px;
  border: none; margin-bottom: 1.25rem
}
.quiz-question-text { color: var(--text); font-size: 1.15rem; font-weight: 700; line-height: 1.6; margin-bottom: 1.5rem }
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem }
.quiz-option {
  display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.2rem;
  background: var(--bg3); border: 2px solid transparent; border-radius: 16px;
  cursor: pointer; font-size: 0.92rem; color: var(--text); text-align: left;
  transition: all 0.2s ease; font-weight: 500; width: 100%
}
.quiz-option:hover { border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.06); transform: translateX(4px) }
.quiz-opt-letter {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
  background: rgba(59,130,246,0.12); color: var(--blue)
}
.quiz-opt-correct {
  border-color: #10b981 !important; background: rgba(16,185,129,0.1) !important;
  animation: quizCorrectPop 0.4s ease
}
.quiz-opt-correct .quiz-opt-letter { background: #10b981; color: white }
.quiz-opt-wrong {
  border-color: #ef4444 !important; background: rgba(239,68,68,0.1) !important;
  animation: quizWrongShake 0.4s ease
}
.quiz-opt-wrong .quiz-opt-letter { background: #ef4444; color: white }
.quiz-explanation {
  margin-top: 1.25rem; padding: 1.15rem 1.35rem; border-radius: 16px;
  background: rgba(59,130,246,0.05); border: 1px solid rgba(59,130,246,0.1);
  animation: quizSlideDown 0.4s ease
}
.quiz-exp-header { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 0.4rem }
.quiz-exp-body { font-size: 0.88rem; color: var(--text2); line-height: 1.6 }
.quiz-next-btn { transition: all 0.3s ease }
.quiz-score-tracker {
  position: absolute; top: 1.5rem; right: 1.75rem; font-size: 0.85rem; color: var(--text3); font-weight: 500
}
.quiz-score-ring { width: 140px; height: 140px; margin: 1rem auto }
.quiz-score-ring-lg { width: 180px; height: 180px }
.quiz-ring-anim { animation: quizRingDraw 1.5s ease forwards }
.quiz-coins-earned {
  margin-top: 1.25rem; display: inline-block;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(139,92,246,0.12));
  color: #f59e0b; font-weight: 800; padding: 0.7rem 1.6rem; border-radius: 30px;
  font-size: 1.1rem; border: 1px solid rgba(245,158,11,0.2)
}
.quiz-results-card { min-height: 400px }
.quiz-confetti { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; z-index: 1 }
.quiz-confetti-piece { position: absolute; top: -10px; border-radius: 2px; animation: quizConfettiFall linear forwards }
.quiz-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.04)
}
.quiz-history-item:last-child { border-bottom: none }
.quiz-hist-date { font-size: 0.8rem; color: var(--text3); font-weight: 500 }
.quiz-hist-score { font-size: 0.9rem; font-weight: 700 }

@keyframes quizPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.1) } }
@keyframes quizBounce { 0% { transform: scale(0.3) } 50% { transform: scale(1.15) } 100% { transform: scale(1) } }
@keyframes quizSlideDown { from { opacity: 0; transform: translateY(-10px); max-height: 0 } to { opacity: 1; transform: translateY(0); max-height: 300px } }
@keyframes quizCorrectPop { 0% { transform: scale(1) } 50% { transform: scale(1.03) } 100% { transform: scale(1) } }
@keyframes quizWrongShake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
@keyframes quizRingDraw { from { stroke-dasharray: 0 389 } }
@keyframes quizConfettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1 }
  100% { transform: translateY(600px) rotate(720deg); opacity: 0 }
}

@media (max-width: 768px) {
  .quiz-layout { grid-template-columns: 1fr }
  .quiz-sidebar { position: static; max-height: none }
  .quiz-card { padding: 1.5rem }
  .quiz-countdown-num { font-size: 1.5rem; padding: 0.4rem 0.6rem }
  .quiz-score-tracker { position: static; text-align: center; margin-top: 1rem }
}

/* ===== DIGITAL DORM — COMPLETE UI ENGINE ===== */
.dorm-dashboard { display: grid; gap: 14px }
.dorm-hero {
  border: 1px solid rgba(59, 130, 246, 0.12);
  background: linear-gradient(140deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.9));
  border-radius: 22px; padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #e2e8f0
}
.dorm-title { font-family: 'Outfit', sans-serif; font-size: 1.3rem; margin: 0; letter-spacing: 0.3px }
.dorm-subtitle { margin: 4px 0 0; color: rgba(226, 232, 240, 0.6); font-size: 0.84rem }
.dorm-coin-counter {
  position: relative; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px; padding: 8px 16px; font-weight: 800; color: #fcd34d;
  min-width: 100px; text-align: center; font-size: 0.95rem
}
.dorm-coin-fx {
  position: absolute; right: 6px; top: -14px; color: #fca5a5; font-size: 0.72rem;
  animation: dormCoinFloat 0.9s ease forwards
}
.dorm-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px }

.dorm-world-card {
  border-radius: 22px; border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(170deg, rgba(10, 10, 10, 0.9), rgba(20, 20, 20, 0.8));
  backdrop-filter: blur(12px)
}
.dorm-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px 8px
}
.dorm-mode-chip {
  font-size: 0.75rem; font-weight: 700; color: #e2e8f0;
  border: 1px dashed rgba(255,255,255,0.1); border-radius: 999px;
  padding: 6px 12px; background: rgba(0, 0, 0, 0.4)
}
.dorm-clear-mode {
  background: rgba(59, 130, 246, 0.12); color: #93c5fd; border-radius: 10px;
  padding: 7px 12px; font-size: 0.74rem; font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.2); transition: all 0.2s ease; cursor: pointer
}
.dorm-clear-mode:hover { background: rgba(59, 130, 246, 0.2) }

.dorm-world {
  position: relative; min-height: 420px; margin: 0 12px 12px;
  border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #141414, #000000);
  border: 1px solid rgba(255,255,255,0.04)
}
.dorm-world.loading { display: grid; place-items: center; color: var(--text3); font-weight: 600 }

.dorm-particles-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10 }
.dorm-particle {
  position: absolute; width: 7px; height: 7px; border-radius: 3px;
  animation: dormParticleBurst 0.8s cubic-bezier(0.21, 0.95, 0.35, 1) forwards
}

.dorm-right-stack { display: grid; gap: 12px; grid-template-rows: auto 1fr }
.dorm-shop-card {
  border-radius: 22px; border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(170deg, rgba(10, 10, 10, 0.9), rgba(20, 20, 20, 0.8));
  backdrop-filter: blur(12px); padding: 14px;
  display: grid; grid-template-rows: auto auto 1fr; gap: 10px; max-height: 640px
}
.dorm-shop-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px }
.dorm-tab {
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0, 0, 0, 0.4); font-size: 0.72rem; font-weight: 700;
  padding: 8px 4px; color: var(--text3); cursor: pointer; transition: all 0.2s ease;
  text-align: center
}
.dorm-tab.active {
  color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple));
  border-color: transparent
}
.dorm-tab:hover:not(.active) { background: rgba(255,255,255,0.04); color: var(--text2) }

.dorm-faucet {
  border: 1px solid rgba(16, 185, 129, 0.15); border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(59, 130, 246, 0.03));
  padding: 10px; display: grid; gap: 6px
}
.dorm-faucet-title {
  font-size: 0.72rem; color: #34d399; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.4px
}
.dorm-faucet-btn {
  border-radius: 10px; border: 1px solid rgba(16, 185, 129, 0.15);
  background: rgba(0, 0, 0, 0.4); padding: 7px 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.74rem; font-weight: 700; color: #6ee7b7;
  cursor: pointer; transition: all 0.2s ease
}
.dorm-faucet-btn:hover { background: rgba(16, 185, 129, 0.08) }

.dorm-shop-list { overflow: auto; display: grid; gap: 8px; align-content: start }
.dorm-item-card, .dorm-outfit-card {
  border: 1px solid rgba(255,255,255,0.05); border-radius: 14px;
  background: rgba(0, 0, 0, 0.4); padding: 10px;
  display: grid; gap: 6px; animation: dormFadeIn 0.3s ease
}
.dorm-item-head { display: flex; align-items: center; gap: 10px }
.dorm-item-name { font-size: 0.82rem; font-weight: 800; color: #e2e8f0 }
.dorm-item-meta, .dorm-item-desc { font-size: 0.72rem; color: var(--text3) }
.dorm-item-preview {
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0
}
.dorm-item-preview-bed { background: linear-gradient(140deg, #e2e8f0, #94a3b8) }
.dorm-item-preview-sofa { background: linear-gradient(140deg, #fecaca, #fda4af) }
.dorm-item-preview-table { background: linear-gradient(140deg, #fcd9b8, #d97706) }
.dorm-item-preview-chair { background: linear-gradient(140deg, #fef3c7, #f59e0b) }
.dorm-item-preview-screen { background: linear-gradient(140deg, #334155, #0f172a) }
.dorm-item-preview-bath { background: linear-gradient(140deg, #e0f2fe, #7dd3fc) }
.dorm-item-preview-plant { background: linear-gradient(140deg, #dcfce7, #22c55e) }
.dorm-item-preview-storage { background: linear-gradient(140deg, #e7e5e4, #78716c) }
.dorm-item-preview-decor, .dorm-item-preview-furniture { background: linear-gradient(140deg, #dbeafe, #60a5fa) }
.dorm-item-preview-light { background: linear-gradient(140deg, #fef9c3, #facc15) }
.dorm-item-preview-window { background: linear-gradient(140deg, #bae6fd, #38bdf8) }

.dorm-item-actions { display: grid; gap: 5px }
.dorm-item-action {
  border-radius: 10px; border: none; font-size: 0.74rem; font-weight: 800; padding: 8px;
  background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff;
  cursor: pointer; transition: all 0.2s ease
}
.dorm-item-action:hover { filter: brightness(1.1); transform: translateY(-1px) }
.dorm-item-action.owned { background: linear-gradient(135deg, #059669, #0d9488) }
.dorm-item-action.refund { background: linear-gradient(135deg, #333, #222); color: #e2e8f0 }

.dorm-empty, .dorm-error {
  text-align: center; border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.08); padding: 14px;
  color: var(--text3); font-size: 0.8rem
}

.dorm-avatar-card {
  border-radius: 22px; border: 1px solid rgba(59, 130, 246, 0.15);
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.92));
  color: #e2e8f0; padding: 22px
}
.dorm-avatar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px }
.dorm-avatar-title { font-weight: 800; font-size: 0.92rem }
.dorm-avatar-edit {
  background: rgba(59, 130, 246, 0.12); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px; padding: 6px 12px; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s
}
.dorm-avatar-edit:hover { background: rgba(59, 130, 246, 0.2) }
.dorm-avatar-stage {
  height: 240px; border-radius: 16px; margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.08), transparent 50%), #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden
}
.dorm-avatar-meta { font-size: 0.72rem; color: var(--text3); display: grid; gap: 2px }

.dorm-wardrobe-lock {
  text-align: center; padding: 18px; border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.08)
}
.dorm-lock-icon { font-size: 2.5rem; margin-bottom: 6px }
.dorm-slot-pill {
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0, 0, 0, 0.4); font-size: 0.68rem; font-weight: 700;
  padding: 6px 8px; color: var(--text3); cursor: pointer; transition: all 0.2s
}
.dorm-slot-pill.active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; border-color: transparent
}

.dorm-room-custom-section { margin-bottom: 10px }
.dorm-room-custom-title { font-size: 0.78rem; font-weight: 800; color: #e2e8f0; margin-bottom: 8px }
.dorm-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px }
.dorm-style-swatch {
  border-radius: 10px; cursor: pointer; aspect-ratio: 1; position: relative;
  border: 2px solid transparent; transition: all 0.2s;
  display: grid; place-items: center; overflow: hidden
}
.dorm-style-swatch.active { border-color: var(--blue); box-shadow: 0 0 12px rgba(59, 130, 246, 0.2) }
.swatch-name { font-size: 0.55rem; font-weight: 700; color: rgba(255,255,255,0.8); text-shadow: 0 1px 3px rgba(0,0,0,0.5) }
.dorm-skin-grid { display: flex; gap: 8px; flex-wrap: wrap }
.dorm-skin-dot {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s
}
.dorm-skin-dot.active { border-color: var(--blue); transform: scale(1.15) }
.dorm-hair-grid { display: flex; flex-wrap: wrap; gap: 6px }
.dorm-hair-chip {
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0, 0, 0, 0.4); font-size: 0.68rem; font-weight: 700;
  padding: 6px 10px; color: var(--text3); cursor: pointer; transition: all 0.2s
}
.dorm-hair-chip.active { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; border-color: transparent }
.dorm-color-grid { display: flex; gap: 8px; flex-wrap: wrap }
.dorm-color-dot {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s
}
.dorm-color-dot.active { border-color: var(--blue); transform: scale(1.15) }
.dorm-appearance-section { display: grid; gap: 12px }

@keyframes dormFadeIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }
@keyframes dormCoinFloat { 0% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(-24px) } }
@keyframes dormParticleBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1) }
  100% { opacity: 0; transform: translate(var(--tx, 30px), var(--ty, -40px)) scale(0.3) }
}

/* --- 3D Avatar Character (CSS fallback) --- */
.dorm-avatar-character { position: relative; width: 140px; height: 180px; transform-style: preserve-3d }
.dorm-avatar-shadow {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 70px; height: 14px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent 80%)
}
.dorm-avatar-head {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  width: 52px; height: 56px; border-radius: 46% 46% 40% 40%;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1); z-index: 5
}
.dorm-avatar-hair-top, .dorm-avatar-hair-back {
  background: var(--hair-color);
  position: absolute; left: 50%; transform: translateX(-50%);
  transition: all 0.3s ease; z-index: 6
}
.dorm-avatar-hair-top { top: 4px; width: 62px; height: 36px; border-radius: 22px 22px 12px 12px }
.dorm-avatar-hair-back { top: 10px; width: 60px; height: 50px; border-radius: 22px; z-index: 2 }
.dorm-avatar-hat {
  position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  width: 58px; height: 20px; border-radius: 14px 14px 6px 6px;
  z-index: 10; border: 1px solid rgba(255, 255, 255, 0.15)
}
.dorm-avatar-ears {
  position: absolute; left: 50%; top: 30px; width: 60px; height: 16px;
  transform: translateX(-50%)
}
.dorm-avatar-ears::before, .dorm-avatar-ears::after {
  content: ''; position: absolute; width: 10px; height: 14px; border-radius: 50%;
  background: var(--ear-color)
}
.dorm-avatar-ears::before { left: 0 }
.dorm-avatar-ears::after { right: 0 }
.dorm-avatar-eyes {
  position: absolute; left: 50%; top: 38px; width: 30px; transform: translateX(-50%);
  display: flex; justify-content: space-between; z-index: 7
}
.dorm-avatar-eyes::before, .dorm-avatar-eyes::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #1e293b; border: 1px solid rgba(255,255,255,0.1)
}
.dorm-avatar-brows {
  position: absolute; left: 50%; top: 33px; width: 32px; transform: translateX(-50%);
  display: flex; justify-content: space-between; z-index: 8
}
.dorm-avatar-brows::before, .dorm-avatar-brows::after { content: ''; width: 10px; height: 3px; border-radius: 2px }
.dorm-avatar-nose {
  position: absolute; left: 50%; top: 48px; transform: translateX(-50%);
  width: 6px; height: 10px; border-radius: 3px; background: rgba(0,0,0,0.15); z-index: 7
}
.dorm-avatar-mouth {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%);
  width: 14px; height: 4px; border-radius: 0 0 10px 10px;
  border-bottom: 2px solid rgba(0,0,0,0.2); z-index: 7
}
.dorm-avatar-specs {
  position: absolute; left: 50%; top: 36px; transform: translateX(-50%);
  width: 36px; height: 12px; border: 2px solid; border-radius: 20px; z-index: 8;
  background: rgba(255,255,255,0.1)
}
.dorm-avatar-hoodie {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%);
  width: 84px; height: 60px; border-radius: 20px 20px 10px 10px;
  display: grid; place-items: center; z-index: 4
}
.dorm-avatar-hoodie span { font-size: 0.5rem; font-weight: 900; opacity: 0.8 }
.dorm-avatar-arms {
  position: absolute; left: 50%; top: 75px; transform: translateX(-50%);
  width: 110px; height: 40px; border-radius: 20px; z-index: 3; filter: brightness(0.9)
}
.dorm-avatar-watch {
  position: absolute; left: 14px; top: 92px; width: 12px; height: 12px;
  border-radius: 50%; z-index: 5; border: 2px solid rgba(255,255,255,0.2)
}
.dorm-avatar-pants {
  position: absolute; left: 50%; top: 128px; transform: translateX(-50%);
  width: 70px; height: 32px; border-radius: 8px; z-index: 3
}
.dorm-avatar-shoes {
  position: absolute; left: 50%; top: 154px; transform: translateX(-50%);
  width: 76px; height: 12px; border-radius: 999px; z-index: 2
}

/* --- Dynamic Hairstyles --- */
.hair-style-short_crew .dorm-avatar-hair-top { width: 44px; height: 20px; border-radius: 8px 8px 16px 16px; top: 2px }
.hair-style-short_crew .dorm-avatar-hair-back { display: none }
.hair-style-medium_wavy .dorm-avatar-hair-top { width: 52px; height: 40px; border-radius: 20px }
.hair-style-medium_wavy .dorm-avatar-hair-back { width: 62px; height: 65px; border-radius: 20px; top: 10px }
.hair-style-long_straight .dorm-avatar-hair-top { width: 50px; height: 20px; border-radius: 24px 24px 0 0 }
.hair-style-long_straight .dorm-avatar-hair-back { width: 60px; height: 100px; border-radius: 24px 24px 10px 10px; top: 10px }
.hair-style-curly_afro .dorm-avatar-hair-top { width: 70px; height: 60px; border-radius: 50%; top: -10px; box-shadow: 10px 0 0 var(--hair-color), -10px 0 0 var(--hair-color) }
.hair-style-curly_afro .dorm-avatar-hair-back { width: 70px; height: 70px; border-radius: 50%; top: -5px }
.hair-style-buzz_cut .dorm-avatar-hair-top { width: 46px; height: 14px; border-radius: 20px 20px 8px 8px; top: 6px }
.hair-style-buzz_cut .dorm-avatar-hair-back { display: none }
.hair-style-side_swept .dorm-avatar-hair-top { width: 54px; height: 35px; border-radius: 30px 10px 10px 30px; top: 2px; left: 45% }
.hair-style-side_swept .dorm-avatar-hair-back { width: 54px; height: 50px; border-radius: 20px }
.hair-style-ponytail .dorm-avatar-hair-top { width: 48px; height: 26px; border-radius: 24px; top: 4px }
.hair-style-ponytail .dorm-avatar-hair-back { width: 22px; height: 65px; border-radius: 11px; top: 15px; left: 70%; transform: rotate(-15deg) }
.hair-style-bun_top .dorm-avatar-hair-top { width: 50px; height: 26px; border-radius: 24px; top: 4px }
.hair-style-bun_top .dorm-avatar-hair-back { width: 28px; height: 28px; border-radius: 50%; top: -12px }
.hair-style-mohawk .dorm-avatar-hair-top { width: 14px; height: 40px; border-radius: 7px; top: -15px; border: 2px solid rgba(0,0,0,0.1) }
.hair-style-mohawk .dorm-avatar-hair-back { display: none }

.dorm-avatar-name-tag {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd; padding: 2px 8px; border-radius: 999px;
  font-size: 0.6rem; font-weight: 700; white-space: nowrap;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; z-index: 20
}
.dorm-avatar-meta { display: grid; gap: 3px; margin-top: 8px; color: var(--text3); font-size: 0.72rem }

.dorm-name-input-row { display: flex; gap: 6px; margin-top: 8px }
.dorm-name-input-row input {
  flex: 1; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0; border-radius: 10px; padding: 6px 10px; font-size: 0.78rem;
  font-family: 'Outfit', sans-serif
}
.dorm-name-input-row button {
  background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff;
  border: none; border-radius: 10px; padding: 6px 14px;
  font-size: 0.72rem; font-weight: 800; cursor: pointer
}

.dorm-wardrobe-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px }
.dorm-outfit-name { text-align: center; font-size: 0.78rem; font-weight: 700; color: #e2e8f0 }
.dorm-cloth-swatch {
  width: 100%; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.55rem; font-weight: 800; display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.85); text-transform: uppercase; letter-spacing: 0.4px
}

@media (max-width: 980px) {
  .dorm-layout { grid-template-columns: 1fr }
  .dorm-world { min-height: 350px }
  .dorm-shop-card { max-height: none }
}
@media (max-width: 640px) {
  .dorm-hero { flex-direction: column; align-items: flex-start }
  .dorm-shop-tabs { grid-template-columns: repeat(2, 1fr) }
  .dorm-world { min-height: 300px }
  .dorm-right-stack { grid-template-rows: auto auto }
  .dorm-avatar-stage { height: 180px }
  .dorm-style-grid { grid-template-columns: repeat(3, 1fr) }
  .dorm-avatar-character { transform: scale(0.85) }
}

/* ==========================================
   LEGAL AID — DIGITAL LAW LIBRARY
   ========================================== */
.legal-search-wrap { margin-bottom: 1.5rem }

.legal-search-box {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--card); border: 2px solid rgba(255,255,255,0.06);
  border-radius: 18px; padding: 0.95rem 1.3rem; transition: all var(--t)
}

.legal-search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08)
}

.legal-search-box svg { color: var(--text3); flex-shrink: 0 }

.legal-search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  color: var(--text); font-size: 0.92rem; font-family: inherit
}

.legal-search-box input::placeholder { color: var(--text3) }

.legal-cats-bar {
  display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem;
  margin-bottom: 1.25rem; scrollbar-width: none; -ms-overflow-style: none
}
.legal-cats-bar::-webkit-scrollbar { display: none }

.legal-cat-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.48rem 1.1rem; border-radius: 24px; font-size: 0.78rem;
  font-weight: 600; white-space: nowrap; background: var(--card);
  border: 1px solid rgba(255,255,255,0.06); color: var(--text2);
  cursor: pointer; transition: all var(--t)
}

.legal-cat-chip:hover {
  border-color: var(--blue); color: var(--blue);
  background: rgba(59,130,246,0.04)
}

.legal-cat-chip.active {
  background: var(--blue); color: white; border-color: var(--blue)
}

.legal-results-info { font-size: 0.8rem; color: var(--text3); margin-bottom: 1.25rem; padding-left: 2px }

.legal-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem }

.legal-card {
  background: var(--card); border: none; border-radius: var(--radius);
  overflow: hidden; transition: all var(--t)
}

.legal-card:hover { background: var(--card-hover); transform: translateY(-2px) }

.legal-card-header {
  padding: 0.85rem 1.2rem; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 0.5rem
}

.legal-card-cat {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text3);
  display: flex; align-items: center; gap: 0.35rem
}

.legal-card-section { font-size: 0.78rem; font-weight: 800; font-family: 'Outfit', sans-serif }

.legal-card-body { padding: 1.2rem 1.3rem 1.35rem }

.legal-card-title {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800;
  color: var(--text); margin-bottom: 0.65rem; line-height: 1.35
}

.legal-card-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.7; margin-bottom: 0.8rem }

.legal-tag-block {
  border-radius: 12px; padding: 0.9rem 1.1rem; margin-top: 0.8rem;
  font-size: 0.82rem; line-height: 1.65; color: var(--text)
}

.legal-tag-label {
  font-weight: 700; font-size: 0.72rem; margin-bottom: 0.4rem;
  text-transform: uppercase; letter-spacing: 0.04em
}

.legal-tag-penalty { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.1) }
.legal-tag-penalty .legal-tag-label { color: var(--red) }

.legal-tag-procedure { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.1) }
.legal-tag-procedure .legal-tag-label { color: var(--green) }

.legal-tag-case { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.1) }
.legal-tag-case .legal-tag-label { color: var(--blue) }

.legal-steps { display: flex; flex-direction: column; gap: 0.35rem }
.legal-step { padding-left: 0.5rem; border-left: 2px solid rgba(16,185,129,0.2); font-size: 0.82rem; line-height: 1.6 }

@media (max-width: 768px) {
  .legal-search-box { padding: 0.75rem 1.1rem }
  .legal-card-body { padding: 1rem 1.1rem 1.1rem }
}

/* ===== CARD-LEVEL INLINE STYLES OVERRIDE ===== */
/* Ensure inline styles from JS use our theme */
.card {
  background: var(--card) !important;
  border: none !important;
  border-radius: var(--radius) !important
}

/* Ensure all btn-spinner works */
.btn-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block
}
@keyframes spin { to { transform: rotate(360deg) } }

/* Skill pills */
.skill-pill {
  display: inline-block;
  background: var(--bg3);
  color: var(--text);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}
.skill-pill:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  transform: translateY(-1px);
}

/* ==========================================
   DIGITAL CAMPUS ID ENGINE & WALLET
   ========================================== */

/* Fullscreen ID Container */
#digital-id-fullscreen {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #09090b;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* 60-Second Overlay Timer */
#claim-countdown-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

#claim-countdown-overlay.hidden { display: none !important; }

.countdown-timer-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 5rem;
  font-weight: 800;
  color: #ef4444;
  text-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
  margin-bottom: 1rem;
}

/* Holographic Parallax Card */
.digital-id-card {
  position: relative;
  width: 90%;
  max-width: 400px;
  aspect-ratio: 1 / 1.6;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 24px;
  overflow: hidden;
  color: white;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease-out; /* Gyro smoothing */
}

/* Dual-Tone Gate Border */
.gate-code-border {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 4px solid transparent;
  border-radius: 24px;
  pointer-events: none;
  z-index: 10;
}

/* Dynamic Watermark */
.watermark-layer {
  position: absolute;
  top: 0; left: 0; width: 200%; height: 200%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.2rem;
  font-weight: 800;
  white-space: pre;
  transform: rotate(-35deg);
  animation: watermark-drift 40s linear infinite;
}

@keyframes watermark-drift {
  0% { transform: rotate(-35deg) translateY(0) translateX(0); }
  100% { transform: rotate(-35deg) translateY(-50%) translateX(-50%); }
}

/* Chrono Clock */
.chrono-clock {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(0,0,0,0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  margin-bottom: 1rem;
  text-align: center;
}

/* Parallax Background Orbs */
.hologram-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
  transition: transform 0.1s ease-out;
}
.orb-1 { top: -20%; right: -20%; width: 200px; height: 200px; background: rgba(59, 130, 246, 0.4); }
.orb-2 { bottom: -20%; left: -20%; width: 150px; height: 150px; background: rgba(139, 92, 246, 0.4); }

/* QR Code Secure Container */
.qr-secure-box {
  background: white;
  padding: 1rem;
  border-radius: 16px;
  text-align: center;
  align-self: center;
  margin-top: auto;
  margin-bottom: 1rem;
  z-index: 5;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Close Button */
.close-id-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999999;
}

/* Wallet Card Tab UI */
.offers-tab-bar {
  display: flex; gap: 1rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.offer-tab {
  background: none; border: none; padding: 0.75rem 1rem;
  font-size: 0.95rem; font-weight: 700; color: var(--text3);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.offer-tab.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}

.coin-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
