:root {
    --bg-1: #06101f;
    --bg-2: #0b1631;
    --bg-3: #1a1040;
    --surface: rgba(13, 20, 45, 0.74);
    --surface-2: rgba(255, 255, 255, 0.05);
    --text: #f7f9ff;
    --muted: #b8c3df;
    --cyan: #39f5f0;
    --cyan-soft: #a4fffb;
    --purple: #8b7cff;
    --pink: #ff7ddb;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

body.light-mode {
    --bg-1: #dff8ff;
    --bg-2: #edf5ff;
    --bg-3: #ece4ff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-2: rgba(30, 35, 70, 0.05);
    --text: #172035;
    --muted: #4b5877;
    --cyan: #00c9db;
    --cyan-soft: #42f7ff;
    --purple: #7060ff;
    --pink: #e85cbf;
    --border: rgba(23, 32, 53, 0.08);
    --shadow: 0 20px 50px rgba(59, 70, 110, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Outfit", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(57, 245, 240, 0.12), transparent 25%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
}

.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.6px),
        radial-gradient(circle at 21% 65%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.6px),
        radial-gradient(circle at 42% 14%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.6px),
        radial-gradient(circle at 61% 28%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.6px),
        radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.6px),
        radial-gradient(circle at 75% 60%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.6px),
        radial-gradient(circle at 12% 84%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.6px),
        radial-gradient(circle at 89% 80%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.6px);
    opacity: 0.55;
    z-index: -3;
    animation: starsFloat 8s ease-in-out infinite alternate;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -2;
    pointer-events: none;
}

.glow-left {
    width: 280px;
    height: 280px;
    top: 90px;
    left: -60px;
    background: rgba(57, 245, 240, 0.16);
}

.glow-right {
    width: 260px;
    height: 260px;
    right: -70px;
    bottom: 120px;
    background: rgba(139, 124, 255, 0.18);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(6, 16, 31, 0.45);
    border-bottom: 1px solid var(--border);
}

.navbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan-soft), var(--cyan));
    color: #06131f;
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    box-shadow: 0 0 25px rgba(57, 245, 240, 0.35);
}

.brand-mini {
    display: block;
    margin-bottom: 2px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--cyan-soft);
}

.brand-text h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 26px;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.theme-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    background: #fff;
    color: #161e33;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.hero {
    padding: 60px 0 70px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 32px;
    align-items: center;
    min-height: 580px;
}

.section-chip {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(57, 245, 240, 0.1);
    border: 1px solid rgba(57, 245, 240, 0.2);
    color: var(--cyan-soft);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.hero-content h2,
.section-heading h3,
.results-header h3 {
    margin: 0 0 18px;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.section-heading h3,
.results-header h3 {
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.hero-content h2 span {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(57, 245, 240, 0.2);
}

.hero-text,
.section-heading p,
.message-box {
    color: var(--muted);
    line-height: 1.75;
}

.hero-text {
    max-width: 620px;
}

.hero-actions,
.hero-cards,
.mood-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin: 28px 0 26px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #82ffff);
    color: #04131a;
    box-shadow: 0 0 24px rgba(57, 245, 240, 0.24);
}

.btn-secondary {
    background: #ffffff;
    color: #172034;
}

.pulse-btn {
    animation: pulseGlow 2s infinite;
}

.mini-panel {
    flex: 1 1 220px;
    padding: 18px;
    border-radius: 24px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.mini-panel span {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.mini-panel p {
    margin: 0;
    color: var(--muted);
}

.hero-scene {
    position: relative;
    min-height: 430px;
}

.scene-card {
    position: absolute;
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.scene-small {
    background: rgba(255, 255, 255, 0.05);
}

.small-one {
    width: 150px;
    height: 150px;
    top: 18px;
    right: 42px;
}

.small-two {
    width: 120px;
    height: 120px;
    bottom: 26px;
    left: 32px;
}

.scene-main {
    width: 310px;
    height: 230px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(18, 25, 52, 0.92), rgba(10, 15, 34, 0.98));
    overflow: hidden;
}

.scene-screen {
    position: absolute;
    inset: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at center, rgba(57, 245, 240, 0.33), rgba(57, 245, 240, 0.03) 70%),
        linear-gradient(180deg, #122646, #0e122a);
}

.scene-content {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 22px;
}

.scene-tag {
    color: var(--cyan-soft);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.scene-content h3 {
    margin: 12px 0 8px;
    font-size: 1.55rem;
}

.scene-content p {
    margin: 0;
    color: var(--muted);
}

.pixel {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #ffd75f;
    transform: rotate(45deg);
    box-shadow: 0 0 16px rgba(255, 215, 95, 0.45);
    animation: pixelFloat 3s ease-in-out infinite;
}

.pixel-1 {
    left: 76px;
    top: 70px;
}

.pixel-2 {
    right: 78px;
    bottom: 90px;
    animation-delay: 0.6s;
}

.pixel-3 {
    right: 26px;
    top: 220px;
    animation-delay: 1s;
}

.floating {
    animation: floatCard 4s ease-in-out infinite;
}

.small-one {
    animation-delay: 0.2s;
}

.small-two {
    animation-delay: 0.8s;
}

.moods-section,
.results-section {
    padding: 40px 0 50px;
}

.section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 32px;
}

.mood-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 34px;
    padding: 28px;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.mood-item {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 18px 14px;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.22s ease;
}

.mood-item:hover {
    transform: translateY(-3px);
    border-color: rgba(57, 245, 240, 0.42);
    box-shadow: 0 0 16px rgba(57, 245, 240, 0.14);
}

.mood-item.active {
    background: rgba(57, 245, 240, 0.12);
    border-color: rgba(57, 245, 240, 0.56);
    color: var(--cyan-soft);
    box-shadow: 0 0 18px rgba(57, 245, 240, 0.18);
}

.custom-mood-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.custom-mood-box label {
    font-weight: 700;
}

.custom-mood-box input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    outline: none;
}

.custom-mood-box input::placeholder {
    color: var(--muted);
}

.custom-mood-box input:focus {
    border-color: rgba(57, 245, 240, 0.46);
    box-shadow: 0 0 0 4px rgba(57, 245, 240, 0.1);
}

.status-section {
    padding-top: 10px;
}

.message-box {
    text-align: center;
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-weight: 600;
}

.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.counter-box {
    min-width: 150px;
    text-align: center;
    padding: 18px 20px;
    border-radius: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.counter-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 4px;
}

.counter-box strong {
    font-size: 1.9rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    min-height: 80px;
}

.game-card {
    overflow: hidden;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    animation: cardIn 0.45s ease;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.card-image-wrap {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(4, 20, 26, 0.76);
    color: var(--cyan-soft);
    border: 1px solid rgba(57, 245, 240, 0.2);
    font-size: 0.82rem;
    font-weight: 700;
}

.card-content {
    padding: 22px;
}

.game-title {
    margin: 0 0 14px;
    font-size: 1.3rem;
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.meta-pill.genre {
    background: rgba(139, 124, 255, 0.14);
    color: #d9d1ff;
}

.meta-pill.mood {
    background: rgba(57, 245, 240, 0.12);
    color: var(--cyan-soft);
}

.game-details {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: grid;
    gap: 10px;
}

.game-details li {
    color: var(--muted);
    line-height: 1.55;
}

.game-details strong {
    color: var(--text);
}

.card-actions {
    gap: 12px;
}

.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    animation: revealUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.15s;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pixelFloat {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
    }

    50% {
        transform: rotate(45deg) translateY(-10px);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 18px rgba(57, 245, 240, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(57, 245, 240, 0.42);
    }
}

@keyframes starsFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .mood-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-links {
        display: none;
    }

    .hero-scene {
        min-height: 380px;
    }
}

@media (max-width: 700px) {
    .results-header {
        flex-direction: column;
        align-items: start;
    }

    .mood-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h2 {
        font-size: 2.6rem;
    }

    .section-heading h3,
    .results-header h3 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 20px, 1140px);
    }

    .hero-actions,
    .hero-cards,
    .mood-actions,
    .card-actions {
        flex-direction: column;
    }

    .btn,
    .theme-btn {
        width: 100%;
        text-align: center;
    }

    .mood-panel,
    .message-box,
    .counter-box,
    .game-card {
        border-radius: 22px;
    }

    .scene-main {
        width: 240px;
        height: 190px;
    }

    .small-one,
    .small-two {
        width: 90px;
        height: 90px;
    }
}