:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-alt: #161a21;
  --bg-soft: #1f252e;
  --bg-muted: #1a1f26;
  --bg-card: #1a1f26;
  --border: #2c333f;
  --border-soft: #39424f;
  --text: #e5e9ef;
  --text-main: #e5e9ef;
  --text-dim: #9aa4b1;
  --text-muted: #8892a0;
  --primary: #3b82f6;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #dc2626;
  --warning: #f59e0b;
  --warn: #f59e0b;
  --success: #16a34a;
  --info: #06b6d4;
  --radius: 10px;
  --shadow: 0 4px 16px -4px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.5);
  --gradient-bg: radial-gradient(circle at 20% 20%, #202632, #101318 70%);
  --gradient-overlay: radial-gradient(circle at 80% 10%,rgba(59,130,246,.15),transparent 60%), radial-gradient(circle at 10% 90%,rgba(16,185,129,.12),transparent 55%);
}

* { box-sizing: border-box; }

body { 
  /* Use CSS variables for theming */
  background: var(--gradient-bg);
  color: var(--text);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif; 
  margin: 0; 
  line-height: 1.45; 
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
body::before { 
  content: ""; 
  position: fixed; 
  inset: 0; 
  pointer-events: none; 
  background: var(--gradient-overlay); 
  mix-blend-mode: overlay;
  transition: background 0.3s ease;
}
img { max-width:100%; height:auto; display:block; }
a { color: var(--accent); text-decoration:none; }
a:hover, a:focus-visible { text-decoration:underline; }
p { max-width:72ch; }
code { background: var(--bg-soft); padding:2px 6px; border:1px solid var(--border-soft); border-radius:6px; font-size:.85rem; }

/* === Header / Nav === */
/* Responsive header with mobile hamburger menu */
.header-responsive {
  background: rgba(15,17,21,.75); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  border-bottom:1px solid var(--border); 
  padding:.9rem clamp(.75rem,2.5vw,2rem); 
  position:sticky; 
  top:0; 
  z-index:100; 
  box-shadow:0 1px 0 rgba(255,255,255,.03); 
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.header-responsive h1 { 
  font-size:1.15rem; 
  font-weight:600; 
  letter-spacing:.5px; 
  margin:0; 
  flex-shrink: 0;
}

.header-responsive h1 a { 
  background: linear-gradient(90deg,#3b82f6,#22d3ee,#10b981); 
  -webkit-background-clip:text; 
  background-clip:text; 
  color:transparent; 
  font-weight:700; 
  color:#3b82f6; /* Fallback */
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .header-responsive h1 a { color:transparent; }
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
  padding-top: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border-left: 1px solid var(--border-soft);
}

.nav-group:first-child {
  border-left: none;
  padding-left: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  transition: 0.25s all;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover, .nav-item:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(255,255,255,.06));
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-text {
  display: inline;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  padding: 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  position: relative;
  /* Better visibility */
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
  transform: scale(1.05);
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--text);
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mobile-menu-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-strong);
}

.mobile-menu-btn.active .hamburger-line {
  background: white;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* User section */
.user-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
  transition: all 0.3s ease;
}

.user-avatar.clickable {
  cursor: pointer;
}

.user-avatar.clickable:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--accent);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.user-name {
  font-size: 0.7rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.user-name:hover {
  text-decoration: underline;
}

.user-status {
  font-size: 0.55rem;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.btn-logout {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  text-decoration: none;
}

/* Mobile Navigation */
.nav-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 300;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.nav-mobile.active {
  right: 0;
}

.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.nav-mobile-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.nav-mobile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
}

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

.nav-mobile-content {
  padding: 1rem 0;
}

.nav-mobile-section {
  margin-bottom: 1.5rem;
}

.nav-mobile-section h3 {
  margin: 0 0 0.75rem 0;
  padding: 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
  position: relative;
  /* Ensure clickability */
  cursor: pointer;
  z-index: 301;
  /* Better touch targets */
  min-height: 44px;
}

.nav-mobile-item:hover {
  background: var(--bg-soft);
  text-decoration: none;
}

.nav-mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(100% - 300px); /* Don't cover the mobile nav area */
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* On smaller screens, backdrop covers full width but stays behind nav */
@media (max-width: 480px) {
  .nav-mobile-backdrop {
    width: 100%;
    z-index: 50; /* Even lower on small screens */
  }
}


.nav-mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent scrolling when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile responsive breakpoints */
@media (max-width: 1024px) {
  .nav-desktop {
    padding-top: 1.8rem; /* Make room for category labels */
  }
  
  .nav-group {
    gap: 0.25rem;
    padding: 0 0.5rem;
    position: relative;
  }
  
  .nav-group::before {
    content: attr(data-label);
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  
  .nav-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .nav-text {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-desktop {
    gap: 1rem;
  }
  
  .nav-group {
    padding: 0 0.3rem;
  }
  
  .nav-item {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .header-responsive {
    padding: 0.7rem 1rem;
  }
  
  .nav-desktop {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    /* Larger touch target for mobile */
    min-width: 48px;
    min-height: 48px;
    padding: 14px;
    /* Extra contrast on mobile */
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  
  .hamburger-line {
    width: 26px;
    height: 3px;
  }
  
  .user-section {
    gap: 0.5rem;
  }
  
  .user-avatar {
    width: 28px;
    height: 28px;
  }
  
  .user-details {
    display: none;
  }
  
  .btn-logout {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .nav-mobile {
    width: 100%;
    right: -100%;
  }
}

/* === Theme Toggle Removed === */
/* No theme switching - single dark theme only */

/* Mobile adjustments */
@media (max-width: 768px) {
  /* Better touch targets for mobile menu items */
  .nav-mobile-item {
    min-height: 44px;
    padding: 0.875rem 1rem;
  }
  
  .nav-mobile-close {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
  }
  
  .mobile-menu-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Disable hover effects on touch devices */
  @media (hover: none) and (pointer: coarse) {
    .nav-mobile-item:hover {
      background: inherit;
    }
    
    .nav-mobile-close:hover {
      background: inherit;
      color: var(--text-dim);
    }
  }
}
/* === Layout Containers === */
main { 
  width: 100%; 
  max-width: 1100px; 
  margin: 1.8rem auto 3rem; 
  padding: 0 1rem; /* Fallback for Opera */
  padding: 0 clamp(1rem, 3vw, 2rem); 
  /* Opera compatibility */
  text-align: center;
}

/* Reset text alignment for content inside main */
main > * {
  text-align: left;
}
.stack { display:flex; flex-direction:column; gap:1.25rem; }
.grid { --cols:1; display:grid; gap:1.2rem; grid-template-columns:repeat(var(--cols), minmax(0,1fr)); }
@media (min-width:700px){ .grid.cols-2 { --cols:2; } }

/* === Card / Panel === */
.panel { 
  background: linear-gradient(145deg, #1f252e, #161a21); 
  background: linear-gradient(145deg, var(--bg-soft), var(--bg-alt)); 
  border:1px solid #2c333f; 
  border:1px solid var(--border); 
  border-radius: 10px; 
  border-radius: var(--radius); 
  padding:1.05rem 1.15rem; 
  box-shadow: 0 4px 16px -4px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.5); 
  box-shadow: var(--shadow); 
  position:relative; 
  overflow:hidden; 
}
.panel::before { content:""; position:absolute; inset:0; pointer-events:none; background: linear-gradient(120deg, rgba(59,130,246,.08), transparent 60%); opacity:.6; }
.panel h2, .panel h3 { margin-top:0; }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.65rem; }

/* === Lists === */
ul { list-style:none; padding:0; margin:0; }
ul.feature-list li { padding:.5rem .65rem; border:1px solid var(--border-soft); background:linear-gradient(135deg,var(--bg-soft),var(--bg-alt)); margin-bottom:.55rem; border-radius:8px; display:flex; align-items:center; gap:.6rem; justify-content:space-between; }
ul.feature-list li a { font-weight:500; }
ul.feature-list li span.badge { font-size:.55rem; letter-spacing:.5px; text-transform:uppercase; background: linear-gradient(90deg,#10b981,#059669); padding:2px 6px; border-radius:20px; color:#fff; font-weight:600; }

/* === Badges === */
.badge { display:inline-flex; align-items:center; gap:.35rem; font-size:.6rem; padding:3px 7px; border-radius: 999px; letter-spacing:.5px; font-weight:600; text-transform:uppercase; background:linear-gradient(90deg,#334155,#1e293b); color:#cbd5e1; border:1px solid var(--border-soft); }
.badge-green { background: linear-gradient(90deg,#16a34a,#15803d); color:#ecfdf5; }
.badge-neutral { background: linear-gradient(90deg,#475569,#334155); color:#e2e8f0; }

/* === Achievement Badges === */
.achievement-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.achievement-card.rarity-common { border-color: #6b7280; }
.achievement-card.rarity-uncommon { border-color: #10b981; background: linear-gradient(135deg, var(--bg), rgba(16, 185, 129, 0.05)); }
.achievement-card.rarity-rare { border-color: #3b82f6; background: linear-gradient(135deg, var(--bg), rgba(59, 130, 246, 0.05)); }
.achievement-card.rarity-epic { 
  border-color: #8b5cf6; 
  background: linear-gradient(135deg, var(--bg), rgba(139, 92, 246, 0.05));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}
.achievement-card.rarity-legendary { 
  border-color: #f59e0b; 
  background: linear-gradient(135deg, var(--bg), rgba(245, 158, 11, 0.05));
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
  animation: legendary-glow 3s ease-in-out infinite alternate;
}

@keyframes legendary-glow {
  from { box-shadow: 0 0 25px rgba(245, 158, 11, 0.3); }
  to { box-shadow: 0 0 35px rgba(245, 158, 11, 0.5), 0 0 50px rgba(245, 158, 11, 0.2); }
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.achievement-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.achievement-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.achievement-rarity {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.achievement-rarity.common { background: #6b7280; color: white; }
.achievement-rarity.uncommon { background: #10b981; color: white; }
.achievement-rarity.rare { background: #3b82f6; color: white; }
.achievement-rarity.epic { background: #8b5cf6; color: white; }
.achievement-rarity.legendary { background: linear-gradient(90deg, #f59e0b, #d97706); color: white; }

/* Achievement Progress Bar */
.achievement-progress {
  margin-top: 0.75rem;
}

.achievement-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.achievement-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 3px;
  transition: width 0.8s ease;
}

.achievement-progress-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Achievement Overview Stats */
.achievement-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-muted);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.achievement-stat {
  text-align: center;
}

.achievement-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.achievement-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* === Buttons === */
button, .btn { 
  /* Fallback colors */
  background: #3b82f6;
  color: #fff;
  border: 1px solid #2563eb;
  /* CSS Variables */
  --btn-bg: #3b82f6; --btn-bg: var(--accent); 
  --btn-bg-hover: #2563eb; --btn-bg-hover: var(--accent-hover); 
  --btn-color:#fff; 
  display:inline-flex; 
  align-items:center; 
  gap:.5rem; 
  background: linear-gradient(135deg,#3b82f6,#2563eb); 
  background: linear-gradient(135deg,var(--btn-bg),var(--btn-bg-hover)); 
  border:1px solid #2563eb; 
  border:1px solid var(--btn-bg-hover); 
  color: #fff; 
  color: var(--btn-color); 
  padding:.65rem 1rem; 
  font:inherit; 
  font-size:.85rem; 
  font-weight:600; 
  line-height:1; 
  cursor:pointer; 
  border-radius:8px; 
  letter-spacing:.3px; 
  box-shadow:0 4px 14px -4px rgba(59,130,246,.5); 
  transition:.25s box-shadow, .25s transform, .25s filter; 
}
button:hover, button:focus-visible, .btn:hover, .btn:focus-visible { box-shadow:0 6px 18px -4px rgba(59,130,246,.6); filter:brightness(1.05); }
button:active, .btn:active { transform:translateY(2px); }
.btn-ghost { 
  background: linear-gradient(135deg,rgba(255,255,255,.05),rgba(255,255,255,.02)); 
  border:1px solid #2c333f; 
  border:1px solid var(--border); 
  color: #9aa4b1; 
  color: var(--text-dim); 
  box-shadow:none; 
}
.btn-ghost:hover { 
  color:#e5e9ef; 
  color:var(--text); 
  border-color:#3b82f6; 
  border-color:var(--accent); 
}
.btn-danger { 
  --btn-bg:#dc2626; --btn-bg-hover:#b91c1c; 
  background: linear-gradient(135deg,#dc2626,#b91c1c); 
  border-color: #b91c1c;
  box-shadow:0 4px 14px -4px rgba(220,38,38,.45); 
}
.btn-success { 
  --btn-bg:#16a34a; --btn-bg-hover:#15803d; 
  background: linear-gradient(135deg,#16a34a,#15803d); 
  border-color: #15803d;
  box-shadow:0 4px 14px -4px rgba(22,163,74,.45); 
}
.btn-small { padding:.45rem .7rem; font-size:.7rem; font-weight:500; }
.inline { display:inline-flex; }

/* Link-like buttons (for inline forms) */
.btn-link { background:none; border:none; padding:0; color:var(--accent); cursor:pointer; font:inherit; font-size:.75rem; font-weight:500; }
.btn-link:hover { text-decoration:underline; }

/* === Forms === */
form { --field-bg: #1f252e; --field-bg: var(--bg-soft); }
form label { font-size:.75rem; letter-spacing:.5px; font-weight:600; text-transform:uppercase; display:block; margin:.85rem 0 .35rem; color:#9aa4b1; color:var(--text-dim); }
form input[type=text], form input[type=email], form input[type=password], form textarea, form input:not([type]) { 
  background:#1f252e; 
  background:var(--field-bg); 
  border:1px solid #2c333f; 
  border:1px solid var(--border); 
  color:#e5e9ef; 
  color:var(--text); 
  padding:.65rem .75rem; 
  border-radius:8px; 
  width:100%; 
  font:inherit; 
  resize:vertical; 
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); 
}
form textarea { min-height:120px; }
form input:focus, form textarea:focus { 
  outline:2px solid #3b82f6; 
  outline:2px solid var(--accent); 
  outline-offset:2px; 
  border-color: #3b82f6; 
  border-color: var(--accent); 
}
fieldset { 
  border:1px solid #39424f; 
  border:1px solid var(--border-soft); 
  border-radius:10px; 
  padding:.85rem 1rem 1rem; 
  background:linear-gradient(135deg,#1f252e,#161a21); 
  background:linear-gradient(135deg,var(--bg-soft),var(--bg-alt)); 
}
legend { padding:0 .5rem; font-size:.7rem; text-transform:uppercase; letter-spacing:.5px; color:#9aa4b1; color:var(--text-dim); }
.form-row { display:flex; gap:1rem; flex-wrap:wrap; }

/* === Tables (multi add) === */
table { width:100%; border-collapse:collapse; }
thead th { font-size:.65rem; text-transform:uppercase; letter-spacing:.5px; font-weight:600; color:#9aa4b1; color:var(--text-dim); }
td, th { padding:6px 8px; border-bottom:1px solid #39424f; border-bottom:1px solid var(--border-soft); vertical-align:top; }
tbody tr:hover { background:rgba(255,255,255,.03); }

/* === Share link box === */
.share-box { 
  background:linear-gradient(135deg,#1f252e,#161a21); 
  background:linear-gradient(135deg,var(--bg-soft),var(--bg-alt)); 
  border:1px solid #2c333f; 
  border:1px solid var(--border); 
  padding:.75rem 1rem .9rem; 
  border-radius:12px; 
  display:flex; 
  flex-direction:column; 
  gap:.45rem; 
  max-width:420px; 
  box-shadow:0 2px 10px -3px rgba(0,0,0,.5); 
}
.share-box small { font-size:.65rem; letter-spacing:.5px; text-transform:uppercase; font-weight:600; color:#9aa4b1; color:var(--text-dim); }
.share-box-row { display:flex; gap:.5rem; align-items:center; }
.share-box input { flex:1; font-size:.7rem; }
.copy-status { font-size:.6rem; font-weight:600; letter-spacing:.5px; color:#16a34a; color:var(--success); opacity:0; transition:.3s opacity; }
.copy-status.show { opacity:1; }

/* === Utility === */
.muted { color:#9aa4b1; color:var(--text-dim); }
.tight { margin-top:.2rem; }
.space-top { margin-top:1.25rem; }
.flex { display:flex; }
.items-center { align-items:center; }
.gap-sm { gap:.5rem; }
.gap { gap:1rem; }
.justify-between { justify-content:space-between; }
.wrap { flex-wrap:wrap; }
.mb-0 { margin-bottom:0; }
.mb-sm { margin-bottom:.5rem; }
.mb { margin-bottom:1rem; }
.mt { margin-top:1rem; }
.mt-sm { margin-top:.5rem; }
.mt-lg { margin-top:2rem; }
.text-xs { font-size:.65rem; }
.text-sm { font-size:.75rem; }
.text-dim { color:#9aa4b1; color:var(--text-dim); }
.w-full { width:100%; }
.inline-form { display:inline; }

/* === Focus Outline (override) === */
:focus-visible { outline:2px solid #3b82f6; outline:2px solid var(--accent); outline-offset:2px; }

/* === Scrollbar (webkit) === */
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:#0d0f12; }
::-webkit-scrollbar-thumb { background:#2c333f; border-radius:6px; border:2px solid #0d0f12; }
::-webkit-scrollbar-thumb:hover { background:#3b4653; }

/* === Animations / Transitions === */
.fade-in { animation: fade .5s ease; }
@keyframes fade { from { opacity:0; transform:translateY(4px);} to { opacity:1; transform:translateY(0);} }

/* === Opera Browser Compatibility === */
/* Opera sometimes has issues with modern CSS properties */
@supports not (gap: 1rem) {
  .stack > * + * { margin-top: 1.25rem; }
  .grid { display: block; }
  .grid > * + * { margin-top: 1.2rem; }
}

/* Ensure centering works in Opera */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  main {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

/* === Dark theme only - no light theme support === */

/* === Offline Indicator (retain) === */
.offline-banner { display:none; background:#dc2626; background:var(--danger); color:#fff; text-align:center; padding:.4rem; font-size:.75rem; letter-spacing:.5px; }
.offline .offline-banner { display:block; }

/* Legacy selectors preserved (minimal) */
.deck-list li+li { margin-top:.35rem; }

/* === Deck List Mobile Improvements === */
@media (max-width: 768px) {
  .feature-list li {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  
  /* Deck title and info section should take full width */
  .feature-list li > div:first-child {
    width: 100% !important;
    flex: none !important;
  }
  
  /* Statistics section should also take full width and align left */
  .feature-list li > div:last-child {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-shrink: 1 !important;
  }
  
  /* Test stats in deck items should stack on mobile */
  .feature-list li div[style*="margin-left:auto"] {
    margin-left: 0 !important;
    margin-top: 0.5rem !important;
  }
  
  /* Improve title truncation on mobile */
  .feature-list li a[style*="max-width:200px"] {
    max-width: none !important;
  }
  
  .feature-list li a[style*="max-width:250px"] {
    max-width: none !important;
  }
}

/* === Notification Badge === */
.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  min-width: 18px;
  line-height: 1;
}

/* Notification badge responsive adjustments */
@media (max-width: 768px) {
  .notification-badge {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    top: -6px;
    right: -6px;
  }
}

/* Mobile menu badge - shows total notifications on hamburger button */
.mobile-menu-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  min-width: 20px;
  line-height: 1;
  z-index: 10;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.1); 
    opacity: 0.8; 
  }
}

/* Partial scoring color classes */
.score-perfect {
  color: var(--success);
}

.score-good {
  color: #16a34a; /* Green for 80-99% */
}

.score-partial {
  color: #eab308; /* Yellow for 50-79% */
}

.score-poor {
  color: var(--danger); /* Red for 0-49% */
}
