:root {
    --bg-dark: #020617;
    --primary: #00e676;
    --primary-glow: rgba(0, 230, 118, 0.3);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --card-bg: rgba(15, 23, 42, 0.6);
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(0, 230, 118, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        linear-gradient(to bottom, #020617, #0f172a);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    width: 100%; 
}

/* ================= NAV ================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap; /* Important for mobile */
}

.logo {
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links { 
    display: flex; 
    gap: 2rem; 
    align-items: center; 
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--primary); 
    text-shadow: 0 0 10px var(--primary-glow); 
}

.nhtml-badge { 
    background: rgba(56, 189, 248, 0.1); 
    border: 1px solid var(--accent); 
    color: var(--accent) !important; 
    padding: 5px 12px; 
    border-radius: 8px; 
    font-weight: 800; 
    font-size: 0.8rem; 
}

/* ================= BUTTONS ================= */
.btn-download {
    background: rgba(0, 230, 118, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-download:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary {
    background: var(--primary); 
    color: var(--bg-dark); 
    padding: 1rem 2rem; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 1.1rem; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    transition: all 0.3s; 
    border: 1px solid var(--primary);
}
.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 25px var(--primary-glow); 
}

.btn-secondary {
    background: var(--card-bg); 
    color: var(--text); 
    padding: 1rem 2rem; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 1.1rem; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    border: 1px solid var(--border); 
    transition: all 0.3s;
}
.btn-secondary:hover { 
    border-color: var(--text-dim); 
    background: rgba(255,255,255,0.05); 
}

/* ================= HAMBURGER MENU ================= */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ================= RESPONSIVE (MOBILE) ================= */
@media (max-width: 768px) {
    nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem 0;
    }
    
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none; /* hidden by default on mobile */
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
        text-align: center;
        border-top: 1px solid var(--border);
        margin-top: 1rem;
    }
    
    .nav-links.open {
        display: flex;
    }

    /* Buttons overflow fix */
    .hero-cta {
        flex-direction: column !important;
        width: 100%;
        gap: 1rem !important;
    }
    .btn-primary, .btn-secondary, button.btn-speedtest {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        justify-content: center;
    }
}

/* ================= INDEX.PHP SPECIFIC ================= */
.hero { padding: 8rem 0 6rem; text-align: center; position: relative; flex: 1; }
.hero::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,230,118,0.05) 0%, transparent 70%);
    z-index: -1; pointer-events: none;
}
.hero-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}
.hero h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -2px; }
.hero h1 span { background: linear-gradient(to right, var(--text), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text-dim); max-width: 600px; margin: 0 auto 3rem; }
.hero-cta { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    text-align: left;
}
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}
.feature-icon { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.feature-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.feature-desc { font-size: 0.95rem; color: var(--text-dim); }

.story-section {
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4rem 1.5rem;
    margin-top: 4rem;
}
.story-content { max-width: 800px; margin: 0 auto; text-align: center; }

/* SLIDER */
.slider-container {
    max-width: 900px;
    margin: 4rem auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slide {
    min-width: 100%;
    display: block;
}
.slide img {
    width: 100%;
    display: block;
}
.slider-dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active { background: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }

@media (max-width: 768px) {
    .hero { padding: 4rem 0 3rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; margin-bottom: 2rem; }
    .hero-cta { flex-direction: column; }
    .features { grid-template-columns: 1fr; margin: 2rem 0; }
    .slider-container { margin: 2rem auto; }
}

/* ================= LEADERBOARD.PHP SPECIFIC ================= */
.leaderboard-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 1rem; }
.leaderboard-table th { text-align: left; padding: 1rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; border-bottom: 1px solid var(--border); }
.leaderboard-table td { padding: 1rem; background: var(--card-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.leaderboard-table tr td:first-child { border-left: 1px solid var(--border); border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.leaderboard-table tr td:last-child { border-right: 1px solid var(--border); border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1); font-weight: 700; font-size: 0.9rem; }
.rank-1 .rank-badge { background: #fbbf24; color: #000; box-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }
.rank-2 .rank-badge { background: #94a3b8; color: #000; }
.rank-3 .rank-badge { background: #b45309; color: #fff; }
.score-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary); }
.spec-item { font-size: 0.8rem; color: var(--text-dim); display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.spec-item i { width: 14px; text-align: center; }
.loading-state { text-align: center; padding: 4rem; color: var(--text-dim); }
.podium-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; align-items: flex-end; }
.podium-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; text-align: center; position: relative; }
.podium-card.rank-1 { border-color: #fbbf24; transform: scale(1.05); z-index: 2; box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2); }
.podium-card.rank-2 { border-color: #94a3b8; }
.podium-card.rank-3 { border-color: #b45309; }
.podium-icon { font-size: 3rem; margin-bottom: 1rem; }
.rank-1 .podium-icon { color: #fbbf24; }
.rank-2 .podium-icon { color: #94a3b8; }
.rank-3 .podium-icon { color: #b45309; }
.table-responsive { overflow-x: auto; }
@media (max-width: 768px) {
    .podium-grid { grid-template-columns: 1fr; align-items: stretch; gap: 1rem; }
    .podium-card.rank-1 { transform: none; order: -1; }
}

.leaderboard-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}
.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}
.search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.6rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-tab {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.filter-tab:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.filter-tab.active {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}
.hidden { display: none !important; }

/* ================= SPEEDTEST.PHP SPECIFIC ================= */
.header-title { text-align: center; margin-bottom: 3rem; }
.header-title h1 { font-size: 2.5rem; font-weight: 800; }
.header-title p { color: var(--text-dim); font-size: 1.1rem; }

.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 4rem; }
.diag-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.diag-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.diag-item { margin-bottom: 0.8rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; }
.diag-label { color: var(--text-dim); }
.diag-value { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary); text-align: right; }
.diag-note { font-size: 0.8rem; color: var(--text-dim); font-style: italic; margin-top: 1rem; }

/* Speedtest Widget */
.speedtest-container { text-align: center; padding: 2rem; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border); grid-column: 1 / -1; }
#dlMeter, #ulMeter { width: 150px; height: 150px; }
.meters { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; margin-bottom: 2rem; }
.meter-box { text-align: center; }
.meter-val { font-family: 'JetBrains Mono', monospace; font-size: 2.5rem; font-weight: 700; color: var(--text); }
.ping-jit { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.pj-box { background: rgba(0,0,0,0.3); padding: 1rem 2rem; border-radius: 8px; }
.pj-val { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 700; }
button.btn-speedtest { background: var(--primary); color: #000; border: none; padding: 1rem 3rem; font-size: 1.2rem; font-weight: 800; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
button.btn-speedtest:hover { transform: scale(1.05); box-shadow: 0 0 20px var(--primary-glow); }

@media (max-width: 768px) {
    .diag-grid { grid-template-columns: 1fr; }
    .meters { gap: 1rem; }
    .ping-jit { flex-direction: column; gap: 1rem; }
    .speedtest-container { padding: 1rem; }
}

/* SPEEDTEST ANIMATION & IPV6 */
.diag-value { word-break: break-all; }
@keyframes testPulse { 0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(0, 230, 118, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); } }
.speedtest-running { animation: testPulse 2s infinite; border-color: var(--primary) !important; }
    <style>
        /* ── Page Détail ─────────────────────────────────────── */
        .detail-hero {
            background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(139,92,246,0.1) 100%);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            padding: 2rem;
            margin-bottom: 2rem;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 1.5rem;
        }
        .hero-rank {
            font-family: 'Outfit', sans-serif;
            font-size: clamp(3rem, 8vw, 5rem);
            font-weight: 800;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            line-height: 1;
            min-width: 80px;
            text-align: center;
        }
        .hero-info { flex: 1; min-width: 200px; }
        .hero-info h1 {
            font-family: 'Outfit', sans-serif;
            font-size: clamp(1.2rem, 4vw, 1.8rem);
            font-weight: 800;
            margin-bottom: 0.4rem;
        }
        .hero-info .hero-sub {
            color: var(--text-muted);
            font-size: 0.9rem;
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
        }
        .hero-info .hero-sub span { display: flex; align-items: center; gap: 0.3rem; }
        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--text-main);
            padding: 0.6rem 1.2rem;
            border-radius: 10px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            transition: background 0.2s, transform 0.1s;
            margin-bottom: 1.5rem;
        }
        .back-btn:hover { background: rgba(59,130,246,0.2); transform: translateX(-3px); }

        /* Scores */
        .scores-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }
        .score-box {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 1.2rem 1rem;
            text-align: center;
        }
        .score-box .score-icon {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            display: block;
        }
        .score-box .score-val {
            font-family: 'Outfit', sans-serif;
            font-size: 1.6rem;
            font-weight: 800;
            display: block;
        }
        .score-box .score-label { font-size: 0.75rem; color: var(--text-muted); }
        .score-box.cpu .score-val { color: #60a5fa; }
        .score-box.gpu .score-val { color: #a78bfa; }
        .score-box.ram-s .score-val { color: #34d399; }
        .score-box.disk-s .score-val { color: #fbbf24; }

        /* Barres de perf */
        .perf-section { margin-bottom: 2rem; }
        .perf-section h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--text-muted);
            display: flex; align-items: center; gap: 0.5rem;
        }
        .perf-bar-row { margin-bottom: 1rem; }
        .perf-bar-header {
            display: flex; justify-content: space-between;
            font-size: 0.85rem; margin-bottom: 0.4rem;
        }
        .perf-bar-track {
            background: rgba(255,255,255,0.06);
            border-radius: 6px;
            height: 10px;
            overflow: hidden;
        }
        .perf-bar-fill {
            height: 100%;
            border-radius: 6px;
            transition: width 1s ease;
        }
        .perf-bar-fill.cpu { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
        .perf-bar-fill.gpu { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

        /* Config cards */
        .config-section h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--text-muted);
            display: flex; align-items: center; gap: 0.5rem;
        }
        .config-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1rem;
        }
        .config-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 1.2rem 1.4rem;
        }
        .config-card h3 {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
            display: flex; align-items: center; gap: 0.4rem;
        }
        .config-card p, .config-card .val {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
            word-break: break-word;
        }
        .disk-item {
            background: rgba(255,255,255,0.05);
            border-radius: 8px;
            padding: 0.4rem 0.7rem;
            font-size: 0.9rem;
            margin-bottom: 0.3rem;
            display: flex; align-items: center; gap: 0.5rem;
        }
        .muted { color: var(--text-muted); font-style: italic; }

        /* Responsive */
        @media (max-width: 600px) {
            .detail-hero { flex-direction: column; text-align: center; }
            .hero-info .hero-sub { justify-content: center; }
            .scores-grid { grid-template-columns: repeat(2, 1fr); }
        }

/* ================= SITE FOOTER ================= */
.site-footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    font-size: 0.9rem;
}
.site-footer p { margin-bottom: 1.5rem; }
.site-footer .nhtml-badge {
    display: inline-block;
}
