/* DrawLeague Graphic Charter - CSS Variables and Components */
/* Artist Sketchbook Theme - Warm & Creative */

/* Google Fonts Import - Caveat for handwritten titles */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap');

/* Ensure hidden attribute works */
[hidden] {
  display: none !important;
}

/* Color Palette - Artist Sketchbook Theme */
:root {
  /* Colors - New "Carnet d'artiste" palette */
  --color-background: #F9F7F1;        /* Blanc cassé crème */
  --color-surface: #FFFFFF;
  --color-text: #333333;              /* Gris anthracite doux */
  --color-muted: #4A5568;             /* Bleu gris profond (sous-titres) */
  --color-border: #E8E4DB;
  --color-accent: #D35400;            /* Orange terracotta */
  --color-accent-hover: #B84500;
  --color-accent-soft: rgba(211, 84, 0, 0.1);
  --color-light-blue: #F5F3ED;        /* Crème légèrement plus foncé */
  --color-blue-hover: #EBE8E0;
  --color-warm-cream: #F9F7F1;
  --color-soft-peach: #FFF3E0;
  
  /* Artistic backgrounds */
  --bg-paper: var(--color-warm-cream);
  --bg-warm: var(--color-warm-cream);
  --bg-gallery: linear-gradient(180deg, var(--color-warm-cream) 0%, var(--color-background) 100%);
  
  /* Typography - Handwritten font for titles */
  --font-family-display: 'Caveat', cursive;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadow - softer, more artistic */
  --shadow-sm: 0 2px 4px rgba(31, 41, 55, 0.04);
  --shadow-md: 0 4px 12px rgba(31, 41, 55, 0.06);
  --shadow-lg: 0 8px 24px rgba(31, 41, 55, 0.08);
  --shadow-card-hover: 0 12px 28px rgba(31, 41, 55, 0.1);

  /* Max widths */
  --max-width-container: 1200px;
  --max-width-content: 800px;

  /* Font sizes */
  --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;

  /* Font family */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  font-size: var(--font-size-base);
  position: relative;
}

main {
  position: relative;
}

/* Pages internes (autres que Home) : padding-top pour compenser le header sticky en mobile */
@media (max-width: 768px) {
  /* Correction pour les pages avec leur propre padding qui doit tenir compte du header sticky */
  .leagues-page,
  .league-detail-page,
  .gallery-page,
  .profile-page,
  .user-profile-page,
  .admin-page,
  .auth-page,
  .my-leagues-page,
  .create-league-page {
    padding-top: calc(var(--space-xl) + 20px);
  }
}

/* Paper texture overlay for artist sketchbook feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/asset_texture_papier.png');
  background-repeat: repeat;
  background-size: 300px 300px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 9999;
}

/* Layout */
.container {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* Additional breathing room for main sections */
.hero,
.how-it-works,
.monthly-leagues,
.latest-entries {
  padding: 80px 0;
}

.about-section {
  padding: 80px 0;
}

/* Section variants for visual rhythm */
.section--paper {
  background-color: var(--color-light-blue);
}

.section--warm {
  background-color: var(--color-warm-cream);
}

.section--gallery {
  background: var(--bg-gallery);
}

.section--featured {
  background-color: var(--color-light-blue);
  border-top: 1px solid rgba(31, 41, 55, 0.05);
  border-bottom: 1px solid rgba(31, 41, 55, 0.05);
}

/* Sketch Divider - Hand-drawn stroke separator */
.sketch-divider {
  width: 80%;
  height: 30px;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0.6;
  padding: 20px 0;
}

.sketch-divider svg {
  height: 100%;
  width: 100%;
  display: block;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md) 0;
  line-height: 1.2;
  font-weight: 600;
}

/* Handwritten style for main titles */
h1, h2, h3 {
  font-family: var(--font-family-display);
  font-weight: 700;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

.muted {
  color: var(--color-muted);
}

/* Header */
header {
  background-color: #f3eee9; /* slightly darker cream for better contrast */
  padding: var(--space-md) 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10001;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 72px; /* increased to better fill header vertically */
  width: auto;
  display: block;
  mix-blend-mode: multiply;
  border-radius: 0;
  padding: 0;
  background-color: transparent;
  filter: none;
}

/* Improve integration of logos with non-transparent backgrounds */
.logo-link {
  isolation: isolate; /* ensure blend mode doesn't affect other elements */
}

.logo-link {
  isolation: isolate; /* keep blend effects contained */
}

@media (max-width: 768px) {
  .logo-img {
    height: 52px;
  }
}

header h1 {
  margin: 0;
  font-size: var(--font-size-xl);
}

@media (max-width: 768px) {
  .logo-img {
    height: 36px;
  }
}

nav {
  display: flex;
  gap: var(--space-lg);
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color 150ms ease;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
  transition: color 150ms ease;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Language Selector */
.language-selector {
  appearance: none;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  min-width: 120px;
}

.language-selector:hover {
  border-color: var(--color-accent);
}

.language-selector:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.user-avatar-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: var(--space-xs);
  border-radius: 50%;
  transition: opacity 150ms ease;
}

.user-avatar-link:hover {
  opacity: 0.8;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-light-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  /* En mobile, cacher nav-actions par défaut - sera affiché dans le menu nav */
  .nav-actions {
    display: none !important;
  }
}

@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    flex-direction: column;
    gap: 0;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 150ms ease;
    z-index: 10001;
  }

  nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  nav a {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: block;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: var(--font-size-base);
  }

  .nav-toggle {
    display: block;
    z-index: 10002;
  }

  /* Styles pour les éléments nav-actions quand ils sont déplacés dans nav en mobile */
  nav .mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-sm);
  }

  nav .mobile-nav-actions .btn {
    width: 100%;
    padding: var(--space-md);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav .mobile-nav-actions .user-avatar-link {
    justify-content: center;
    padding: var(--space-sm);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  border-radius: 10px 6px 12px 8px;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: scale(1.05) rotate(-1deg);
  border-radius: 8px 10px 6px 12px;
  box-shadow: 0 6px 16px rgba(211, 84, 0, 0.2);
}

.btn-secondary {
  background-color: var(--color-light-blue);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-blue-hover);
  transform: scale(1.04) rotate(1deg);
  border-radius: 12px 8px 6px 10px;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
}

.btn-ghost:hover {
  background-color: var(--color-background);
  transform: scale(1.03) rotate(-0.5deg);
  border-radius: 10px 8px 8px 10px;
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: 1px solid rgba(31, 41, 55, 0.04);
}

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

/* Featured card variant */
.card--featured {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-warm-cream) 100%);
  border: 2px solid var(--color-accent-soft);
}

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

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.card-body {
  padding: var(--space-lg);
}

/* Chips/Badges */
.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background-color: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.chip-ink {
  background-color: #FFF3E0;
  color: #E65100;
}

.chip-watercolor {
  background-color: #E3F2FD;
  color: #1976D2;
}

.chip-digital {
  background-color: #F3E5F5;
  color: #7B1FA2;
}

.chip-pencil {
  background-color: #F5F5F5;
  color: #424242;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.art-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

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

.art-card img,
.art-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-background) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  color: var(--color-muted);
}

.art-placeholder::before {
  content: "🎨";
}

.art-card .card-body {
  padding: var(--space-md);
}

.art-card h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--font-size-lg);
}

.art-card p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

/* Hero - Artist Sketchbook Style */
.hero {
  padding: var(--space-3xl) 0;
  background-color: var(--color-background);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-illustration img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(51, 51, 51, 0.1));
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
  font-family: var(--font-family-display);
}

.hero .subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  color: var(--color-text);
}

/* Handwritten style button */
.btn-sketchy {
  background-color: var(--color-accent);
  color: white;
  border: 2px solid var(--color-accent);
  border-radius: 12px 8px 14px 6px;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-lg);
  font-weight: 600;
  position: relative;
  transition: all 200ms ease;
  box-shadow: 3px 3px 0 rgba(211, 84, 0, 0.3);
}

.btn-sketchy:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translate(-2px, -2px) scale(1.06) rotate(-1.5deg);
  box-shadow: 5px 5px 0 rgba(211, 84, 0, 0.3);
  border-radius: 14px 6px 8px 12px;
}

/* Decorative line element */
.decor-line {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
  border-radius: 2px;
  margin: var(--space-md) 0 var(--space-lg) 0;
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
    order: 2;
  }
  
  .hero-illustration {
    order: 1;
  }
  
  .hero h2 {
    font-size: 2.5rem;
  }
  
  .hero p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .decor-line {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Stats Ribbon */
.stats-ribbon {
  background: linear-gradient(135deg, rgba(211, 84, 0, 0.12) 0%, rgba(211, 84, 0, 0.06) 100%);
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(211, 84, 0, 0.12);
  border-bottom: 1px solid rgba(211, 84, 0, 0.12);
  position: relative;
}

.stats-ribbon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/watercolor-texture.svg');
  background-size: 400px 400px;
  opacity: 0.10;
  pointer-events: none;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
}

.stat-number {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  font-weight: 500;
  margin-top: var(--space-xs);
}

/* Stats number colors - "Crayon de couleur" palette */
.stats-grid .stat-item:nth-child(1) .stat-number {
  color: #D35400; /* Terracotta */
}
.stats-grid .stat-item:nth-child(2) .stat-number {
  color: #F39C12; /* Moutarde */
}
.stats-grid .stat-item:nth-child(3) .stat-number {
  color: #16A085; /* Teal */
}
.stats-grid .stat-item:nth-child(4) .stat-number {
  color: #C0392B; /* Rouge doux */
}
.stats-grid .stat-item:nth-child(5) .stat-number {
  color: #d8834a; /* Cycle back to Terracotta */
}

@media (max-width: 768px) {
  .stats-grid {
    justify-content: center;
    gap: var(--space-md) var(--space-xl);
  }

  .stat-item {
    min-width: 80px;
  }

  .stat-number {
    font-size: var(--font-size-2xl);
  }
}

/* How it works - Artist Sketchbook Style */
.how-it-works {
  padding: var(--space-3xl) 0;
  background-color: var(--color-warm-cream);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: var(--space-2xl);
  font-family: var(--font-family-display);
  color: var(--color-text);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.step-card {
  background-color: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: 1px solid var(--color-border);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.step-card h3 {
  margin-top: var(--space-md);
  color: var(--color-text);
  font-family: var(--font-family-display);
  font-size: 1.75rem;
}

.step-card p {
  color: var(--color-muted);
  margin-bottom: 0;
}

/* Sketch-style icons */
.icon-sketch {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(2px 2px 4px rgba(51, 51, 51, 0.1));
}

.step-card .icon-large {
  color: var(--color-accent);
}

/* Current League */
.current-league {
  padding: var(--space-xl) 0;
}

.league-card {
  background-color: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: 1px solid rgba(31, 41, 55, 0.04);
  position: relative;
  overflow: hidden;
}

.league-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
}

.league-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.league-card h2 {
  margin-top: var(--space-sm);
}

.league-card h3 {
  color: var(--color-accent);
  font-size: var(--font-size-xl);
}

.mediums {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  flex-wrap: wrap;
}

/* Latest Entries */
.latest-entries {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, var(--color-light-blue) 0%, var(--color-background) 60%);
  position: relative;
}

.latest-entries::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/watercolor-texture.svg');
  background-size: 600px 600px;
  background-position: top right;
  opacity: 0.08;
  pointer-events: none;
}

.latest-entries > * {
  position: relative;
  z-index: 1;
}

.latest-entries h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.latest-entries .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.latest-entries .section-header h2 {
  margin-bottom: 0;
}

.entries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.entry-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(31, 41, 55, 0.04);
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.entry-card > a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-background) 100%);
}

.entry-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: var(--color-background);
  transition: transform 300ms ease;
}

.entry-card:hover img {
  transform: scale(1.03);
}

.entry-card .card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.entry-card .card-body h4 {
  margin: 0;
  font-size: var(--font-size-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-card .card-body .muted {
  margin: 0;
  font-size: var(--font-size-sm);
}

.entry-card .avatar-row {
  margin-bottom: var(--space-xs);
}

.entry-card .avatar-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.entry-card .avatar-link:hover {
  color: var(--color-primary);
}

.entry-card .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.image-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-warm-cream) 50%, var(--color-background) 100%);
  background-image: url('../images/gallery-placeholder.svg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  color: var(--color-muted);
}

.image-placeholder::before {
  content: "";
}

.entry-card p {
  padding: var(--space-md);
  margin: 0;
  font-size: var(--font-size-sm);
}

.entry-card strong {
  color: var(--color-text);
}

/* Footer */
footer {
  background: linear-gradient(180deg, #E5E0D8 0%, #D9D3CA 100%);
  padding: var(--space-2xl) 0 var(--space-xl) 0;
  text-align: center;
  position: relative;
  margin-top: var(--space-3xl);
}

/* Torn paper edge effect on footer top */
footer::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background-image: url('images/torn-paper-edge.svg');
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: 1000px 30px;
  opacity: 0.9;
}

footer .container {
  position: relative;
  z-index: 1;
}

footer p {
  color: var(--color-text);
  font-size: var(--font-size-base);
  margin: var(--space-md) 0;
  font-weight: 500;
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

footer a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  transform: scale(1.05);
}

/* Background classes */
.bg-paper {
  background-color: var(--color-light-blue);
}

.bg-warm {
  background-color: var(--color-warm-cream);
}

.bg-gallery {
  background: var(--bg-gallery);
}

.bg-textured {
  background-image: url('../images/watercolor-texture.svg');
  background-size: 400px 400px;
  background-repeat: repeat;
}

/* Section divider - subtle artistic line */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-border) 20%, var(--color-accent-soft) 50%, var(--color-border) 80%, transparent 100%);
  margin: var(--space-xl) 0;
}

/* Avatar row */
.avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-light-blue) 0%, #E6E6FA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
  border: 2px solid var(--color-surface);
}

/* Avatar size variants */
.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: var(--font-size-sm);
}

.avatar--lg {
  width: 60px;
  height: 60px;
  font-size: var(--font-size-xl);
}

/* Icon sizing */
.icon-large {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
}

/* Countdown */
.countdown {
  font-size: var(--font-size-2xl);
  font-weight: bold;
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 1024px) {
  .entries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: var(--font-size-3xl);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .entries-grid {
    grid-template-columns: 1fr;
  }

  .latest-entries .section-header {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ===========================================
   ARTISTIC UTILITY CLASSES
   =========================================== */

/* Empty State - Artistic treatment */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-background) 100%);
  border-radius: var(--radius-lg);
  position: relative;
}

.empty-state::before {
  content: '';
  display: block;
  width: 120px;
  height: 100px;
  margin: 0 auto var(--space-lg);
  background-image: url('../images/empty-state-art.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.empty-state .empty-icon {
  display: none;
}

.empty-state h3 {
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

.empty-state p {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Featured badge / highlight */
.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: white;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section header with icon */
.section-header-artistic {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.section-header-artistic h2 {
  margin: 0;
}

.section-header-artistic .section-icon {
  width: 32px;
  height: 32px;
  color: var(--color-accent);
}

/* Art frame effect for images */
.art-frame {
  padding: var(--space-sm);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(31, 41, 55, 0.04);
}

.art-frame img {
  border-radius: var(--radius-sm);
}

/* Loading state - artistic spinner */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-3xl);
  color: var(--color-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-light-blue);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Monthly leagues section - featured treatment */
.monthly-leagues {
  padding: var(--space-3xl) 0;
  background-color: var(--color-light-blue);
  position: relative;
}

.monthly-leagues::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero-watercolor.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  pointer-events: none;
}

.monthly-leagues > * {
  position: relative;
  z-index: 1;
}

.monthly-leagues .league-card {
  background: var(--color-surface);
  max-width: 700px;
}

.monthly-leagues .league-card + .league-card {
  margin-top: var(--space-lg);
}

/* League card actions */
.league-card-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

/* Artistic decorative elements */
.decor-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
  border-radius: 2px;
  margin: var(--space-md) auto;
}

.decor-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.decor-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
  opacity: 0.5;
}

.decor-dots span:nth-child(2) {
  opacity: 0.3;
}

.decor-dots span:nth-child(3) {
  opacity: 0.15;
}

/* Highlight text */
.text-accent {
  color: var(--color-accent);
}

.text-highlight {
  background: linear-gradient(180deg, transparent 60%, var(--color-accent-soft) 60%);
  padding: 0 var(--space-xs);
}

/* About Section */
.about-section {
  background-color: var(--color-background);
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-section .container {
  background-color: #FFFFFF;
  border-radius: 2px 255px 3px 25px / 255px 5px 225px 3px;
  box-shadow: 0 16px 48px rgba(31, 41, 55, 0.15), 0 8px 16px rgba(31, 41, 55, 0.08);
  transform: rotate(-1deg);
  padding: var(--space-3xl);
  max-width: 1000px;
  width: 100%;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-text h2 {
  color: var(--color-accent);
  font-family: var(--font-family-display);
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-lg);
  line-height: 1.3;
}

.about-text p {
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  margin: 0;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border: 12px solid var(--color-surface);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.12), 0 4px 8px rgba(31, 41, 55, 0.08);
  transform: rotate(-2.5deg);
  transition: transform 300ms ease, box-shadow 300ms ease;
  border-radius: 4px;
}

.about-image img:hover {
  transform: rotate(-2.5deg) translateY(-4px);
  box-shadow: 0 16px 36px rgba(31, 41, 55, 0.16), 0 6px 12px rgba(31, 41, 55, 0.12);
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .about-section .container {
    padding: var(--space-2xl);
    border-radius: 4px 200px 2px 20px / 200px 4px 200px 2px;
    transform: rotate(0.5deg);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-text h2 {
    font-size: var(--font-size-3xl);
  }

  .about-text p {
    font-size: var(--font-size-base);
    line-height: 1.7;
  }

  .about-image img {
    transform: rotate(1.5deg);
  }

  .about-image img:hover {
    transform: rotate(1.5deg) translateY(-2px);
  }
}