@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS RESET & VARIABLES */
:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette - Premium Dark Mode */
  --bg-main: #0b0f17;
  --bg-card: rgba(22, 29, 44, 0.55);
  --bg-card-hover: rgba(30, 41, 62, 0.7);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-card-hover: rgba(255, 255, 255, 0.12);
  
  --color-primary: #3b82f6; /* Premium Cobalt Blue */
  --color-warning-red: #f43f5e; /* Premium Coral Red for Triangles */
  --color-regulatory-blue: #0ea5e9; /* Light Blue for mandatory signs */
  --color-success: #10b981; /* Emerald green for Mastered status */
  --color-accent: #8b5cf6; /* Violet for streaks/levels */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Layout */
  --sidebar-width: 260px;
  --nav-height: 72px;
  
  /* Shadow & Blur */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(16px);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
}

/* APP SHELL LAYOUT */
#app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR (Desktop Navigation) */
aside.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-card);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.05);
}

.nav-item i {
  font-size: 1.25rem;
  width: 24px;
}

/* User rank indicator inside sidebar */
.user-profile-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.widget-rank {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  font-weight: 700;
}

.widget-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  border-radius: 3px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* BOTTOM NAVIGATION (Mobile Only) */
nav.mobile-nav {
  display: none;
}

/* MAIN CONTENT AREA */
main.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
}

header.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

h1.page-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* PREMIUM SCREEN SWITCHER */
.app-screen {
  display: none;
  animation: fadeIn 0.4s ease-out;
  flex-grow: 1;
}

.app-screen.active {
  display: flex;
  flex-direction: column;
}

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

/* DASHBOARD CARD GRID */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
}

.stat-card.primary:hover::before { background: var(--color-primary); }
.stat-card.accent:hover::before { background: var(--color-accent); }
.stat-card.warning:hover::before { background: var(--color-warning-red); }
.stat-card.success:hover::before { background: var(--color-success); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card.primary .stat-icon { background: rgba(59, 130, 246, 0.12); color: var(--color-primary); }
.stat-card.accent .stat-icon { background: rgba(139, 92, 246, 0.12); color: var(--color-accent); }
.stat-card.warning .stat-icon { background: rgba(244, 63, 94, 0.12); color: var(--color-warning-red); }
.stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--color-success); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

/* BOX / DECK SYSTEM SECTION */
.deck-overview {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--glass-shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.box-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.box-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: scale(1.02);
}

.box-number {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.box-title {
  font-weight: 600;
  font-size: 1rem;
}

.box-count {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
}

.box-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* CTAS & ACTION BUTTONS */
.btn {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.btn-accent:hover {
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* LEARN TAB: CATEGORIES AND SEARCH */
.search-filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  background: rgba(22, 29, 44, 0.5);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  color: white;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(22, 29, 44, 0.8);
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.category-tab {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.category-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.category-tab.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.3);
}

/* CARDS LISTING */
.sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.sign-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.sign-grid-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
}

.sign-card-img-wrapper {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 0.5rem;
  transition: var(--transition-smooth);
}

.sign-grid-card:hover .sign-card-img-wrapper {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.05);
}

.sign-card-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sign-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.4rem;
  line-height: 1.2rem;
  color: var(--text-primary);
}

.sign-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.sign-card-badge.warning { background: rgba(244, 63, 94, 0.15); color: var(--color-warning-red); }
.sign-card-badge.regulatory { background: rgba(14, 165, 233, 0.15); color: var(--color-regulatory-blue); }
.sign-card-badge.information { background: rgba(59, 130, 246, 0.15); color: var(--color-primary); }

/* FLASHCARD ACTIVE RECALL TEST ENGINE */
.srs-workspace {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 500px;
  margin: 2rem auto;
  width: 100%;
}

.flashcard-wrapper {
  width: 100%;
  perspective: 1000px;
  aspect-ratio: 4 / 5;
  cursor: pointer;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 28px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-card);
}

.flashcard-front {
  background: linear-gradient(145deg, #131a26, #0e131d);
}

.flashcard-back {
  background: linear-gradient(145deg, #0e131d, #131a26);
  transform: rotateY(180deg);
  justify-content: space-between;
}

.flashcard-img-container {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  padding: 1rem;
}

.flashcard-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flashcard-instruction {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  text-align: center;
}

.flashcard-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}

.flashcard-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5rem;
}

.flashcard-srs-tip {
  font-size: 0.8rem;
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
}

.srs-controls {
  display: flex;
  gap: 1rem;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.flashcard.flipped ~ .srs-controls,
.flipped-controls-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.srs-btn {
  flex: 1;
  border: none;
  border-radius: 16px;
  padding: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition-smooth);
  color: white;
}

.srs-btn.fail {
  background: linear-gradient(135deg, #e11d48, var(--color-warning-red));
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.srs-btn.pass {
  background: linear-gradient(135deg, #059669, var(--color-success));
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.srs-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.srs-btn-label {
  font-size: 1rem;
}

.srs-btn-sub {
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 400;
}

/* TIME ATTACK QUIZ ENGINE */
.quiz-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 600px;
  margin: 1.5rem auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.quiz-timer-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-warning-red);
}

.quiz-timer-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-warning-red);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.quiz-score-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.quiz-question-img {
  width: 140px;
  height: 140px;
  margin: 0 auto 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 0.75rem;
}

.quiz-question-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--color-success);
  color: var(--color-success);
}

.quiz-option.incorrect {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--color-warning-red);
  color: var(--color-warning-red);
}

/* SCANNER / SIMULATOR SCREEN */
.scanner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 500px;
  margin: 1.5rem auto;
  text-align: center;
}

.scanner-viewfinder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(22, 29, 44, 0.8), rgba(15, 23, 42, 0.9));
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.scanner-laser {
  position: absolute;
  left: 0;
  top: 10%;
  width: 100%;
  height: 2px;
  background: var(--color-warning-red);
  box-shadow: 0 0 10px var(--color-warning-red);
  animation: scan 2s infinite ease-in-out;
}

@keyframes scan {
  0% { top: 10%; }
  50% { top: 90%; }
  100% { top: 10%; }
}

.scanner-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.scanner-select {
  width: 100%;
  padding: 0.9rem;
  background: rgba(22, 29, 44, 0.8);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  color: white;
  font-family: var(--font-main);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
}

/* MOCK SCAN POPUP */
.scanned-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.scanned-modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--glass-shadow);
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* SETTINGS TAB */
.settings-list {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.settings-title {
  font-weight: 600;
  font-size: 1rem;
}

.settings-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* TOGGLE SWITCH STYLE */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* PREMIUM GATE MODAL */
.premium-lock-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 10, 17, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.premium-lock-modal.active {
  display: flex;
}

.premium-lock-content {
  background: linear-gradient(145deg, #161e2f, #0d121c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: modalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.premium-crown-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: white;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  margin-bottom: 0.5rem;
}

.premium-headline {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.premium-subtext {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5rem;
}

.premium-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin: 0.5rem 0;
  text-align: left;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.premium-feature-item i {
  color: var(--color-success);
  font-size: 1.1rem;
}

.activation-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
}

.activation-input {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: white;
  font-family: var(--font-main);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.activation-input::placeholder {
  letter-spacing: 0px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.activation-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.activation-error {
  color: var(--color-warning-red);
  font-size: 0.8rem;
  font-weight: 600;
  display: none;
}

/* RESPONSIVE MEDIA QUERIES (Mobile UI adaptation) */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    padding-bottom: calc(var(--nav-height) + 1.5rem);
  }
  
  /* Hide sidebar, reveal bottom mobile-nav */
  aside.sidebar {
    display: none;
  }
  
  nav.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-card);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: var(--transition-smooth);
  }
  
  .mobile-nav-item i {
    font-size: 1.35rem;
  }
  
  .mobile-nav-item.active {
    color: var(--color-primary);
  }
  
  main.main-content {
    margin-left: 0;
    padding: 1.5rem;
    padding-top: 2rem;
  }
  
  h1.page-title {
    font-size: 1.8rem;
  }
  
  .box-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
