/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #0a0a14;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a14;
    color: #e8e8e8;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* CSS Variables */
:root {
    --accent-color: rgba(100, 200, 255, 1);
    --accent-glow: rgba(100, 200, 255, 0.5);
}

/* Fixed Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-gradient, linear-gradient(135deg, #0a0a14 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a14 100%));
    z-index: -1;
    pointer-events: none;
    transition: background 2s ease;
}

/* Canvas Layers */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
    touch-action: none;
}

#constellationCanvas {
    z-index: 1;
    pointer-events: auto;
    cursor: crosshair;
}

/* Interactive Effects */
.parallax-layer {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.scramble-text {
    cursor: pointer;
    display: inline-block;
}

.scramble-text:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    padding-top: env(safe-area-inset-top);
}

.hero-content {
    text-align: center;
    padding: 2rem;
}

h1 {
    color: #e8e8e8;
    font-size: 3.5rem;
    font-weight: 200;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(100, 200, 255, 0.5), 0 0 60px rgba(100, 200, 255, 0.3);
    min-height: 4rem;
    animation: subtleShine 8s ease-in-out infinite;
}

@keyframes subtleShine {

    0%,
    100% {
        text-shadow: 0 0 40px rgba(100, 200, 255, 0.7), 0 0 70px rgba(100, 200, 255, 0.5), 0 0 100px rgba(100, 200, 255, 0.3);
        filter: brightness(1.1);
    }

    33% {
        text-shadow: 0 0 60px rgba(100, 200, 255, 1), 0 0 100px rgba(100, 200, 255, 0.8), 0 0 150px rgba(100, 200, 255, 0.5);
        filter: brightness(1.25);
    }

    66% {
        text-shadow: 0 0 45px rgba(100, 200, 255, 0.8), 0 0 80px rgba(100, 200, 255, 0.6), 0 0 120px rgba(100, 200, 255, 0.35);
        filter: brightness(1.15);
    }
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 3.5rem;
    background: rgba(100, 200, 255, 0.8);
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.8);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-top: 1.5rem;
    letter-spacing: 0.2em;
    opacity: 0;
    animation: fadeIn 1s ease-out 2.5s forwards, subtleSubtitleGlow 7s ease-in-out 3.5s infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes subtleSubtitleGlow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 35px rgba(100, 200, 255, 0.3);
        filter: brightness(1.1);
    }

    40% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 50px rgba(100, 200, 255, 0.5);
        filter: brightness(1.2);
    }

    70% {
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.5), 0 0 40px rgba(100, 200, 255, 0.4);
        filter: brightness(1.15);
    }
}

.time-display {
    color: rgba(100, 200, 255, 0.7);
    font-size: 1.2rem;
    margin-top: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.4);
    animation: fadeIn 1s ease-out 3s forwards, subtleTimeGlow 6s ease-in-out 4s infinite;
}

@keyframes subtleTimeGlow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(100, 200, 255, 0.5), 0 0 35px rgba(100, 200, 255, 0.3);
        filter: brightness(1.1);
    }

    35% {
        text-shadow: 0 0 30px rgba(100, 200, 255, 0.7), 0 0 50px rgba(100, 200, 255, 0.5);
        filter: brightness(1.2);
    }

    70% {
        text-shadow: 0 0 25px rgba(100, 200, 255, 0.6), 0 0 40px rgba(100, 200, 255, 0.4);
        filter: brightness(1.15);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease-out 3.5s forwards, bounce 2s infinite 4s;
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(100, 200, 255, 0.6);
    border-bottom: 2px solid rgba(100, 200, 255, 0.6);
    transform: rotate(45deg);
    box-shadow: 3px 3px 5px rgba(100, 200, 255, 0.3);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(10px);
    }

    60% {
        transform: translateX(-50%) translateY(5px);
    }
}

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

/* Scroll Sections */
.scroll-section {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
}

.section-content {
    max-width: 900px;
    text-align: center;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Section Typography */
.section-title {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.4);
    animation: subtleTextGlow 6s ease-in-out infinite;
}

@keyframes subtleTextGlow {

    0%,
    100% {
        text-shadow: 0 0 35px rgba(100, 200, 255, 0.7), 0 0 60px rgba(100, 200, 255, 0.4);
        filter: brightness(1.1);
    }

    35% {
        text-shadow: 0 0 50px rgba(100, 200, 255, 1), 0 0 80px rgba(100, 200, 255, 0.6), 0 0 120px rgba(100, 200, 255, 0.3);
        filter: brightness(1.2);
    }

    70% {
        text-shadow: 0 0 40px rgba(100, 200, 255, 0.8), 0 0 70px rgba(100, 200, 255, 0.5);
        filter: brightness(1.15);
    }
}

.section-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
}

/* Glass Panel */
.glass-panel {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.015) 50%,
            rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(4px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.2) brightness(1.05);
    border-radius: 32px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 20%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.08) 80%,
            transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 35%;
    background: radial-gradient(ellipse at top left,
            rgba(255, 255, 255, 0.06) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: 1;
    border-radius: 32px 0 0 0;
}

/* Feature Cards Grid */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Card */
.feature-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.035) 0%,
            rgba(255, 255, 255, 0.012) 50%,
            rgba(255, 255, 255, 0.025) 100%);
    backdrop-filter: blur(3px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(3px) saturate(1.2) brightness(1.05);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.25),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 30%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.06) 70%,
            transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 45%;
    background: radial-gradient(ellipse at top left,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 60%);
    pointer-events: none;
    z-index: 1;
    border-radius: 24px 0 0 0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px) saturate(1.3) brightness(1.08);
    -webkit-backdrop-filter: blur(5px) saturate(1.3) brightness(1.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.feature-card:hover::before {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 30%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.1) 70%,
            transparent 100%);
}

/* Secret Card */
.feature-card.secret-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border: 2px dashed rgba(255, 255, 255, 0.05);
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card.secret-card::before,
.feature-card.secret-card::after {
    display: none;
}

.feature-card.secret-card:hover {
    border-color: rgba(100, 200, 255, 0.2);
    transform: none;
    box-shadow: none;
}

.feature-card.secret-card.revealed {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.035) 0%,
            rgba(255, 255, 255, 0.012) 50%,
            rgba(255, 255, 255, 0.025) 100%);
    backdrop-filter: blur(3px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(3px) saturate(1.2) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.25),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.feature-card.secret-card.revealed::before,
.feature-card.secret-card.revealed::after {
    display: block;
}

.secret-card-content {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
    text-align: center;
}

.feature-card.secret-card.revealed .secret-card-content {
    opacity: 1;
    transform: scale(1);
}

.secret-hint {
    color: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.feature-card.secret-card:hover .secret-hint {
    color: rgba(100, 200, 255, 0.3);
}

.feature-card.secret-card.revealed .secret-hint {
    display: none;
}

.star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 24px;
    z-index: 10;
}

/* Feature Card Content */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(100, 200, 255, 0.5));
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: rgba(100, 200, 255, 0.9);
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.3);
    animation: subtleFeatureGlow 5s ease-in-out infinite;
}

@keyframes subtleFeatureGlow {

    0%,
    100% {
        text-shadow: 0 0 25px rgba(100, 200, 255, 0.7), 0 0 45px rgba(100, 200, 255, 0.35);
        filter: brightness(1.1);
    }

    30% {
        text-shadow: 0 0 40px rgba(100, 200, 255, 1), 0 0 70px rgba(100, 200, 255, 0.5);
        filter: brightness(1.25);
    }

    65% {
        text-shadow: 0 0 30px rgba(100, 200, 255, 0.85), 0 0 55px rgba(100, 200, 255, 0.4);
        filter: brightness(1.15);
    }
}

.feature-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(100, 200, 255, 0.5), rgba(100, 200, 255, 1), rgba(150, 220, 255, 1));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 15px rgba(100, 200, 255, 0.8);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2rem;
        letter-spacing: 0.15em;
        min-height: 2.5rem;
    }

    .cursor {
        height: 2rem;
        width: 2px;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.15em;
        padding: 0 1rem;
    }

    .time-display {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
    }

    .section-text {
        font-size: 0.8rem;
    }

    .glass-panel {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .features {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .feature-card.secret-card {
        min-height: 180px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
        letter-spacing: 0.1em;
        min-height: 2rem;
    }

    .cursor {
        height: 1.6rem;
    }

    .subtitle {
        font-size: 0.8rem;
        margin-top: 1rem;
    }

    .time-display {
        font-size: 0.75rem;
        margin-top: 1.5rem;
    }

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

    .glass-panel {
        padding: 1.5rem 1rem;
    }
}