:root {
    --cold-blue: #A5C9CA;
    --cold-silver: #E7F6F2;
    --dark-bg: #0F0F13;
    --panel-bg: rgba(20, 20, 25, 0.6);
    --panel-border: rgba(165, 201, 202, 0.15);
    --text-main: #FFFFFF;
    --text-sec: #8FA5A5;
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-main);
    background-color: var(--dark-bg);
    overflow-x: hidden;
}

h1, h2, h3, .scroll-down {
    font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
}

/* Custom Cursor */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--cold-silver);
}
.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--cold-blue);
}
.cursor-dot, .cursor-outline {
    position: fixed;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s;
}

/* Background */
#particles-js {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: url('assets/bg_cold.png') no-repeat center center;
    background-size: cover;
}
#particles-js::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 15, 19, 0.3);
}

/* SPA Views */
.view {
    display: none;
    animation: fadeIn 0.8s ease-out forwards;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Blink Overlay (Closing -> Opening) */
.blink-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: none;
}
.blink-overlay.active {
    display: block;
}
.eyelid {
    position: absolute;
    left: 0; width: 100%; height: 0; /* Starts open */
    background: #000;
    transition: height 0.6s cubic-bezier(0.8, 0, 0.2, 1);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
.eyelid-top { top: 0; }
.eyelid-bottom { bottom: 0; }

.blink-overlay.closing .eyelid {
    height: 50vh; /* Eyes closed */
}
.blink-overlay.opening .eyelid {
    height: 0; /* Eyes opened again */
}

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: border-color 0.4s;
}
.glass-panel:hover {
    border-color: rgba(165, 201, 202, 0.4);
}

.text-center { text-align: center; }

/* Intro View */
#intro-view .intro-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.btn-initiate {
    margin-top: 3rem;
    font-size: 1.5rem;
    padding: 1rem 4rem;
    border-color: var(--cold-silver);
    color: var(--cold-silver);
    background: transparent;
    border-radius: 4px;
    transition: all 0.5s;
    letter-spacing: 0.2em;
    animation: fadePulse 2s infinite;
}
.btn-initiate:hover {
    background: var(--cold-silver);
    color: var(--dark-bg);
    box-shadow: 0 0 30px rgba(231, 246, 242, 0.5);
    animation: none;
}

/* Main View */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.main-title {
    font-size: 5rem;
    letter-spacing: 0.2em;
    color: var(--cold-silver);
    text-shadow: 0 0 20px rgba(165, 201, 202, 0.5);
    margin-bottom: 1rem;
}
.subtitle {
    font-size: 1.2rem;
    color: var(--text-sec);
    letter-spacing: 0.1em;
}
.scroll-down {
    margin-top: 4rem;
    font-size: 0.8rem;
    color: var(--cold-blue);
    letter-spacing: 0.3em;
    animation: fadePulse 2s infinite;
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    font-size: 2rem;
    color: var(--cold-silver);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}
.section-desc {
    color: var(--text-sec);
    margin-bottom: 3rem;
}

/* Game Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.game-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    display: block;
    transition: transform 0.4s ease, border-color 0.4s;
}
.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--cold-blue);
    box-shadow: 0 10px 30px rgba(165, 201, 202, 0.1);
}
.card-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(40%) brightness(0.8);
    background-color: #1a1a24;
}
.game-card:hover .card-img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1);
}
.card-content {
    padding: 1.5rem;
    position: relative;
    background: var(--panel-bg);
    z-index: 2;
}
.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--cold-silver);
}
.card-content p {
    font-size: 0.9rem;
    color: var(--cold-blue);
}

/* Arcade View */
.arcade-header {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.btn-back {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--text-sec);
    color: var(--text-sec);
}
.arcade-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}
.minigame-container {
    text-align: center;
    padding: 2rem;
    position: relative;
}
.high-score {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--accent-pink, #F9A8D4);
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(249, 168, 212, 0.3);
}
.game-result {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--cold-blue);
    min-height: 2rem;
}

/* Reflex Test */
.reaction-box {
    width: 100%;
    height: 200px;
    background: rgba(26, 26, 36, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-sec);
    transition: background 0.1s;
    user-select: none;
}
.reaction-box.waiting { background: #802020; color: white; }
.reaction-box.ready { background: #208040; color: white; }

/* Aim Trainer */
.aim-box {
    width: 100%;
    height: 300px;
    background: rgba(15, 15, 20, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.aim-target {
    width: 30px;
    height: 30px;
    background: var(--cold-silver);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px var(--cold-silver);
    transition: transform 0.1s;
}
.aim-target.hidden { display: none; }
.aim-target:active { transform: scale(0.8); }

/* Memory Matrix */
.memory-controls { margin-bottom: 2rem; }
.memory-box {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 10px;
    justify-content: center;
}
.mem-cell {
    width: 100px;
    height: 100px;
    background: rgba(40, 40, 50, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    transition: background 0.1s, transform 0.1s;
}
.mem-cell.active {
    background: var(--cold-blue);
    box-shadow: 0 0 15px var(--cold-blue);
}
.mem-cell.selected {
    background: var(--cold-silver);
}
.mem-cell.wrong {
    background: #802020;
}
.mem-cell:active {
    transform: scale(0.95);
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.btn {
    padding: 1rem 3rem;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    background: transparent;
    border: 1px solid var(--cold-blue);
    color: var(--cold-blue);
}
.btn:hover {
    background: var(--cold-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(165, 201, 202, 0.4);
}
.btn-oopz {
    border-color: #E7F6F2;
    color: #E7F6F2;
}
.btn-oopz:hover {
    background: #E7F6F2;
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(231, 246, 242, 0.4);
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-sec);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .main-title { font-size: 3rem; }
    * { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
    .high-score { position: static; margin-bottom: 1rem; }
}
