@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Orbitron:wght@400;700;900&display=swap');

/* ===== ROOT VARIABLES (sama dengan index) ===== */
:root {
    --text-color: #f5f5f5;
    --hover-color: #12f7ff;
    --bg-color: #250821;
    --secon-bg-color: #292e33;
    --big-font: 2.5rem;
    --normal-font: 2rem;
    --neon-box-shadow: 0 0 .5rem #12f7ff;
    --h2-font: 3rem;
    --font-neon-text-shadow: 0 0 10px rgba(18,247,255,0.3),
        0 0 20px rgba(18,247,255,0.3),
        0 0 40px rgba(18,247,255,0.3),
        0 0 80px rgba(18,247,255,0.3);
    --neon-glow: 0 0 10px rgba(18,247,255,0.6),
        0 0 20px rgba(18,247,255,0.4),
        0 0 40px rgba(18,247,255,0.2);
    --card-bg: rgba(41, 46, 51, 0.7);
    --orbitron: 'Orbitron', monospace;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    list-style: none;
    scroll-behavior: smooth;
    text-decoration: none;
}

::-webkit-scrollbar { width: .5rem; }
::-webkit-scrollbar-track { background: var(--secon-bg-color); }
::-webkit-scrollbar-thumb { background: var(--hover-color); border-radius: 5rem; }

body {
    font-family: "Poppins", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* ===== PARTICLE CANVAS ===== */
#particleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 10%;
    background: rgba(37, 8, 33, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(18, 247, 255, 0.15);
}

.logo a {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-color);
}

.logo span { color: var(--hover-color); }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hover-color);
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid var(--hover-color);
    border-radius: 5px;
    transition: .4s;
    box-shadow: var(--neon-box-shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.back-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 0; height: 100%;
    background: var(--hover-color);
    transition: .4s;
    z-index: -1;
}
.back-btn:hover { color: var(--bg-color); }
.back-btn:hover::before { width: 100%; }

/* ===== SECTIONS BASE ===== */
section {
    position: relative;
    z-index: 1;
    padding: 100px 10%;
}

/* ===== FADE IN ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease, transform .8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity .9s ease, transform .9s ease;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* ===== GLITCH EFFECT ===== */
.glitch-wrapper { position: relative; }

.glitch {
    font-family: var(--orbitron);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    color: var(--hover-color);
    text-shadow: var(--font-neon-text-shadow);
    position: relative;
    display: inline-block;
    letter-spacing: 4px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
}

.glitch::before {
    color: #ff00ff;
    animation: glitch1 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
}

.glitch::after {
    color: #00ff00;
    animation: glitch2 3s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    92% { transform: translate(-3px, 2px); opacity: 0.7; }
    94% { transform: translate(3px, -2px); opacity: 0.7; }
    96% { transform: translate(0); opacity: 0; }
}
@keyframes glitch2 {
    0%, 88%, 100% { transform: translate(0); opacity: 0; }
    90% { transform: translate(3px, 2px); opacity: 0.7; }
    92% { transform: translate(-3px, -2px); opacity: 0.7; }
    94% { transform: translate(0); opacity: 0; }
}

/* ===== ABOUT HERO ===== */
.about-hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding-top: 130px;
}

.subtitle {
    font-family: var(--orbitron);
    color: rgba(18, 247, 255, 0.6);
    font-size: 1rem;
    letter-spacing: 3px;
    margin: .8rem 0 1.5rem;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(18, 247, 255, 0.1);
    border: 1px solid rgba(18, 247, 255, 0.4);
    color: var(--hover-color);
    padding: .35rem .9rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 500;
    transition: .3s;
}
.tag:hover {
    background: var(--hover-color);
    color: var(--bg-color);
    box-shadow: var(--neon-box-shadow);
}

.neon-divider {
    width: 80px;
    height: 3px;
    background: var(--hover-color);
    box-shadow: var(--neon-glow);
    margin: 1.5rem 0;
    border-radius: 3px;
}

.about-desc {
    color: #c0c0c0;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-weight: 300;
}
.about-desc strong { color: var(--hover-color); font-weight: 600; }

.contact-links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--hover-color);
    font-size: .9rem;
    font-weight: 500;
    padding: .5rem 1rem;
    border: 1px solid rgba(18,247,255,0.3);
    border-radius: 5px;
    transition: .3s;
}
.contact-links a:hover {
    background: rgba(18,247,255,0.1);
    box-shadow: var(--neon-box-shadow);
}

/* ===== PROFILE IMAGE ===== */
.profile-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: auto;
}

.profile-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(18, 247, 255, 0.4);
    animation: spinRing 12s linear infinite;
}
.profile-ring { width: 340px; height: 340px; }
.profile-ring.ring2 { width: 390px; height: 390px; border-color: rgba(18,247,255,0.15); animation-direction: reverse; animation-duration: 18s; border-style: dashed; }
.profile-ring.ring3 { width: 440px; height: 440px; border-color: rgba(255,0,255,0.1); animation-duration: 25s; }

@keyframes spinRing {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.profile-img-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 280px; height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--hover-color);
    box-shadow: var(--neon-glow), inset 0 0 30px rgba(18,247,255,0.1);
}
.profile-img-box img { width: 100%; height: 100%; object-fit: cover; }

.profile-badge {
    position: absolute;
    bottom: 10px; left: 50%;
    transform: translateX(-50%);
    background: rgba(37, 8, 33, 0.9);
    border: 1px solid var(--hover-color);
    border-radius: 50px;
    padding: .4rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    box-shadow: var(--neon-box-shadow);
    color: var(--hover-color);
}

.badge-dot {
    width: 8px; height: 8px;
    background: #00ff6a;
    border-radius: 50%;
    box-shadow: 0 0 6px #00ff6a;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.4); }
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: var(--secon-bg-color);
    padding: 80px 10%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--bg-color);
    border-radius: 15px;
    border: 1px solid rgba(18,247,255,0.2);
    position: relative;
    overflow: hidden;
    transition: .4s;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--hover-color);
    box-shadow: var(--neon-box-shadow);
    transform: scaleX(0);
    transition: .4s;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(18,247,255,0.15);
    border-color: var(--hover-color);
}

.stat-icon i {
    font-size: 2.5rem;
    color: var(--hover-color);
    margin-bottom: .5rem;
    display: block;
}

.stat-number {
    font-family: var(--orbitron);
    font-size: 3rem;
    font-weight: 900;
    color: var(--hover-color);
    display: inline-block;
    text-shadow: var(--font-neon-text-shadow);
}
.stat-plus {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--hover-color);
    vertical-align: top;
    margin-top: .4rem;
}
.stat-label {
    color: #9e9e9e;
    font-size: .9rem;
    margin-top: .4rem;
}

/* ===== SECTION TITLE ===== */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-sub {
    color: rgba(18,247,255,0.6);
    font-size: .8rem;
    font-weight: 200;
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-bottom: .5rem;
}
.section-title h2 {
    font-family: var(--orbitron);
    font-size: var(--normal-font);
    font-weight: 700;
    color: var(--hover-color);
    text-shadow: var(--font-neon-text-shadow);
}
.game-subtitle {
    color: #9e9e9e;
    margin-top: .5rem;
}

/* ===== TIMELINE ===== */
.timeline-section { background: var(--secon-bg-color); }

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%; top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--hover-color), transparent);
    box-shadow: var(--neon-box-shadow);
}

.timeline-item {
    width: 45%;
    margin-bottom: 3rem;
}
.timeline-item.left { margin-right: auto; }
.timeline-item.right { margin-left: auto; }

.timeline-content {
    background: var(--bg-color);
    border: 1px solid rgba(18,247,255,0.25);
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    transition: .4s;
}
.timeline-content:hover {
    border-color: var(--hover-color);
    box-shadow: var(--neon-box-shadow);
    transform: scale(1.03);
}

.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    right: -10px; top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 2px;
    background: var(--hover-color);
}
.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    left: -10px; top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 2px;
    background: var(--hover-color);
}

.timeline-year {
    font-family: var(--orbitron);
    font-size: .75rem;
    color: var(--hover-color);
    letter-spacing: 2px;
    margin-bottom: .5rem;
}
.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: .4rem;
}
.timeline-content p {
    font-size: .85rem;
    color: #9e9e9e;
    line-height: 1.6;
}

/* ===== GAME SECTION ===== */
.game-section {
    background: var(--bg-color);
}

.game-container {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Game Cards */
.game-info-card, .score-card, .attempts-card, .history-card, .tip-card {
    background: var(--card-bg);
    border: 1px solid rgba(18,247,255,0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.game-info-card h3, .score-card h3, .attempts-card h3,
.history-card h3, .tip-card h3 {
    font-size: .9rem;
    color: var(--hover-color);
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.game-info-card ul { padding: 0; }
.game-info-card li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #c0c0c0;
    margin-bottom: .5rem;
}

.clue { font-size: 1.1rem; }

.score-display {
    font-family: var(--orbitron);
    font-size: 3rem;
    font-weight: 900;
    color: var(--hover-color);
    text-shadow: var(--font-neon-text-shadow);
    text-align: center;
}
.high-score { text-align: center; font-size: .75rem; color: #888; margin-top: .3rem; }

.attempts-bars { display: flex; gap: .3rem; margin-top: .5rem; }
.attempt-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(18,247,255,0.15);
    border: 1px solid rgba(18,247,255,0.2);
    transition: .3s;
}
.attempt-bar.filled {
    background: var(--hover-color);
    box-shadow: var(--neon-box-shadow);
}

/* Game Board */
.game-board {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 300px;
    margin-bottom: 1.5rem;
}

.board-row {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.board-cell {
    width: 50px; height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(18,247,255,0.2);
    background: rgba(18,247,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--orbitron);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    transition: .3s;
}
.board-cell.correct {
    background: rgba(18,247,255,0.2);
    border-color: var(--hover-color);
    color: var(--hover-color);
    box-shadow: var(--neon-box-shadow);
    animation: popIn .3s ease;
}
.board-cell.present {
    background: rgba(255, 200, 0, 0.15);
    border-color: #ffc800;
    color: #ffc800;
    box-shadow: 0 0 .5rem #ffc800;
    animation: popIn .3s ease;
}
.board-cell.absent {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    color: #555;
}

@keyframes popIn {
    0% { transform: scale(.8); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.board-clues {
    display: flex;
    gap: .2rem;
    margin-left: .5rem;
}
.mini-clue {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}
.mini-clue.c { background: var(--hover-color); box-shadow: var(--neon-box-shadow); }
.mini-clue.p { background: #ffc800; }
.mini-clue.a { background: #333; }

/* Game Input */
.game-input-area {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.digit-inputs {
    display: flex;
    gap: .5rem;
}

.digit-input {
    width: 55px; height: 60px;
    text-align: center;
    font-family: var(--orbitron);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hover-color);
    background: rgba(18,247,255,0.05);
    border: 2px solid rgba(18,247,255,0.3);
    border-radius: 8px;
    outline: none;
    transition: .3s;
    -moz-appearance: textfield;
}
.digit-input::-webkit-outer-spin-button,
.digit-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.digit-input:focus {
    border-color: var(--hover-color);
    box-shadow: var(--neon-box-shadow);
    background: rgba(18,247,255,0.1);
}

.guess-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--hover-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    padding: .8rem 1.4rem;
    font-family: var(--orbitron);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    box-shadow: var(--neon-box-shadow);
    letter-spacing: 1px;
}
.guess-btn:hover { transform: translateY(-3px); box-shadow: var(--neon-glow); }
.guess-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.game-message {
    text-align: center;
    font-family: var(--orbitron);
    font-size: 1rem;
    min-height: 30px;
    letter-spacing: 1px;
    color: var(--hover-color);
}
.game-message.win { color: var(--hover-color); text-shadow: var(--font-neon-text-shadow); animation: flashWin 1s ease; }
.game-message.lose { color: #ff4757; text-shadow: 0 0 10px rgba(255,71,87,0.5); }

@keyframes flashWin {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

.new-game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: transparent;
    color: var(--hover-color);
    border: 1px solid var(--hover-color);
    border-radius: 8px;
    padding: .6rem 1.2rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
    margin: 0 auto;
    letter-spacing: 1px;
}
.new-game-btn:hover { background: rgba(18,247,255,0.1); box-shadow: var(--neon-box-shadow); }

/* History */
.history-list { max-height: 250px; overflow-y: auto; }
.history-list::-webkit-scrollbar { width: 3px; }
.history-list::-webkit-scrollbar-thumb { background: var(--hover-color); border-radius: 3px; }

.no-history { font-size: .8rem; color: #555; text-align: center; padding: .5rem 0; }

.history-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: .75rem;
}
.history-guess {
    font-family: var(--orbitron);
    font-size: .85rem;
    color: var(--text-color);
    letter-spacing: 2px;
}
.history-result { display: flex; gap: 2px; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; }
.h-c { background: var(--hover-color); }
.h-p { background: #ffc800; }
.h-a { background: #333; border: 1px solid #555; }

.tip-card p { font-size: .8rem; color: #9e9e9e; line-height: 1.6; }

/* ===== FUN FACTS ===== */
.fun-facts { background: var(--secon-bg-color); }

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.fact-card {
    background: var(--bg-color);
    border: 1px solid rgba(18,247,255,0.15);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: .4s;
    cursor: default;
}
.fact-card:hover {
    border-color: var(--hover-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(18,247,255,0.1);
}
.fact-emoji { font-size: 3rem; margin-bottom: 1rem; display: block; }
.fact-card h3 { color: var(--hover-color); margin-bottom: .5rem; }
.fact-card p { font-size: .85rem; color: #9e9e9e; line-height: 1.6; }

/* ===== FOOTER ===== */
footer {
    padding: 1.5rem 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
footer p { color: #bdbdbd; }
footer a {
    display: inline-flex;
    justify-content: center;
    color: var(--text-color);
    background: var(--hover-color);
    padding: .6rem;
    border-radius: 5px;
}
footer a i { font-size: 1rem; color: var(--secon-bg-color); }

/* ===== WIN CELEBRATION ===== */
.confetti-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}
.confetti-piece {
    position: absolute;
    width: 8px; height: 8px;
    top: -10px;
    animation: confettiFall linear forwards;
    border-radius: 2px;
}
@keyframes confettiFall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
    }
    .game-left, .game-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .facts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    header { padding: 15px 5%; }
    section { padding: 70px 5%; }

    .about-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-hero-left { order: 2; }
    .about-hero-right { order: 1; }
    .about-tags { justify-content: center; }
    .neon-divider { margin: 1.5rem auto; }
    .contact-links { justify-content: center; }

    .profile-container { width: 250px; height: 250px; }
    .profile-img-box { width: 200px; height: 200px; }
    .profile-ring { width: 240px; height: 240px; }
    .profile-ring.ring2 { width: 280px; height: 280px; }
    .profile-ring.ring3 { width: 320px; height: 320px; }

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

    .timeline::before { left: 20px; }
    .timeline-item { width: 80%; margin-left: 50px !important; margin-right: 0 !important; }
    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after { left: -10px; right: auto; }

    .game-left, .game-right { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .facts-grid { grid-template-columns: 1fr; }
    .digit-input { width: 45px; height: 50px; font-size: 1.2rem; }
}
