/* 확률.com - Probability / City of Chance */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #1A1B3A 0%, #3D2C8D 50%, #C73866 100%);
    background-attachment: fixed;
    color: #F0EBF4;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === Rain Particles === */
#rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    width: 1px;
    background-color: #F0EBF4;
    border-radius: 0 0 2px 2px;
}

@keyframes rain-fall {
    0% { transform: translateY(-20px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* === Glassmorphism Panels === */
.glass-panel {
    background: rgba(240, 235, 244, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(240, 235, 244, 0.12);
    border-radius: 16px;
}

/* === Hero Section === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-glass {
    padding: 60px 80px;
    text-align: center;
    max-width: 600px;
}

#hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 120px;
    letter-spacing: 0.02em;
    color: #FFD93D;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

#hero-title.visible {
    opacity: 1;
    transform: scale(1);
}

#hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #4ECDC4;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 1s ease;
}

#hero-subtitle.visible {
    opacity: 0.8;
}

.hero-counter {
    margin-top: 30px;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-counter.visible {
    opacity: 1;
}

.counter-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: rgba(240, 235, 244, 0.5);
    display: block;
    margin-bottom: 6px;
}

.counter-value {
    font-family: 'Space Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    color: #FFD93D;
}

.counter-unit {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    color: #FFD93D;
}

/* === Diagonal Sections === */
.diagonal-section {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin-top: -40px;
}

#bell-curve {
    background: rgba(61, 44, 141, 0.3);
}

#coin-flip {
    background: rgba(199, 56, 102, 0.2);
}

#dice-section {
    background: rgba(26, 27, 58, 0.4);
}

.city-skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
}

.section-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    z-index: 2;
}

.content-glass {
    padding: 48px 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content-glass.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #4ECDC4;
    display: block;
    margin-bottom: 12px;
}

.content-glass h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #FFD93D;
    margin-bottom: 16px;
}

.content-glass p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(240, 235, 244, 0.75);
    margin-bottom: 24px;
}

/* === Probability Bar === */
.probability-bar {
    background: rgba(240, 235, 244, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar-fill {
    background: linear-gradient(90deg, #4ECDC4, #FFD93D);
    padding: 10px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #1A1B3A;
    width: 0;
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 8px;
}

.bar-fill.animated {
    width: 68%;
}

.bar-caption {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(240, 235, 244, 0.4);
    display: block;
    margin-top: 6px;
}

/* === Coin Demo === */
.coin-demo {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.neon-btn {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    background: transparent;
    color: #4ECDC4;
    border: 1px solid #4ECDC4;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.neon-btn:hover {
    background-color: #4ECDC4;
    color: #1A1B3A;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

#flip-results {
    display: flex;
    gap: 20px;
}

.flip-stat {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: rgba(240, 235, 244, 0.6);
}

.flip-stat strong {
    color: #FFD93D;
    font-size: 18px;
}

/* === Dice Demo === */
.dice-demo {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dice-display {
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #C73866;
    min-width: 60px;
    text-align: center;
}

/* === Reflection === */
#reflection {
    position: relative;
    z-index: 1;
    padding: 100px 40px;
    display: flex;
    justify-content: center;
}

.reflection-glass {
    max-width: 600px;
    padding: 60px 48px;
    text-align: center;
}

.reflection-glass h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #FFD93D;
    margin-bottom: 16px;
}

.reflection-glass p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    line-height: 1.9;
    color: rgba(240, 235, 244, 0.7);
}

/* === Footer === */
#footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: rgba(240, 235, 244, 0.35);
}

/* === Responsive === */
@media (max-width: 768px) {
    #hero-title {
        font-size: 72px;
    }

    .hero-glass {
        padding: 40px 30px;
    }

    .diagonal-section {
        padding: 80px 20px;
        clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
    }

    .content-glass {
        padding: 32px 24px;
    }

    .content-glass h2 {
        font-size: 28px;
    }

    .counter-value {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: 56px;
    }

    .diagonal-section {
        clip-path: none;
        margin-top: 0;
    }

    .coin-demo {
        flex-direction: column;
        align-items: flex-start;
    }

    .reflection-glass {
        padding: 40px 24px;
    }
}
