/* AMK CLUB - Main Stylesheet */
:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #121620;
  --bg-tertiary: #1a202c;
  --bg-card: rgba(22, 27, 39, 0.85);
  --border-color: #273144;
  --border-highlight: #3b4863;

  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --gold-dark: #b45309;

  --red-alert: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.4);

  --green-matrix: #10b981;
  --green-glow: rgba(16, 185, 129, 0.35);

  --blue-cyber: #3b82f6;
  --purple-neon: #8b5cf6;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 90% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* Containers */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo-seal {
  width: 50px;
  height: 50px;
  position: relative;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1507 0%, #0d0f12 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.brand-wrapper:hover .brand-logo-seal {
  transform: rotate(10deg) scale(1.05);
  box-shadow: 0 0 25px var(--gold);
}

.crown-svg {
  width: 28px;
  height: 28px;
  fill: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}

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

/* System Status Pill */
.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px #f59e0b; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-boss {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-boss:hover {
  background: var(--red-alert);
  color: #fff;
  box-shadow: 0 0 15px var(--red-glow);
}

.btn-audio-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-audio-toggle:hover {
  border-color: var(--gold);
}

/* User Profile Badge in Header */
.user-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.user-header-profile:hover {
  border-color: var(--gold);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #252e42;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.user-header-info {
  display: flex;
  flex-direction: column;
}

.user-header-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.user-header-rank {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 600;
}

/* Hero Section */
.hero-section {
  padding: 40px 0 25px;
  text-align: center;
  position: relative;
}

.hero-box {
  background: linear-gradient(180deg, rgba(26, 32, 44, 0.7) 0%, rgba(18, 22, 32, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  max-width: 900px;
  margin: 0 auto 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin: 16px 0 12px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 24px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0d11;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-secondary-dark {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: #fff;
}

.btn-secondary-dark:hover {
  background: var(--border-color);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 12px var(--red-glow);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6);
}

/* Nav Tabs Bar (Sitemap) */
.sitemap-nav-container {
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.sitemap-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  min-width: max-content;
}

.nav-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
  background: var(--bg-tertiary);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-tab-btn .tab-badge {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
}

/* Content Views */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.tab-content.active {
  display: block;
}

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

/* Card Common */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-highlight);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ========================================================
   1. DASHBOARD VIEW
======================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-trend {
  font-size: 0.72rem;
  margin-top: 8px;
  font-weight: 600;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

.trend-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.trend-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.trend-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Dashboard Two-Column */
.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

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

.chaos-meter-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.defcon-scale {
  display: flex;
  gap: 6px;
}

.defcon-step {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: var(--transition);
}

.defcon-step.active-5 {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--red-alert);
  color: #fca5a5;
  box-shadow: 0 0 10px var(--red-glow);
  animation: pulse 1s infinite;
}

.defcon-step.active-4 {
  background: rgba(249, 115, 22, 0.25);
  border-color: #f97316;
  color: #fdba74;
}

.live-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
  font-size: 0.82rem;
}

.feed-item.feed-danger {
  border-left-color: var(--red-alert);
}
.feed-item.feed-warning {
  border-left-color: #f97316;
}
.feed-item.feed-info {
  border-left-color: var(--blue-cyber);
}

.feed-time {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.72rem;
}

.feed-user {
  font-weight: 700;
  color: #fff;
}

/* Quick Nav Cards Grid on Dashboard */
.sitemap-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.sitemap-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.sitemap-card:hover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.04);
  transform: translateY(-2px);
}

.sitemap-card-icon {
  font-size: 1.5rem;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.sitemap-card-info h3 {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}

.sitemap-card-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================
   2. HELL DESK VIEW
======================================================== */
.hell-desk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip.active, .filter-chip:hover {
  background: var(--bg-tertiary);
  color: #fff;
  border-color: var(--border-highlight);
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.ticket-card:hover {
  border-color: var(--border-highlight);
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
}

.ticket-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-wontfix { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-machine { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-chaos { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-turnoff { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.4); }
.badge-closed { background: rgba(107, 114, 128, 0.2); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.4); }

.ticket-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-votes-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.ticket-votes-btn:hover {
  background: var(--red-alert);
  color: #fff;
  transform: scale(1.05);
}

/* ========================================================
   3. BUG CEMETERY VIEW
======================================================== */
.cemetery-bg {
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.6) 0%, rgba(10, 12, 16, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.cemetery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tombstone-card {
  background: linear-gradient(180deg, #1f2738 0%, #111520 100%);
  border: 2px solid #334155;
  border-top-left-radius: 120px;
  border-top-right-radius: 120px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 40px 20px 24px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
}

.tombstone-card:hover {
  transform: translateY(-5px);
  border-color: #64748b;
}

.tombstone-card.is-resurrected {
  border-color: #10b981;
  box-shadow: 0 0 25px var(--green-glow);
  animation: zombieGlow 2.5s infinite alternate;
}

@keyframes zombieGlow {
  0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
  100% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.7); }
}

.tombstone-rip {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 4px;
  margin-bottom: 6px;
}

.tombstone-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.tombstone-epitaph {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
  min-height: 60px;
}

.tombstone-meta {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #94a3b8;
  border-top: 1px solid #334155;
  padding-top: 10px;
  margin-bottom: 14px;
}

.status-resurrected-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.btn-resurrect {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-resurrect:hover {
  background: #10b981;
  color: #000;
  transform: scale(1.05);
}

/* ========================================================
   4. HALL OF SHAME & GLORY VIEW
======================================================== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.award-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}

.award-card:hover {
  border-color: var(--gold);
}

.award-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.award-badge-icon {
  font-size: 2rem;
  background: rgba(245, 158, 11, 0.1);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.award-header h3 {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
}

.award-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.nominees-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nominee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.nominee-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f3f4f6;
}

.nominee-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote-count-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 700;
}

.btn-vote-nominee {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}

.btn-vote-nominee:hover {
  background: var(--gold);
  color: #000;
}

/* ========================================================
   5. COFFEE MONITOR VIEW
======================================================== */
.coffee-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.coffee-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.giant-coffee-mug {
  width: 130px;
  height: 150px;
  border: 6px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 40px 40px;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}

.giant-coffee-mug::after {
  content: '';
  position: absolute;
  top: 25px;
  right: -32px;
  width: 32px;
  height: 60px;
  border: 6px solid #e2e8f0;
  border-left: none;
  border-radius: 0 25px 25px 0;
}

.coffee-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75%;
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.caffeine-meter-wrap {
  width: 100%;
  margin: 16px 0;
}

.caffeine-bar {
  width: 100%;
  height: 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.caffeine-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 60%, #ef4444 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ========================================================
   6. CHALLENGES VIEW (MINI-GAMES)
======================================================== */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-screen {
  background: #000;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.excuse-box {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #38bdf8;
  line-height: 1.5;
  padding: 12px;
}

/* ========================================================
   7. MEME FACTORY VIEW
======================================================== */
.meme-creator-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}

.meme-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .meme-editor-layout {
    grid-template-columns: 1fr;
  }
}

.meme-canvas-wrapper {
  background: #000;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
}

#memeCanvas {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.meme-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.text-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
}

.text-input:focus {
  outline: none;
  border-color: var(--gold);
}

/* ========================================================
   8. RAGE BUTTON & SOUNDBOARD VIEW
======================================================== */
.rage-section {
  text-align: center;
  padding: 20px 0;
}

.giant-red-button-wrapper {
  margin: 30px auto;
  width: 240px;
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hazard-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    #f59e0b 0deg 20deg,
    #000000 20deg 40deg
  );
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  animation: rotateHazard 40s linear infinite;
}

@keyframes rotateHazard {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.giant-rage-button {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff5252 0%, #b71c1c 65%, #7f0000 100%);
  border: 8px solid #3b0000;
  box-shadow: 
    0 15px 35px rgba(239, 68, 68, 0.5),
    inset 0 6px 12px rgba(255, 255, 255, 0.4),
    inset 0 -8px 16px rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.giant-rage-button:hover {
  filter: brightness(1.1);
  box-shadow: 0 20px 45px rgba(239, 68, 68, 0.7);
}

.giant-rage-button:active {
  transform: translateY(8px) scale(0.96);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.sound-pad {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sound-pad:hover {
  border-color: var(--gold);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.sound-pad:active {
  transform: scale(0.95);
  background: rgba(245, 158, 11, 0.15);
}

.pad-icon {
  font-size: 1.8rem;
}

.pad-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.pad-tag {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ========================================================
   9. MEMBERS & GAMIFICATION VIEW (Image 2)
======================================================== */
.ranks-table-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}

.ranks-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.ranks-table th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

.ranks-table td {
  padding: 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranks-table tr.current-user-rank {
  background: rgba(245, 158, 11, 0.08);
  font-weight: 700;
}

.ranks-table tr.current-user-rank td:first-child {
  border-left: 3px solid var(--gold);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.member-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition);
}

.member-card.is-active-member {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.member-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #232c3f;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.member-details h3 {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 800;
}

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

.member-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.member-xp-bar-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xp-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: var(--radius-full);
}

/* ========================================================
   10. ADMIN ZONE VIEW
======================================================== */
.admin-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.admin-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 550px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

/* BOSS MODE (Excel Fake Screen) */
#bossModeScreen {
  position: fixed;
  inset: 0;
  background: #ffffff;
  color: #000000;
  z-index: 99999;
  display: none;
  flex-direction: column;
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  overflow: auto;
}

#bossModeScreen.active {
  display: flex;
}

.excel-ribbon {
  background: #107c41;
  color: #fff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.excel-toolbar {
  background: #f3f2f1;
  border-bottom: 1px solid #d2d0ce;
  padding: 6px 16px;
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: #323130;
}

.excel-formula-bar {
  display: flex;
  align-items: center;
  padding: 4px 16px;
  border-bottom: 1px solid #d2d0ce;
  background: #fff;
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  gap: 12px;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.excel-table th, .excel-table td {
  border: 1px solid #e1dfdd;
  padding: 4px 10px;
  text-align: left;
}

.excel-table th {
  background: #f3f2f1;
  font-weight: 600;
  color: #605e5c;
  text-align: center;
}

/* FAKE BSOD SCREEN */
#bsodScreen {
  position: fixed;
  inset: 0;
  background: #0078d7;
  color: #fff;
  z-index: 999999;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 8vw 12vw;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
}

#bsodScreen.active {
  display: flex;
}

.bsod-sad-face {
  font-size: 7rem;
  line-height: 1;
  margin-bottom: 20px;
}

.bsod-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.bsod-desc {
  font-size: 1.05rem;
  max-width: 700px;
  line-height: 1.6;
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 27, 39, 0.95);
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  animation: slideInRight 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: auto;
}

.toast.toast-xp {
  border-left-color: #10b981;
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Screen Shake Effect for Rage Button */
.shake-screen {
  animation: violentShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes violentShake {
  10%, 90% { transform: translate3d(-4px, 0, 0); }
  20%, 80% { transform: translate3d(6px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
  40%, 60% { transform: translate3d(8px, 0, 0); }
}

/* Canvas Confetti */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
