:root {
    --bg-color: #0a0814;
    --bg-mid: #12102a;
    --card-bg: rgba(28, 22, 48, 0.72);
    --primary: #7ef9ff;
    --secondary: #ff6b9d;
    --accent: #c4b5fd;
    --text-main: #f0eef8;
    --text-muted: #a8a0c0;
    --glow-mint: rgba(126, 249, 255, 0.45);
    --glow-pink: rgba(255, 107, 157, 0.4);
    --radius-card: 22px;
    --radius-pill: 999px;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

@media (hover: none) and (pointer: coarse) {
    * { cursor: auto; }
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse 80% 50% at 15% 10%, rgba(255, 107, 157, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 45% at 85% 20%, rgba(126, 249, 255, 0.14), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 90%, rgba(196, 181, 253, 0.12), transparent 55%),
        linear-gradient(180deg, var(--bg-color) 0%, var(--bg-mid) 50%, var(--bg-color) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Soft ring cursor --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px #fff, 0 0 14px var(--primary);
    will-change: left, top;
}

.cursor-crosshair {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--glow-mint);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: left, top;
}

.cursor-crosshair::before,
.cursor-crosshair::after {
    content: none;
}

body.hovering .cursor-dot {
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
    width: 8px;
    height: 8px;
}

body.hovering .cursor-crosshair {
    border-color: var(--secondary);
    box-shadow: 0 0 18px var(--glow-pink);
    transform: translate(-50%, -50%) scale(1.15);
}

/* --- Sparkle click burst --- */
.burst-particle {
    position: fixed;
    pointer-events: none;
    background: var(--primary);
    border-radius: 50%;
    z-index: 10001;
    animation: particle-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    box-shadow: 0 0 6px currentColor;
}

.burst-particle.is-star {
    background: transparent;
    box-shadow: none;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: var(--accent);
}

@keyframes particle-fade {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0) rotate(120deg); opacity: 0; }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.55;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.08) 50%,
        rgba(0,0,0,0.08)
    );
    background-size: 100% 5px;
    pointer-events: none;
    z-index: 100;
    opacity: 0.45;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.hacker-text {
    font-family: 'Nunito', sans-serif;
    cursor: none;
    /* Scramble uses wider glyphs; keep the slogan on one line */
    white-space: nowrap;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(120deg, #fff 0%, var(--primary) 45%, var(--secondary) 75%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 18px var(--glow-mint));
    margin-bottom: 14px;
    transform: translateY(-18px);
    animation: neon-shimmer 5s ease-in-out infinite;
    -webkit-user-select: none;
    user-select: none;
}

.hero p {
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    font-weight: 600;
    color: var(--primary);
    max-width: min(100%, 42rem);
    letter-spacing: 0.4px;
    opacity: 0.95;
    text-shadow: 0 0 12px var(--glow-mint);
    min-height: 1.6em;
    transform: translateY(-18px);
    -webkit-user-select: none;
    user-select: none;
}

.scroll-indicator {
    --magnet-x: 0px;
    --magnet-y: 0px;
    position: absolute;
    bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin-bottom: -16px;
    opacity: 0.85;
    cursor: none;
    text-decoration: none;
    color: inherit;
    transform: translate(var(--magnet-x), var(--magnet-y)) scale(1);
    transition: opacity 0.3s, transform 0.15s ease-out, filter 0.3s;
    filter: drop-shadow(0 0 10px var(--glow-mint));
}

.scroll-indicator:hover,
.scroll-indicator.magnet-active {
    opacity: 1;
    filter: drop-shadow(0 0 16px var(--glow-pink));
}

.scroll-indicator.magnet-active {
    transform: translate(var(--magnet-x), var(--magnet-y)) scale(1.1);
}

.scroll-indicator__arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 34px;
}

.scroll-indicator__arrow span {
    display: block;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    border-radius: 1px;
    transform: rotate(45deg);
    opacity: 0;
    animation: scroll-arrow 2.2s ease-in-out infinite;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 1px 1px 8px var(--glow-mint);
}

.scroll-indicator__arrow span:nth-child(1) {
    animation-delay: 0s;
    border-color: var(--primary);
}

.scroll-indicator__arrow span:nth-child(2) {
    animation-delay: 0.16s;
    border-color: #a8f7ff;
}

.scroll-indicator__arrow span:nth-child(3) {
    animation-delay: 0.32s;
    border-color: var(--accent);
}

.scroll-indicator:hover .scroll-indicator__arrow span,
.scroll-indicator.magnet-active .scroll-indicator__arrow span {
    border-color: var(--secondary);
    box-shadow: 1px 1px 12px var(--glow-pink);
    animation-play-state: paused;
    opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-indicator__arrow span {
        animation: none;
        opacity: 0.7;
    }

    .scroll-indicator__arrow span:nth-child(2) {
        opacity: 0.55;
    }

    .scroll-indicator__arrow span:nth-child(3) {
        opacity: 0.4;
    }
}

.games-section {
    padding: 100px 20px;
    max-width: 1410px;
    margin: 0 auto;
    flex: 1;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 80px;
    color: #fff;
    position: relative;
    letter-spacing: 1px;
    text-shadow: 0 0 20px var(--glow-pink);
}

.section-title::after {
    content: '';
    display: block;
    width: 96px;
    height: 5px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    margin: 18px auto 0;
    box-shadow: 0 0 18px var(--glow-pink);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    padding: 0 10px;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid rgba(196, 181, 253, 0.22);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.35s,
                box-shadow 0.35s;
    position: relative;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    box-shadow:
        0 12px 36px -12px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(126, 249, 255, 0.06);
    transform: translateY(-10px);
}

.game-card:hover {
    transform: translateY(-28px) scale(1.025);
    border-color: rgba(126, 249, 255, 0.55);
    box-shadow:
        0 0 36px var(--glow-mint),
        0 0 48px rgba(255, 107, 157, 0.12),
        inset 0 0 24px rgba(126, 249, 255, 0.04);
}

.card-header {
    width: 100%;
    aspect-ratio: 1232 / 706;
    position: relative;
    overflow: hidden;
    background: #120e1c;
}

.card-header img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-card:hover .card-header img {
    transform: scale(1.06);
}

.card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.65rem;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
    text-transform: none;
    line-height: 1.25;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(126, 249, 255, 0.12), rgba(255, 107, 157, 0.12));
    border: 1px solid rgba(196, 181, 253, 0.35);
    border-radius: var(--radius-pill);
    color: var(--accent);
    letter-spacing: 0.3px;
    transition: 0.3s;
}

.game-card:hover .tag {
    color: var(--primary);
    border-color: rgba(126, 249, 255, 0.4);
}

.description {
    color: var(--text-muted);
    font-size: 1.02rem;
    margin-bottom: 30px;
    flex-grow: 1;
    line-height: 1.75;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 22px;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-pill);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    cursor: none;
    z-index: 1;
    flex: 1;
    min-width: 140px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #b8fdff);
    transition: all 0.35s;
    z-index: -1;
}

.btn:hover {
    color: #0a0814;
    box-shadow: 0 0 24px var(--glow-mint);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn:hover::before {
    left: 0;
}

.btn-secondary {
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary::before {
    background: linear-gradient(90deg, var(--secondary), #ff9ec0);
}

.btn-secondary:hover {
    color: #fff;
    box-shadow: 0 0 24px var(--glow-pink);
    border-color: var(--secondary);
}

.btn-press {
    color: var(--text-main);
    border-color: rgba(240, 238, 248, 0.55);
}

.btn-press::before {
    background: linear-gradient(90deg, #fff, var(--accent));
}

.btn-press:hover {
    color: #0a0814;
    box-shadow: 0 0 22px rgba(196, 181, 253, 0.55);
    border-color: #fff;
}

footer {
    text-align: center;
    padding: 60px 20px;
    margin-top: auto;
    position: relative;
    background:
        linear-gradient(180deg, rgba(18, 16, 42, 0) 0%, rgba(18, 16, 42, 0.55) 28%, rgba(10, 8, 20, 0.92) 100%);
    border-top: none;
}

footer::before {
    content: '';
    display: block;
    width: min(220px, 40%);
    height: 2px;
    margin: 0 auto 36px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--accent), transparent);
    box-shadow: 0 0 14px var(--glow-mint), 0 0 22px var(--glow-pink);
    opacity: 0.85;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 25px;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 1px;
    cursor: none;
}

.social-link:hover {
    color: var(--secondary);
    text-shadow: 0 0 14px var(--glow-pink);
    transform: translateY(-3px) scale(1.05);
}

.copyright {
    color: #5c5678;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@keyframes neon-shimmer {
    0%, 100% { background-position: 0% center; filter: drop-shadow(0 0 16px var(--glow-mint)); }
    50% { background-position: 100% center; filter: drop-shadow(0 0 22px var(--glow-pink)); }
}

@keyframes scroll-arrow {
    0% {
        opacity: 0;
        transform: translateY(-6px) rotate(45deg);
    }
    30%, 50% {
        opacity: 0.95;
        transform: translateY(0) rotate(45deg);
    }
    100% {
        opacity: 0;
        transform: translateY(8px) rotate(45deg);
    }
}

@media (max-width: 768px) {
            .cursor-dot, .cursor-crosshair { display: none; }
            .game-grid { grid-template-columns: 1fr; padding: 0; }

            .hacker-text {
                white-space: normal;
            }
            
            .hero {
                padding: 0 20px;
                padding-bottom: 180px;
            }

            .scroll-indicator {
                bottom: 120px;
            }

            .game-title {
                font-size: 1.4rem;
            }
        }
