/* ============================================
   SALE CASQUETTE — La Sale Diff Brand Identity
   Raw. Competitive. No filter.
   ============================================ */

@font-face {
    font-family: 'Ashley Script';
    src: url('AshleyScriptMTStdRg.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Couleurs primaires — from charte graphique */
    --navy-deep: #0B1A2E;
    --navy-mid: #112240;
    --navy-light: #1B3358;
    --blue-accent: #2A4A7F;
    --white-pure: #FFFFFF;
    --white-off: #E8EDF5;
    --white-muted: #A3B1CC;

    /* Accents */
    --accent-energy: #4FC3F7;
    --accent-warning: #FF6B35;
    --accent-live: #E53935;
    --accent-success: #66BB6A;

    /* Semantic */
    --text-primary: var(--white-off);
    --text-secondary: var(--white-muted);
    --text-muted: #6B7A99;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-display: 'Permanent Marker', cursive;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-subheading: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;

    /* Spacing & Shape */
    --radius: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(79, 195, 247, 0.08);
    --transition: 0.2s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--navy-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Grain texture overlay — global atmosphere */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 9999;
}

a {
    color: var(--accent-energy);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: #6dd1fa; }

img { max-width: 100%; height: auto; }

::selection {
    background: rgba(79, 195, 247, 0.3);
    color: var(--white-pure);
}

/* ============================================
   Typography — La Sale Diff hierarchy
   ============================================ */

.font-display { font-family: var(--font-display); }
.font-heading { font-family: var(--font-heading); }
.font-sub { font-family: var(--font-subheading); }

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 2px;
    color: var(--white-pure);
}

/* ============================================
   Layout — Public
   ============================================ */

.site-header {
    background: rgba(11, 26, 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.site-logo {
    font-family: 'Ashley Script', cursive;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--white-pure);
    letter-spacing: 1px;
    transition: text-shadow var(--transition);
}
.site-logo:hover {
    color: var(--white-pure);
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
}

.site-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.site-nav a {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--white-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.site-nav a:hover {
    color: var(--white-pure);
    background: rgba(255, 255, 255, 0.04);
}
.site-nav a.active {
    color: var(--accent-energy);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--white-pure);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.mobile-menu-btn:hover {
    border-color: var(--accent-energy);
    color: var(--accent-energy);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.site-footer {
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--text-muted);
    font-family: var(--font-subheading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Hero — Home
   ============================================ */

.hero {
    position: relative;
    text-align: center;
    padding: 7rem 2rem 5rem;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(42, 74, 127, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(79, 195, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(42, 74, 127, 0.15) 0%, transparent 40%),
        var(--navy-deep);
    overflow: hidden;
}

/* Splatter decorations */
.splatter {
    position: absolute;
    border-radius: 50%;
    background: var(--white-pure);
    opacity: 0.03;
    animation: splatter-float 10s ease-in-out infinite;
    pointer-events: none;
}

.splatter-1 {
    width: 350px;
    height: 350px;
    top: -100px;
    left: -80px;
    animation-delay: 0s;
}

.splatter-2 {
    width: 200px;
    height: 200px;
    bottom: 5%;
    right: -50px;
    animation-delay: -3s;
}

.splatter-3 {
    width: 100px;
    height: 100px;
    top: 25%;
    right: 12%;
    animation-delay: -6s;
}

.splatter-4 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 8%;
    animation-delay: -4s;
}

@keyframes splatter-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.04); }
}

/* Diagonal line accent */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-energy), transparent);
    opacity: 0.6;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-energy);
    border: 1px solid rgba(79, 195, 247, 0.3);
    padding: 6px 20px;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease-out;
}

.hero-title {
    font-family: 'Ashley Script', cursive;
    font-size: clamp(3rem, 9vw, 6rem);
    text-transform: uppercase;
    color: var(--white-pure);
    line-height: 0.95;
    text-shadow: 0 0 80px rgba(79, 195, 247, 0.12);
    margin-bottom: 0.75rem;
    transform: rotate(-1.5deg);
    animation: fadeUp 0.8s ease-out 0.1s both;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    letter-spacing: 5px;
    color: var(--white-muted);
    margin: 0 auto 2rem;
    max-width: 600px;
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-subtitle strong {
    color: var(--accent-energy);
}

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

/* Countdown */
.hero-countdown {
    display: inline-flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.countdown-item {
    text-align: center;
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    min-width: 85px;
    position: relative;
}

.countdown-item::after {
    content: ':';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-60%);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--white-muted);
    opacity: 0.4;
}

.countdown-item:last-child::after {
    display: none;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--white-pure);
    display: block;
    line-height: 1;
    letter-spacing: 2px;
}

.countdown-label {
    font-family: var(--font-subheading);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
}

.hero-ended {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--accent-warning);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.2);
}

.hero-winner {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--accent-success);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    animation: fadeUp 0.8s ease-out 0.4s both;
}

/* ============================================
   Section Headers
   ============================================ */

.section-label {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--accent-energy);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 3px;
    color: var(--white-pure);
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-energy);
    margin-top: 0.75rem;
}

.section-title.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

.page-intro {
    font-size: 1rem;
    color: var(--white-muted);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* ============================================
   Top 3 Preview
   ============================================ */

.top3-section {
    padding: 4rem 0 2rem;
}

.top3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.top3-card {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.top3-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.top3-card:nth-child(1)::before { background: var(--accent-warning); }
.top3-card:nth-child(2)::before { background: #A3B1CC; }
.top3-card:nth-child(3)::before { background: #CD7F32; }

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

.top3-rank {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}
.top3-card:nth-child(1) .top3-rank { color: var(--accent-warning); }
.top3-card:nth-child(2) .top3-rank { color: #A3B1CC; }
.top3-card:nth-child(3) .top3-rank { color: #CD7F32; }

.top3-pseudo {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--white-pure);
}

.top3-points {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--accent-energy);
}

/* ============================================
   Leaderboard
   ============================================ */

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
}

.leaderboard-table th {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table td {
    padding: 1rem 1.25rem;
    background: var(--navy-mid);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: background var(--transition);
}

.leaderboard-table tr:first-child td:first-child { border-radius: var(--radius) 0 0 0; }
.leaderboard-table tr:first-child td:last-child { border-radius: 0 var(--radius) 0 0; }
.leaderboard-table tr:last-child td:first-child { border-radius: 0 0 0 var(--radius); }
.leaderboard-table tr:last-child td:last-child { border-radius: 0 0 var(--radius) 0; }

.leaderboard-table tbody tr:hover td {
    background: var(--navy-light);
}

.leaderboard-rank {
    font-family: var(--font-display);
    font-size: 1.2rem;
    width: 60px;
}
.rank-1 { color: var(--accent-warning); }
.rank-2 { color: #A3B1CC; }
.rank-3 { color: #CD7F32; }

.leaderboard-pseudo {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.leaderboard-pseudo a {
    color: var(--white-pure);
    transition: color var(--transition);
}
.leaderboard-pseudo a:hover { color: var(--accent-energy); }

.leaderboard-points {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--accent-energy);
}

.leaderboard-detail {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-energy);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.detail-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: var(--white-pure);
}

.detail-close {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition);
}
.detail-close:hover { color: var(--accent-live); }

/* ============================================
   Challenge Cards
   ============================================ */

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.challenge-card {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-energy), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

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

.challenge-card:hover::before {
    opacity: 1;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.challenge-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--white-pure);
    line-height: 1.2;
}

.challenge-points {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1px;
    background: rgba(79, 195, 247, 0.12);
    color: var(--accent-energy);
    padding: 4px 12px;
    border-radius: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    flex-shrink: 0;
}

.challenge-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.challenge-badge {
    display: inline-block;
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(102, 187, 106, 0.12);
    color: var(--accent-success);
    padding: 4px 10px;
    border-radius: 2px;
}

/* ============================================
   Submit Form
   ============================================ */

.submit-form {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.submit-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-energy), var(--blue-accent), transparent);
}

.submit-success {
    text-align: center;
    padding: 5rem 1.5rem;
}

.submit-success-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--accent-success);
}

.submit-success h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 0.75rem;
}

.submit-success p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* ============================================
   Buttons — Sharp, competitive
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: var(--white-pure);
    color: var(--navy-deep);
}
.btn-primary:hover {
    background: var(--white-off);
    color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white-pure);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white-pure);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-accent {
    background: var(--accent-energy);
    color: var(--navy-deep);
}
.btn-accent:hover {
    background: #6dd1fa;
    color: var(--navy-deep);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--accent-success);
    color: var(--navy-deep);
    font-weight: 700;
}
.btn-success:hover {
    background: #81c784;
    color: var(--navy-deep);
}

.btn-danger {
    background: var(--accent-live);
    color: var(--white-pure);
}
.btn-danger:hover {
    background: #ef5350;
    color: var(--white-pure);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
}

.btn-block { display: flex; width: 100%; }

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 1px;
    padding: 0.65rem 1.5rem;
    text-align: left;
    width: 100%;
    transition: all var(--transition);
    text-transform: uppercase;
}
.btn-link:hover {
    color: var(--white-pure);
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Forms — Clean, dark
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--white-muted);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--navy-deep);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-energy);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A3B1CC' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

textarea.form-input { resize: vertical; min-height: 80px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary) !important;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
    letter-spacing: 0.3px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-card {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 600px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.inline-form { display: inline; }

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    border-left: 3px solid;
}

.alert-success {
    background: rgba(102, 187, 106, 0.08);
    border-left-color: var(--accent-success);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(229, 57, 53, 0.08);
    border-left-color: var(--accent-live);
    color: var(--accent-live);
}

/* ============================================
   Badges / Tags
   ============================================ */

.badge {
    display: inline-block;
    font-family: var(--font-subheading);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.badge-success { background: rgba(102, 187, 106, 0.15); color: var(--accent-success); }
.badge-warning { background: rgba(255, 107, 53, 0.15); color: var(--accent-warning); }
.badge-danger { background: rgba(229, 57, 53, 0.15); color: var(--accent-live); }
.badge-info { background: rgba(79, 195, 247, 0.15); color: var(--accent-energy); }
.badge-muted { background: rgba(107, 122, 153, 0.15); color: var(--text-muted); }

/* ============================================
   Tables — Admin
   ============================================ */

.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--navy-mid);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table th {
    background: var(--navy-light);
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.table td { font-size: 0.92rem; }

.table tr:last-child td { border-bottom: none; }

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.actions {
    white-space: nowrap;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-live); }

.thumbnail {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================
   Admin Layout
   ============================================ */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(42, 74, 127, 0.15) 0%, transparent 60%),
        var(--navy-deep);
}

.login-container {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-energy), transparent);
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--white-pure);
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.login-form .form-group { margin-bottom: 1rem; }

.admin-body { background: var(--navy-deep); }

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--navy-mid);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    transition: transform var(--transition);
}

.admin-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-logo {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--white-pure);
}
.admin-logo:hover {
    color: var(--white-pure);
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.2);
}

.admin-logo small {
    display: block;
    font-family: var(--font-subheading);
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.admin-nav-link {
    display: block;
    padding: 0.7rem 1.5rem;
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--white-pure);
}
.admin-nav-link.active {
    color: var(--accent-energy);
    background: rgba(79, 195, 247, 0.06);
    border-right: 3px solid var(--accent-energy);
}

.admin-sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.admin-main {
    flex: 1;
    margin-left: 240px;
}

.admin-header {
    background: rgba(11, 26, 46, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-page-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--white-pure);
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--white-pure);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
}

.admin-content {
    padding: 2rem;
}

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

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ============================================
   Stats Grid — Dashboard
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-energy);
    opacity: 0.5;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--white-pure);
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-shortcuts {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.card {
    background: var(--navy-mid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--white-pure);
    margin-bottom: 1rem;
}

.mt-2 { margin-top: 2rem; }

/* ============================================
   File Upload Preview
   ============================================ */

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--accent-energy);
    background: rgba(79, 195, 247, 0.03);
}

.upload-area.dragover {
    border-color: var(--accent-energy);
    background: rgba(79, 195, 247, 0.06);
}

.upload-area.has-preview {
    padding: 0.5rem;
    border-style: solid;
    border-color: var(--accent-energy);
}

.upload-preview {
    max-width: 200px;
    border-radius: var(--radius);
    margin: 0 auto;
}

.upload-text {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.upload-text small {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0;
    opacity: 0.7;
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   Page Dividers
   ============================================ */

.divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.divider hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--blue-accent), transparent);
}

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

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    .site-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(17, 34, 64, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
    }
    .site-nav.open { display: flex; }
    .site-nav a {
        padding: 0.85rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    .site-nav a:last-child { border-bottom: none; }

    .hero { padding: 4rem 1.5rem 3rem; }
    .hero-title { transform: rotate(-1deg); }
    .hero-countdown { flex-wrap: wrap; gap: 0.5rem; }
    .countdown-item { min-width: 70px; padding: 1rem; }
    .countdown-item::after { display: none; }

    .form-row { grid-template-columns: 1fr; }

    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open { transform: translateX(0); }

    .admin-main { margin-left: 0; }
    .admin-menu-toggle { display: block; }
    .admin-content { padding: 1rem; }
    .admin-header { padding: 0 1rem; }

    .actions { flex-wrap: wrap; }

    .top3-grid { grid-template-columns: 1fr; max-width: 300px; }
    .challenges-grid { grid-template-columns: 1fr; }

    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) { display: none; }

    .section-title { font-size: 1.8rem; }
    .submit-form { padding: 1.5rem; }
    .container { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; letter-spacing: 3px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .countdown-item { min-width: 60px; }
}

/* ============================================
   Twitch Integration
   ============================================ */

.twitch-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #9146FF;
    color: var(--white-pure);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.2s;
    margin-left: 0.5rem;
}

.twitch-login-btn:hover {
    background: #7B2FFF;
    transform: translateY(-1px);
}

.twitch-icon {
    flex-shrink: 0;
}

.twitch-user-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: var(--radius-md);
}

.twitch-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #9146FF;
}

.twitch-user-name {
    color: var(--white-off);
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.9rem;
}

.twitch-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    transition: color 0.2s;
}

.twitch-logout-btn:hover {
    color: var(--accent-live);
}

/* Secret Mission Card */

.secret-mission {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1), rgba(255, 215, 0, 0.05));
    border: 2px solid #9146FF;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.secret-mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9146FF, #FFD700, #9146FF);
}

.secret-mission-badge {
    display: inline-block;
    background: #9146FF;
    color: var(--white-pure);
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.secret-mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.secret-mission-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #FFD700;
    letter-spacing: 1px;
}

.secret-mission-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.secret-mission-next {
    margin-top: 0.75rem;
    color: var(--accent-energy);
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Flash alerts */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(102, 187, 106, 0.15);
    border: 1px solid rgba(102, 187, 106, 0.3);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid rgba(229, 57, 53, 0.3);
    color: var(--accent-live);
}

/* Mobile responsive for Twitch elements */

@media (max-width: 768px) {
    .twitch-login-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .twitch-user-menu {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .secret-mission-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
