:root {
    /* Color Palette */
    --midnight-purple: #1a1a2e;
    --galaxy-blue: #16213e;
    --deep-blue: #0f3460;
    --pastel-pink: #ffafcc;
    --soft-lavender: #b388ff;
    --accent-glow: #00d4ff;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Light mode keeps V1's original background and all UI colors. */
    --page-background: var(--midnight-purple);
    --page-gradient: radial-gradient(circle at 30% 30%, var(--deep-blue) 0%, transparent 40%),
                     radial-gradient(circle at 70% 60%, var(--galaxy-blue) 0%, transparent 40%),
                     radial-gradient(circle at 50% 50%, var(--midnight-purple) 0%, var(--midnight-purple) 100%);

    /* Rarity Colors */
    --rarity-uncommon: #91d9b3;
    --rarity-common: #b0bec5;
    --rarity-rare: #4fc3f7;
    --rarity-super-rare: #b388ff;
    --rarity-ultra-rare: #ffb74d;
    --rarity-legendary: #ff80ab;

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing & Misc */
    --nav-height: 80px;
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

/* Only the background comes from V2; V1's UI palette stays unchanged. */
:root[data-theme="dark"] {
    --page-background: #0b0b1a;
    --page-gradient: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--page-background);
    color: var(--white);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pastel-pink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 175, 204, 0.2);
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 75%
    );
    animation: shimmerMove 3s infinite;
    pointer-events: none;
}

@keyframes shimmerMove {
    0% { transform: translate(-30%, -30%); }
    100% { transform: translate(30%, 30%); }
}

/* Particle Background - Simple CSS version for stars/sparkles */
.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: sparkleAnim 3s infinite;
}

@keyframes sparkleAnim {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pastel-pink), var(--soft-lavender));
    color: var(--midnight-purple);
    box-shadow: 0 4px 15px rgba(255, 175, 204, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 175, 204, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--pastel-pink);
    color: var(--pastel-pink);
}

.btn-outline:hover {
    background: var(--pastel-pink);
    color: var(--midnight-purple);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-development { background: var(--rarity-rare); color: var(--midnight-purple); }
.badge-coming-soon { background: var(--rarity-super-rare); color: var(--white); }
.badge-concept { background: var(--rarity-common); color: var(--midnight-purple); }

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.accent {
    color: var(--pastel-pink);
    text-shadow: 0 0 15px rgba(255, 175, 204, 0.4);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-glow {
    color: var(--white);
    text-shadow: 0 0 20px var(--soft-lavender), 0 0 40px var(--accent-glow);
}

.hero-tagline {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
}

.blessing-btn {
    border-color: var(--accent-glow);
    color: var(--accent-glow);
}

.blessing-btn:hover {
    background: var(--accent-glow);
    color: var(--midnight-purple);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Featured Game Card */
.featured-game-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.game-artwork-placeholder {
    height: 400px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-logo-placeholder {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 4px;
    opacity: 0.5;
}

.game-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.game-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.game-description {
    margin-bottom: 25px;
    opacity: 0.8;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-artwork-placeholder.small {
    height: 200px;
    margin-bottom: 20px;
}

.game-title-small {
    font-size: 1.5rem;
    margin: 10px 0;
}

.game-desc-small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Updates Section */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.update-card {
    padding: 30px;
    transition: var(--transition-speed);
}

.update-card:hover {
    border-color: var(--pastel-pink);
    transform: scale(1.02);
}

.update-date {
    font-size: 0.75rem;
    color: var(--pastel-pink);
    font-weight: 700;
    margin-bottom: 10px;
}

.update-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

/* About Section */
.about-flex {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-content {
    flex: 1;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-image {
    flex: 1;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.studio-placeholder {
    text-align: center;
}

.pulse-icon {
    font-size: 4rem;
    color: var(--pastel-pink);
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; text-shadow: 0 0 0 rgba(255,175,204,0); }
    50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 20px rgba(255,175,204,0.8); }
    100% { transform: scale(1); opacity: 0.5; text-shadow: 0 0 0 rgba(255,175,204,0); }
}

/* Community Section */
.community-card {
    text-align: center;
    padding: 60px;
}

.community-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--pastel-pink);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-grid h4 {
    margin-bottom: 20px;
    color: var(--pastel-pink);
}

.footer-links li {
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: var(--pastel-pink);
    color: var(--midnight-purple);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Modal & Blessing System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    max-width: 500px;
    width: 90%;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.2);
}

#pull-animation {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-burst {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 50px 20px white;
    animation: burst 2s infinite;
}

@keyframes burst {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; filter: blur(5px); }
    100% { transform: scale(1.5); opacity: 0; }
}

.rarity-badge {
    display: inline-block;
    padding: 5px 20px;
    border-radius: 50px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--midnight-purple);
    font-size: 0.9rem;
}

.reward-card {
    margin-bottom: 30px;
}

#reward-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--white);
}

#reward-message {
    font-size: 1.1rem;
    opacity: 0.8;
}

.close-modal {
    background: var(--pastel-pink);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .featured-game-card {
        grid-template-columns: 1fr;
    }
    .about-flex {
        flex-direction: column;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 20px;
    }
    .glass-nav {
        padding: 0 20px;
    }
    .nav-links {
        position: fixed;
        top: 80px;
        left: 20px;
        right: 20px;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        gap: 20px;
        text-align: center;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .hero-title {
        font-size: 3rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
}

.hidden {
    display: none !important;
}

/* Background Layers */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: var(--page-gradient);
    animation: gradientMove 20s ease-in-out infinite alternate;
}

@keyframes gradientMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5%, 5%) rotate(5deg); }
}

.bg-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 160px 120px, white, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: starsMove 100s linear infinite;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

/* Navigation Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 50px;
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.logo .accent {
    color: var(--pastel-pink);
    text-shadow: 0 0 10px rgba(255, 175, 204, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a:hover {
    color: var(--pastel-pink);
    text-shadow: 0 0 8px var(--pastel-pink);
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-speed);
}

.icon-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Lumi Mascot Styles */
#lumi-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
}

#lumi-sprite {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.lumi-body {
    width: 100%;
    height: 100%;
    animation: float 4s ease-in-out infinite;
}

.lumi-svg {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.lumi-bubble {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 180px;
    padding: 15px;
    background: white;
    color: var(--midnight-purple);
    border-radius: 15px 15px 0 15px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.lumi-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 15px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

#lumi-sprite:hover .lumi-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* V1 polish: the original palette and glass styling, with room to breathe. */
html { scroll-padding-top: 110px; }
.hero {
    height: auto;
    min-height: min(780px, 88svh);
    padding: 150px 24px 80px;
}
.hero-content { max-width: 1000px; margin: 0 auto; }
.hero-title { text-wrap: balance; letter-spacing: -0.035em; }
.text-glow { text-shadow: 0 0 16px rgba(179, 136, 255, 0.55), 0 0 32px rgba(0, 212, 255, 0.2); }
.hero-tagline { text-wrap: pretty; }
.hero-btns { flex-wrap: wrap; margin-bottom: 28px; }
header { padding: 18px 28px; }
.glass-nav { gap: 24px; padding: 0 24px; background: rgba(26, 26, 46, 0.85); }
.logo { white-space: nowrap; flex-shrink: 0; }
.logo-text { font-size: 1.35rem; letter-spacing: 1px; }
.nav-links { gap: 22px; }
.nav-links a { font-size: 0.9rem; }
.nav-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 40px; height: 40px; align-items: center; justify-content: center; opacity: 0.9; border-radius: 50%; }
.icon-btn:not(.mobile-only) { display: inline-flex; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 86px; height: 40px; padding: 0 12px; border: 1px solid rgba(255,175,204,0.25); border-radius: 24px; background: rgba(255,175,204,0.08); color: var(--pastel-pink); font: 600 0.8rem var(--font-main); cursor: pointer; transition: background 0.2s; }
.theme-toggle:hover { background: rgba(255,175,204,0.16); }
.theme-toggle svg { display: none; flex-shrink: 0; }
.theme-toggle[data-mode="auto"] .theme-auto-icon,
.theme-toggle[data-mode="light"] .theme-sun,
.theme-toggle[data-mode="dark"] .theme-moon { display: block; }
:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 5px; }
.skip-link { position: fixed; top: -100px; left: 24px; z-index: 2000; padding: 10px 18px; background: var(--pastel-pink); color: var(--midnight-purple); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.game-title, .section-title { text-wrap: balance; }
.game-logo-placeholder { text-align: center; padding: 20px; font-size: clamp(1.2rem, 3vw, 2rem); }
.games-grid:empty { display: none; }
.social-icons { flex-wrap: wrap; }
.unavailable { opacity: 0.65; cursor: default; }
.social-icon.unavailable:hover { color: inherit; background: rgba(255,255,255,0.05); }
.about-image { min-height: 300px; width: 100%; }
.modal { padding: 24px 0; overflow-y: auto; }
.modal-content { max-height: calc(100svh - 48px); overflow-y: auto; background: rgba(26,26,46,0.97); }
.close-modal { min-height: 44px; }
@media (max-width: 1100px) {
    .mobile-only { display: flex; }
    .glass-nav { position: relative; }
    .nav-links {
        position: absolute; top: calc(100% + 12px); left: 0; right: 0;
        display: flex; flex-direction: column; gap: 4px; padding: 16px;
        background: rgba(26,26,46,0.98); border: 1px solid var(--glass-border);
        border-radius: 20px; text-align: center;
        visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    }
    .nav-links.active { visibility: visible; opacity: 1; pointer-events: auto; transform: none; }
    .nav-links a { display: block; padding: 10px; border-radius: 10px; }
    .nav-links a:hover { background: rgba(255,255,255,0.05); }
}
@media (max-width: 768px) {
    header { padding: 12px 16px; }
    .glass-nav { padding: 0 16px; gap: 12px; }
    .hero { min-height: 640px; padding: 130px 24px 70px; }
    .hero-title { font-size: clamp(2.4rem, 7.5vw, 3.5rem); }
    .section { padding: 64px 0; }
    .section-header { margin-bottom: 36px; }
    .section-title { font-size: 2rem; }
    .community-card, .glass-card { padding: 24px; }
    .community-stats { gap: 24px; flex-wrap: wrap; }
    .game-artwork-placeholder { height: 260px; }
    .about-flex { gap: 32px; }
    .about-image { flex: auto; height: 260px; min-height: 0; }
    .footer-grid { gap: 30px; margin-bottom: 36px; }
    #lumi-container { right: 16px; bottom: 16px; }
    #lumi-sprite { width: 48px; height: 48px; }
}
@media (max-width: 420px) {
    header { padding: 10px 12px; }
    .glass-nav { padding: 0 10px; gap: 6px; }
    .logo-text { font-size: 1rem; letter-spacing: 0; }
    .nav-controls { gap: 2px; }
    .icon-btn { width: 32px; }
    .theme-toggle { min-width: 76px; padding: 0 8px; gap: 5px; }
    .hero { padding-left: 20px; padding-right: 20px; }
    .hero-btns { gap: 12px; }
    .hero-btns .btn { padding: 12px 22px; }
    .modal-content { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .glass-card:hover, .btn:hover, .update-card:hover { transform: none; }
}
.account-status { max-width: 540px; margin: 18px auto 0; font-size: 0.8rem; color: #cdc9df; }
.account-status:empty { display: none; }
.community-count-note { color: #cdc9df; font-size: 0.8rem; margin: -8px 0 24px; }
#blessing-login { display: block; margin-bottom: 16px; }
@media (min-width: 1101px) { .nav-links { gap: 16px; } .glass-nav { gap: 16px; } }
.account-area { display: flex; align-items: center; margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--glass-border); }
.account-signin { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; white-space: nowrap; border-radius: 24px; color: var(--pastel-pink); background: rgba(255,175,204,0.08); border: 1px solid rgba(255,175,204,0.2); font-size: 0.85rem; font-weight: 600; }
.account-signin:hover { background: rgba(255,175,204,0.16); }
.account-avatar { display: inline-flex; padding: 2px; border: 1px solid var(--pastel-pink); border-radius: 50%; background: transparent; cursor: pointer; }
.account-avatar img, .account-profile img { border-radius: 50%; object-fit: cover; background: var(--galaxy-blue); }
.account-dialog { margin: auto; width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 40px); overflow-y: auto; padding: 32px; color: white; background: linear-gradient(150deg, #24243c, #19192d 65%); border: 1px solid rgba(179,136,255,0.22); border-radius: 28px; box-shadow: 0 24px 80px #0008; }
.account-dialog::backdrop { background: #080817b8; backdrop-filter: blur(8px); }
.account-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.account-eyebrow { color: var(--pastel-pink); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.16em; margin-bottom: 5px; }
.account-panel-header h2 { font-size: 1.9rem; line-height: 1.2; }
.account-panel-header .icon-btn { flex-shrink: 0; background: #ffffff06; }
.account-profile { display: flex; align-items: center; gap: 18px; padding-bottom: 28px; border-bottom: 1px solid #ffffff12; overflow-wrap: anywhere; }
.account-profile img { flex-shrink: 0; border: 2px solid #ffafcc40; padding: 3px; }
.account-profile strong { display: block; font-family: var(--font-heading); font-size: 1.35rem; margin-bottom: 6px; }
.connection-badge { display: inline-flex; align-items: center; gap: 7px; color: #c9c4de; font-size: 0.8rem; }
.connection-badge span { width: 6px; height: 6px; border-radius: 50%; background: #a8dfcc; }
.account-section { padding: 28px 0; }
.account-section h3 { font-size: 1.1rem; margin-bottom: 4px; }
.account-section-description { color: #bbb7d1; font-size: 0.85rem; margin-bottom: 18px; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: none; min-width: 0; }
.appearance-option { position: relative; cursor: pointer; }
.appearance-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.appearance-choice { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 10px 10px 12px; border: 1px solid #ffffff18; border-radius: 15px; background: #ffffff03; color: #d0ccdf; font-size: 0.8rem; font-weight: 600; transition: background 0.2s, border-color 0.2s; }
.appearance-option:hover .appearance-choice { background: #ffffff08; border-color: #b388ff70; }
.appearance-option input:checked + .appearance-choice { border-color: var(--pastel-pink); background: #ffafcc0d; color: var(--pastel-pink); box-shadow: 0 0 0 1px #ffafcc18; }
.appearance-option input:focus-visible + .appearance-choice { outline: 2px solid var(--accent-glow); outline-offset: 4px; }
.appearance-preview { width: 100%; height: 44px; border-radius: 8px; border: 1px solid #ffffff12; position: relative; overflow: hidden; }
.appearance-preview::after { content: ''; position: absolute; inset: 10px 12px; border-radius: 5px; border: 1px solid #ffffff25; background: #ffffff09; }
.preview-light { background: radial-gradient(circle at 15% 15%, #174b7c, #1a1a2e); }
.preview-dark { background: #0b0b1a; }
.preview-auto { background: linear-gradient(120deg, #174b7c, #1a1a2e 49%, #0b0b1a 50%); }
.account-help { color: #aaa6c0; font-size: 0.75rem; margin: 14px 0 0; line-height: 1.6; }
.account-saved { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid #b388ff24; border-radius: 16px; background: #b388ff08; }
.account-blessing-icon { color: var(--pastel-pink); font-size: 1.6rem; line-height: 1.3; }
.account-saved h3 { font-size: 1rem; margin-bottom: 6px; }
.account-saved p { font-size: 0.8rem; color: #c9c4de; line-height: 1.7; }
.account-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #ffffff12; }
.account-panel-footer p { max-width: 265px; color: #aaa6c0; font-size: 0.75rem; }
.account-signout { background: transparent; border: 1px solid #ffffff20; border-radius: 12px; padding: 10px 14px; white-space: nowrap; color: #e6d9e5; font: 600 0.8rem var(--font-main); cursor: pointer; }
.account-signout:hover { border-color: var(--pastel-pink); background: #ffafcc0a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* A continuous glow replaces the sweeping shimmer that visibly jumped on each loop. */
.community-card { isolation: isolate; overflow: hidden; }
.community-card::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, #b388ff26, transparent 70%); animation: communityGlow 10s ease-in-out infinite; }
.community-card:hover { transform: none; }
@keyframes communityGlow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
@media (max-width: 480px) {
    .account-dialog { padding: 24px; border-radius: 22px; }
    .account-panel-header h2 { font-size: 1.65rem; }
    .appearance-options { gap: 8px; }
    .appearance-choice { padding: 7px 7px 10px; }
    .account-panel-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
    .account-profile { gap: 14px; }
    .account-saved { padding: 16px; }
}
@media (max-width: 600px) {
    .account-area { margin-left: 2px; padding-left: 8px; }
    .account-signin { padding: 10px; }
    .account-signin span { display: none; }
    .nav-controls { gap: 2px; }
    .glass-nav { gap: 6px; padding: 0 10px; }
}
@media (max-width: 360px) {
    .logo-text { font-size: 0.85rem; }
    .theme-toggle { min-width: 66px; padding: 0 5px; gap: 3px; }
    .theme-toggle svg { width: 17px; }
    .nav-controls .icon-btn { width: 28px; }
    .account-area { padding-left: 5px; margin-left: 0; }
    .account-signin { padding: 8px; }
}
@media (max-width: 360px) {
    .logo-text { font-size: 0.8rem; }
    .theme-toggle { min-width: 60px; padding: 0 4px; font-size: 0.75rem; }
    .theme-toggle svg { width: 16px; }
    .nav-controls .icon-btn { width: 24px; }
    .account-signin { padding: 6px; }
    .account-avatar img { width: 28px; height: 28px; }
    .glass-nav { padding: 0 8px; }
}
/* Theme help, styled to match the navigation instead of a native title popup. */
.theme-control { position: relative; }
.themed-tooltip { position: absolute; top: calc(100% + 12px); right: 0; width: 232px; padding: 14px 16px; border: 1px solid #b388ff40; border-radius: 14px; background: #24243cf5; box-shadow: 0 12px 30px #0005; color: #e4ddef; font-size: 0.78rem; line-height: 1.65; font-weight: 400; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.18s, transform 0.18s, visibility 0.18s; }
.themed-tooltip::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.theme-control:not(.tooltip-dismissed):hover .themed-tooltip,
.theme-control:not(.tooltip-dismissed):focus-within .themed-tooltip { opacity: 1; visibility: visible; transform: none; }
.lumi-bubble.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.lumi-bubble { bottom: 70px; width: 220px; max-width: calc(100vw - 48px); }
#lumi-discord { display: inline-block; margin-top: 10px; color: #503d85; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }
#lumi-discord:hover { color: #30234f; }
@media (max-width: 600px) { .themed-tooltip { right: -60px; width: 220px; } }
.text-action { display: block; margin: 18px auto 0; padding: 8px 4px; background: none; border: none; color: var(--pastel-pink); font: 600 0.8rem var(--font-main); cursor: pointer; text-underline-offset: 4px; }
.text-action:hover { text-decoration: underline; }
.text-action:disabled { opacity: 0.5; cursor: wait; }
.lumi-preference { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid #ffffff12; }
.lumi-preference h3 { font-size: 1rem; margin-bottom: 5px; }
.lumi-preference p { color: #bbb7d1; font-size: 0.8rem; }
.quiet-switch { position: relative; flex-shrink: 0; cursor: pointer; }
.quiet-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiet-switch > span:first-of-type { display: block; width: 44px; height: 26px; border-radius: 20px; background: #ffffff15; border: 1px solid #ffffff30; transition: background 0.2s; }
.quiet-switch > span:first-of-type::after { content: ''; display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: #c9c4de; transition: transform 0.2s; }
.quiet-switch input:checked + span { background: #ffafcc40; border-color: var(--pastel-pink); }
.quiet-switch input:checked + span::after { transform: translateX(18px); background: var(--pastel-pink); }
.quiet-switch input:focus-visible + span { outline: 2px solid var(--accent-glow); outline-offset: 4px; }
.collection-dialog { width: min(700px, calc(100% - 32px)); }
.collection-intro { color: #c9c4de; font-size: 0.85rem; line-height: 1.8; }
.blessing-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.catalog-card { padding: 20px; border: 1px solid #ffffff14; border-top: 2px solid var(--reward-color); border-radius: 16px; background: #ffffff03; }
.catalog-card-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 0.65rem; }
.catalog-rarity { color: var(--reward-color); font-weight: 700; letter-spacing: 0.05em; }
.catalog-owned { color: #aaa6c0; }
.catalog-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.catalog-message { font-size: 0.8rem; color: #c9c4de; min-height: 44px; }
.catalog-odds { color: var(--reward-color); font-size: 0.85rem; font-weight: 700; margin-top: 16px; }
.history-heading { margin-top: 30px; }
.blessing-history { list-style: none; margin-top: 18px; }
.history-entry { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #ffffff12; font-size: 0.85rem; }
.history-detail { display: block; color: #aaa6c0; font-size: 0.75rem; margin-top: 4px; }
.history-entry time { color: #aaa6c0; font-size: 0.75rem; white-space: nowrap; }
@media (max-width: 480px) { .blessing-catalog { grid-template-columns: 1fr; } .history-entry { flex-direction: column; gap: 5px; } }
/* Shared pink scrollbars, with the collection scroll area inset from its frame. */
* { scrollbar-width: thin; scrollbar-color: var(--pastel-pink) #1a1a2e; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1a1a2e; border-radius: 12px; }
::-webkit-scrollbar-thumb { background: var(--pastel-pink); border: 2px solid #1a1a2e; border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: #ffd0e2; }
::-webkit-scrollbar-button { display: none; }
.collection-dialog { overflow: hidden; padding: 12px; }
.collection-scroll { max-height: calc(100svh - 66px); overflow-y: auto; overflow-x: hidden; padding: 20px; scrollbar-gutter: stable; }
@media (max-width: 480px) { .collection-scroll { padding: 12px; } }

/* Keep modal scrolling contained, including gestures over its frame. */
html:has(dialog[open]), body:has(dialog[open]) { overflow: hidden; }
html { scrollbar-gutter: stable; }
.account-dialog, .collection-scroll { overscroll-behavior: contain; }
.catalog-card { display: flex; flex-direction: column; }
.catalog-odds { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: auto; padding-top: 16px; }
.catalog-percent { margin-left: auto; white-space: nowrap; }
/* Show the actual background palette, with Auto split into day and night. */
.appearance-preview { height: 64px; }
.preview-light, .preview-auto { background-color: #1a1a2e; background-image: radial-gradient(circle at 30% 30%, #0f3460 0%, transparent 40%), radial-gradient(circle at 70% 60%, #16213e 0%, transparent 40%), radial-gradient(circle at 50% 50%, #1a1a2e 0%, #1a1a2e 100%); }
.appearance-preview::after { inset: 12px 10px; background: #ffffff09; border-color: #ffffff25; }
.preview-auto::before { content: ''; position: absolute; inset: 0 0 0 50%; background: #0b0b1a; border-left: 1px solid #ffffff18; }
.preview-dark { background: #0b0b1a; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 12px; border: 1px solid #ffafcc40; }
.footer-brand-image { display: block; width: 144px; height: 144px; object-fit: contain; border-radius: 24px; border: 1px solid #ffafcc30; margin-bottom: 18px; }
@media (max-width: 600px) { .brand-logo { display: none; } }

.blessing-countdown { color: var(--pastel-pink); font-size: .85rem; font-variant-numeric: tabular-nums; margin-top: 14px; }
.privacy-copy p { color: #d0ccdf; font-size: .85rem; margin-top: 18px; line-height: 1.8; }
.privacy-copy a { color: var(--pastel-pink); text-decoration: underline; }
.privacy-controls .text-action { margin: 12px 0; }
.delete-label { display: block; margin: 24px 0 8px; }
#delete-confirm { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #ffafcc66; background: #ffffff08; color: white; font: inherit; }
.game-logo-placeholder small { display: block; font-size: .8rem; margin-top: 14px; color: #ffdaea; }

.gameplay-plan { margin-top: 48px; }
.gameplay-plan h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 8px 0; }
.gameplay-intro { color: #c9c4de; max-width: 650px; }
.gameplay-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 26px 0 0; }
.gameplay-steps li { border: 1px solid #ffafcc25; border-radius: 20px; padding: 24px; background: #ffffff04; }
.step-number { color: var(--pastel-pink); font-family: var(--font-heading); font-size: 1.6rem; }
.gameplay-steps h4 { margin: 14px 0 10px; }
.gameplay-steps p { color: #c9c4de; font-size: .85rem; line-height: 1.8; }
.collection-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.collection-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border-radius: 14px; background: #ffffff06; border: 1px solid #ffffff12; }
.collection-tools button { font: 600 .75rem var(--font-main); color: #d0ccdf; background: transparent; border: 1px solid transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.collection-tools button[aria-pressed="true"] { color: var(--pastel-pink); background: #ffafcc15; border-color: #ffafcc40; }
.collection-tools button:hover:not(:disabled) { background: #ffffff0c; }
.collection-tools button:disabled { opacity: .4; cursor: default; }
#collection-sort { border-color: #ffffff20; }
.catalog-card[hidden] { display: none; }
@media (max-width: 900px) { .gameplay-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .gameplay-steps { grid-template-columns: 1fr; } }

.account-dialog:has(> .dialog-scroll) { padding: 12px; overflow: hidden; }
.dialog-scroll { max-height: calc(100svh - 66px); overflow-y: auto; overflow-x: hidden; padding: 20px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.appearance-choice { height: 100%; }
@media (max-width: 480px) { .dialog-scroll { padding: 12px; } .account-panel-header h2 { overflow-wrap: anywhere; } }

/* Transparent Lumi and moon artwork blends directly into the page. */
.brand-logo, .footer-brand-image { border: none; border-radius: 0; background: transparent; }
.footer-brand-image { width: 160px; height: 160px; }

.accessibility-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; border-bottom: 1px solid #ffffff20; cursor: pointer; }
.accessibility-option small { display: block; color: #d0ccdf; font-size: .8rem; line-height: 1.7; margin-top: 6px; }
.accessibility-option input { flex-shrink: 0; width: 24px; height: 24px; accent-color: var(--pastel-pink); cursor: pointer; }
:root[data-accessibility-text] { font-size: 120%; }
:root[data-accessibility-links] a { text-decoration: underline !important; text-underline-offset: .2em; }
:root[data-accessibility-motion] { scroll-behavior: auto !important; }
:root[data-accessibility-motion] *, :root[data-accessibility-motion] *::before, :root[data-accessibility-motion] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-accessibility-motion] .animate-on-scroll { opacity: 1 !important; transform: none !important; }
:root[data-accessibility-motion] .glass-card:hover, :root[data-accessibility-motion] .btn:hover, :root[data-accessibility-motion] .update-card:hover { transform: none; }
:root[data-accessibility-contrast] { --glass-bg: #171729; --glass-border: #bcb1d9; }
:root[data-accessibility-contrast] :is(.glass, .glass-card, .glass-nav, .account-dialog, .catalog-card, .gameplay-steps li) { background: #171729 !important; border-color: #bcb1d9; backdrop-filter: none; }
:root[data-accessibility-contrast] :is(p, small, .account-help, .history-detail, .catalog-owned, time, .section-subtitle) { color: #f3efff !important; }
:root[data-accessibility-contrast] :is(button, a, input):focus-visible { outline: 3px solid #ffe19a; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .animate-on-scroll { opacity: 1 !important; transform: none !important; } }
@media (max-width: 600px) { :root[data-accessibility-text] .hero { height: auto; min-height: 100svh; padding-bottom: 60px; } :root[data-accessibility-text] .appearance-options { grid-template-columns: 1fr; } }

.accessibility-option input { appearance: none; border: 1px solid #ffafcc80; border-radius: 7px; background: #ffffff08; display: grid; place-content: center; }
.accessibility-option input:checked { background: var(--pastel-pink); border-color: var(--pastel-pink); }
.accessibility-option input:checked::after { content: ''; width: 6px; height: 11px; border: solid #24153d; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.accessibility-option input:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 4px; }
@media (forced-colors: active) { .accessibility-option input { appearance: auto; } .accessibility-option input::after { display: none; } }

.faq-container { max-width: 850px; }
.faq-item { border-bottom: 1px solid var(--glass-border); padding: 22px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--pastel-pink); padding: 6px 0; }
.faq-item p { color: #d0ccdf; line-height: 1.8; margin-top: 14px; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 5px; border-radius: 4px; }

/* Keep the studio introduction separate from returning-player controls. */
.hero { height: auto; min-height: 620px; padding: 170px 24px 90px; }
.hero-content { max-width: 1040px; }
.hero-title { font-size: clamp(2.7rem, 6vw, 5rem); line-height: 1.12; }
.hero-tagline { max-width: 640px; margin-left: auto; margin-right: auto; }
.blessing-dock { width: min(1000px, calc(100% - 40px)); margin: 0 auto 40px; padding: 26px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: #ffffff05; border: 1px solid #ffafcc26; border-radius: 24px; }
.blessing-dock h2 { font-size: 1.3rem; margin: 4px 0 8px; }
.blessing-dock .account-status, .blessing-dock .blessing-countdown { margin: 6px 0 0; text-align: left; }
.blessing-dock-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.blessing-dock .text-action { margin: 0; }
.blessing-dock #login-status:not(:empty) { flex-basis: 100%; }
@media (max-width: 600px) { .hero { min-height: 560px; padding: 140px 22px 65px; } .blessing-dock { padding: 24px; } .blessing-dock-actions { width: 100%; align-items: stretch; text-align: center; } }

/* Lumi's supplied chibi artwork replaces the star mascot. */
#lumi-sprite { width: 128px; height: 128px; }
.lumi-art { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 9px #10082455); user-select: none; }
#lumi-container .lumi-bubble { bottom: calc(100% + 16px); }
@media (max-width: 600px) { #lumi-sprite { width: 88px; height: 88px; } }
