/* ====================================
   CSS Custom Properties (Design Tokens)
   ==================================== */

:root {
  /* Colors - Light Mode */
  --c-bg: #f6f7fb;
  --c-surface: #ffffff;
  --c-text: #0f172a;
  --c-text-muted: #475569;
  --c-text-light: #64748b;
  --c-primary: #ffd93b;
  --c-primary-hover: #ffed4a;
  --c-primary-focus: #f7d736;
  --c-accent: #1e90ff;
  --c-accent-hover: #4fa8ff;
  --c-accent-focus: #1c86f0;
  --c-dark: #1a1a1a;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-error: #ef4444;
  
  /* Neutral Colors */
  --c-neutral-50: #f8fafc;
  --c-neutral-100: #f1f5f9;
  --c-neutral-200: #e2e8f0;
  --c-neutral-300: #cbd5e1;
  --c-neutral-400: #94a3b8;
  --c-neutral-500: #64748b;
  --c-neutral-600: #475569;
  --c-neutral-700: #334155;
  --c-neutral-800: #1e293b;
  --c-neutral-900: #0f172a;
  
  /* Spacing - 8px baseline */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  
  /* Typography */
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  
  /* Layout */
  --container-max: 1200px;
  --container-padding: var(--space-4);
  --header-height: 72px;
  
  /* Borders & Radius */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --border-width: 1px;
  --border-color: var(--c-neutral-200);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 8px 28px rgba(255, 217, 59, 0.3);
  --shadow-accent: 0 8px 28px rgba(30, 144, 255, 0.2);
  
  /* Z-index */
  --z-header: 1000;
  --z-dropdown: 1010;
  --z-sticky: 1020;
  --z-modal: 1030;
  --z-tooltip: 1040;
  
  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 350ms ease-out;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0b0f17;
    --c-surface: #1e293b;
    --c-text: #e5e7eb;
    --c-text-muted: #9aa4b2;
    --c-text-light: #6b7280;
    --c-dark: #f8fafc;
    --border-color: #374151;
    --c-neutral-50: #0f172a;
    --c-neutral-100: #1e293b;
    --c-neutral-200: #334155;
    --c-neutral-300: #475569;
    --c-neutral-400: #64748b;
  }
}

[data-theme="dark"] {
  --c-bg: #0b0f17;
  --c-surface: #1e293b;
  --c-text: #e5e7eb;
  --c-text-muted: #9aa4b2;
  --c-text-light: #6b7280;
  --c-dark: #f8fafc;
  --border-color: #374151;
  --c-neutral-50: #0f172a;
  --c-neutral-100: #1e293b;
  --c-neutral-200: #334155;
  --c-neutral-300: #475569;
  --c-neutral-400: #64748b;
}

[data-theme="light"] {
  --c-bg: #f6f7fb;
  --c-surface: #ffffff;
  --c-text: #0f172a;
  --c-text-muted: #475569;
  --c-text-light: #64748b;
  --c-dark: #1a1a1a;
  --border-color: #e2e8f0;
  --c-neutral-50: #f8fafc;
  --c-neutral-100: #f1f5f9;
  --c-neutral-200: #e2e8f0;
  --c-neutral-300: #cbd5e1;
  --c-neutral-400: #94a3b8;
}

/* ====================================
   Reset & Base Styles
   ==================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--c-text);
  margin-bottom: var(--space-2);
}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

/* Links */
a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--c-accent-hover);
}

a:focus {
  outline: 2px solid var(--c-accent-focus);
  outline-offset: 2px;
}

/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

button:focus {
  outline: 2px solid var(--c-accent-focus);
  outline-offset: 2px;
}

/* Form elements */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ====================================
   Utility Classes
   ==================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-4);
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

/* Spacing */
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.p-4 { padding: var(--space-4); }

/* Text utilities */
.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.text-light { color: var(--c-text-light); }

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ====================================
   Component Styles
   ==================================== */

/* Header */
.site-header {
  background: var(--c-surface);
  border-bottom: var(--border-width) solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(10px);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-4);
}

.logo {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.logo:focus {
  outline: 2px solid var(--c-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Navigation */
.main-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.nav-toggle:hover {
  background-color: var(--c-neutral-100);
}

.nav-toggle-icon {
  width: 100%;
  height: 2px;
  background-color: var(--c-text);
  border-radius: 1px;
  position: relative;
  transition: all var(--transition-normal);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--c-text);
  border-radius: 1px;
  transition: all var(--transition-normal);
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.nav-list {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--c-text);
  background-color: var(--c-neutral-100);
}

.nav-link.active {
  color: var(--c-accent);
  background-color: rgba(30, 144, 255, 0.1);
}

/* Search */
.site-search {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-full);
  background-color: var(--c-surface);
  color: var(--c-text);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.search-btn {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-1);
  border-radius: var(--radius);
  color: var(--c-text-muted);
  transition: all var(--transition-fast);
}

.search-btn:hover {
  color: var(--c-accent);
  background-color: var(--c-neutral-100);
}

/* Theme Toggle */
.theme-toggle {
  padding: var(--space-2);
  border-radius: var(--radius);
  color: var(--c-text-muted);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--c-text);
  background-color: var(--c-neutral-100);
}

.theme-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Main Content */
.main-content {
  padding: var(--space-8) 0;
  min-height: calc(100vh - var(--header-height));
}

/* Sections */
.section {
  margin-bottom: var(--space-10);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}

.section-link {
  color: var(--c-accent);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.section-link:hover {
  background-color: rgba(30, 144, 255, 0.1);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.filter-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--c-text-muted);
}

.filter-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  background-color: var(--c-neutral-100);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--c-text);
  background-color: var(--c-neutral-200);
}

.filter-btn.active,
.filter-btn[aria-pressed="true"] {
  color: white;
  background-color: var(--c-accent);
}

/* Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* Grid Layouts */
.decks-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.events-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.posts-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Cards */
.card {
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: fit-content;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card.sticky-card {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  z-index: var(--z-sticky);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

.card-content {
  margin-bottom: var(--space-4);
}

.card-description {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-3);
}

.card-footer {
  margin-top: auto;
}

/* Feature List */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-1);
  padding-left: var(--space-3);
  position: relative;
}

.feature-list li::before {
  content: '•';
  color: var(--c-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Tournament Items */
.tournament-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius);
  transition: background-color var(--transition-fast);
}

.tournament-item:hover {
  background-color: var(--c-neutral-50);
}

.tournament-date {
  flex-shrink: 0;
  width: 48px;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--c-accent);
  background-color: rgba(30, 144, 255, 0.1);
  border-radius: var(--radius);
  padding: var(--space-1);
}

.tournament-info h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin: 0 0 2px 0;
}

.tournament-info p {
  font-size: var(--font-size-xs);
  color: var(--c-text-muted);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  border: var(--border-width) solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px;
}

.btn-primary {
  background-color: var(--c-primary);
  color: var(--c-dark);
  border-color: var(--c-primary);
}

.btn-primary:hover {
  background-color: var(--c-primary-hover);
  color: var(--c-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--c-text);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--c-neutral-100);
  border-color: var(--c-neutral-300);
  color: var(--c-text);
}

/* Deck Cards */
.deck {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.deck img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.deck-content {
  padding: var(--space-4);
}

.deck h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0 0 var(--space-2) 0;
}

.deck-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* Event Cards */
.event {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.event img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.event-content {
  padding: var(--space-5);
}

.event h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin: 0 0 var(--space-3) 0;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.event-date {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.event-description {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

/* Article Cards */
.article {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.article-content {
  padding: var(--space-4);
}

.article-category {
  display: inline-block;
  padding: 2px var(--space-2);
  background-color: rgba(30, 144, 255, 0.1);
  color: var(--c-accent);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}

.article h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0 0 var(--space-2) 0;
  line-height: var(--line-height-tight);
}

.article-excerpt {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--c-text-muted);
  font-size: var(--font-size-xs);
}

.article-author {
  font-weight: 500;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.tier {
  background-color: rgba(255, 217, 59, 0.2);
  color: #b45309;
}

.badge.status-live {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--c-success);
}

.badge.status-upcoming {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--c-warning);
}

/* Sidebar */
.sidebar {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--c-surface);
  border-top: var(--border-width) solid var(--border-color);
  padding: var(--space-10) 0 var(--space-6);
  margin-top: var(--space-10);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-section:first-child {
  grid-column: 1 / -1;
}

.footer-logo {
  margin-bottom: var(--space-2);
}

.footer-description {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--c-text-muted);
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--c-accent);
  background-color: rgba(30, 144, 255, 0.1);
}

.footer-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
  padding: var(--space-1) 0;
}

.footer-links a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  border-top: var(--border-width) solid var(--border-color);
  padding-top: var(--space-6);
  text-align: center;
}

.footer-bottom p {
  color: var(--c-text-muted);
  font-size: var(--font-size-xs);
  margin-bottom: var(--space-2);
}

.footer-disclaimer {
  font-size: var(--font-size-xs);
  opacity: 0.8;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-3);
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.375rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .filter-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  
  .decks-grid,
  .events-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border: var(--border-width) solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: var(--space-4);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);
  }

  .nav-toggle[aria-expanded="true"] + .nav-list {
    display: flex;
  }

  .nav-link {
    padding: var(--space-3);
    text-align: center;
    border-radius: var(--radius);
  }

  .site-search {
    max-width: 200px;
  }

  .search-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* New layout responsive */
  .main-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .main-column-left,
  .main-column-right {
    min-height: auto;
  }

  .hero-section {
    margin-bottom: var(--space-6);
  }

  .event-card {
    flex-direction: column;
    text-align: center;
  }

  .event-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto var(--space-4);
  }

  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .decks-container {
    gap: var(--space-3);
  }

  .deck-item {
    width: 240px;
  }

  .collection-filters {
    flex-direction: column;
    gap: var(--space-3);
  }

  .filter-chips {
    justify-content: center;
  }

  .modal-content {
    margin: var(--space-4);
    max-width: none;
    width: calc(100vw - 2 * var(--space-4));
  }

  .modal-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (min-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr 300px;
    gap: var(--space-10);
  }
  
  .sidebar {
    display: block;
  }
  
  .footer-content {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
  
  .footer-section:first-child {
    grid-column: 1;
  }
}

@media (min-width: 1280px) {
  .content-layout {
    grid-template-columns: 1fr 350px;
  }
  
  .decks-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .events-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
  
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

/* ====================================
    New Layout Styles
    ==================================== */

/* Hero Section */
.hero-section {
  margin-bottom: var(--space-10);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--space-6);
}

/* Event Display */
.event-display {
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
}

.event-card {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.event-image {
  flex-shrink: 0;
  width: 200px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-details {
  flex: 1;
}

.event-header {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.event-date-badge {
  background: var(--c-primary);
  color: var(--c-dark);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.event-countdown {
  background: var(--c-accent);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.event-status {
  background: var(--c-success);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.event-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--c-text);
}

.event-description {
  color: var(--c-text-muted);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

.event-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--c-accent);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.event-cta:hover {
  background: var(--c-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

/* Empty Event State */
.event-empty {
  padding: var(--space-8);
  color: var(--c-text-muted);
  font-size: var(--font-size-lg);
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.main-column-left {
  min-height: 600px;
}

.main-column-right {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  height: fit-content;
}

/* Collection Section */
.featured-collection {
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.section-subtitle {
  color: var(--c-text-muted);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-6);
}

/* Collection Filters */
.collection-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.filter-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  background-color: var(--c-neutral-100);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  color: var(--c-text);
  background-color: var(--c-neutral-200);
}

.filter-chip.active {
  color: white;
  background-color: var(--c-accent);
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sort-select {
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--font-size-sm);
  cursor: pointer;
  min-width: 140px;
}

/* Collection Grid */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.collection-item {
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.collection-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.collection-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.collection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.collection-item:hover .collection-image img {
  transform: scale(1.05);
}

.collection-new-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--c-error);
  color: white;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.collection-content {
  padding: var(--space-4);
}

.collection-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.collection-popularity {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
}

.collection-date {
  color: var(--c-text-muted);
  font-size: var(--font-size-sm);
}

.collection-actions {
  display: flex;
  gap: var(--space-2);
}

.collection-btn {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition-fast);
}

.collection-btn-primary {
  background: var(--c-accent);
  color: white;
}

.collection-btn-primary:hover {
  background: var(--c-accent-hover);
}

.collection-btn-outline {
  background: transparent;
  color: var(--c-text);
  border: var(--border-width) solid var(--border-color);
}

.collection-btn-outline:hover {
  background: var(--c-neutral-100);
}

/* Empty Collection State */
.collection-empty {
  text-align: center;
  padding: var(--space-8);
  color: var(--c-text-muted);
  font-size: var(--font-size-lg);
}

/* Meta Decks Panel */
.meta-decks-panel {
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.panel-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.panel-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--space-2);
}

.deck-year-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--c-primary);
}

.deck-year {
  font-size: var(--font-size-2xl);
}

/* Decks Carousel */
.decks-carousel {
  position: relative;
  margin-bottom: var(--space-6);
}

.decks-container {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.decks-container::-webkit-scrollbar {
  display: none;
}

.deck-item {
  flex-shrink: 0;
  width: 280px;
  scroll-snap-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.deck-item.active {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.deck-image {
  width: 100%;
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.deck-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deck-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--space-2);
  text-align: center;
}

/* Carousel Navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--c-surface);
  border: var(--border-width) solid var(--border-color);
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-btn:hover:not(:disabled) {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-dots {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--c-neutral-300);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  background: var(--c-accent);
  transform: scale(1.2);
}

/* Deck Actions */
.deck-actions {
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
}

.modal[aria-hidden="false"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: var(--border-width) solid var(--border-color);
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--c-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--c-text);
  background: var(--c-neutral-100);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.modal-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ====================================
    Animation & Interactions
    ==================================== */

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Focus management */
.focus-trap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}