/* ============================================================
   hwaklyul.com - Memphis Bold Probability Playground
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #1A1A2E;
    overflow-x: hidden;
    background: #845EC2;
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
    font-family: 'Bungee', cursive;
    font-weight: 400;
}

h2.section-heading {
    font-size: 36px;
    line-height: 1.05;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

h2.rotate-cw {
    transform: rotate(2deg);
}

h2.rotate-ccw {
    transform: rotate(-2deg);
}

.card-title {
    font-family: 'Bungee', cursive;
    font-size: 20px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.card-body {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    color: #1A1A2E;
    margin-bottom: 16px;
}

.card-formula {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
    color: #845EC2;
    padding: 8px 12px;
    background: #1A1A2E;
    color: #FFD93D;
    border-radius: 0;
    display: inline-block;
    border: 2px solid #1A1A2E;
}

/* === MEMPHIS PATTERNS === */
.memphis-dot-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #FAFAFA 2px, transparent 2px);
    background-size: 24px 24px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.memphis-zigzag-pattern {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 6px,
        #1A1A2E 6px,
        #1A1A2E 8px
    );
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.memphis-confetti-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, #FF6B6B 1.5px, transparent 1.5px),
        radial-gradient(circle, #FFD93D 1.5px, transparent 1.5px),
        radial-gradient(circle, #6BCB77 1.5px, transparent 1.5px);
    background-size: 48px 48px, 36px 36px, 60px 60px;
    background-position: 0 0, 16px 20px, 8px 36px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* === SECTIONS === */
.section {
    position: relative;
    overflow: hidden;
}

/* --- THE JACKPOT (Hero) --- */
.section-jackpot {
    min-height: 100vh;
    background: #845EC2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    padding-bottom: 80px;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 5;
}

.hero-title {
    font-family: 'Bungee', cursive;
    font-size: 64px;
    line-height: 1.0;
    color: #FFD93D;
    letter-spacing: 4px;
    opacity: 0;
    transform: translateY(-200px);
    animation: heroSlam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #FAFAFA;
    letter-spacing: 6px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(50px);
    animation: heroBounceUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s forwards;
}

@keyframes heroSlam {
    0% { opacity: 0; transform: translateY(-200px) scaleY(1); }
    70% { opacity: 1; transform: translateY(0) scaleY(0.9); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes heroBounceUp {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hero confetti container */
.hero-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.hero-confetti-piece {
    position: absolute;
    width: 4px;
    height: 10px;
    opacity: 0;
    animation: confettiBurst 1.5s ease-out forwards;
}

@keyframes confettiBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0.6;
        transform: var(--confetti-end) rotate(var(--confetti-rotate)) scale(1);
    }
}

/* --- THE ODDS BOARD --- */
.section-odds-board {
    background: #FFD93D;
    padding: 120px 0 140px;
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

.section-odds-board .section-heading {
    color: #1A1A2E;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Concept Cards */
.concept-card {
    background: #FAFAFA;
    border: 4px solid #1A1A2E;
    border-radius: 0;
    padding: 32px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    perspective: 600px;
}

.concept-card .card-inner {
    position: relative;
}

.card-odd {
    transform: rotate(-2deg) translateX(-80px);
}

.card-even {
    transform: rotate(2deg) translateX(80px);
}

.concept-card.card-visible {
    opacity: 1;
}

.card-odd.card-visible {
    transform: rotate(-2deg) translateX(0);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, border-color 0.3s ease;
}

.card-even.card-visible {
    transform: rotate(2deg) translateX(0);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, border-color 0.3s ease;
}

.concept-card:hover {
    border-color: #FF6B9D;
}

.card-odd:hover,
.card-odd.card-visible:hover {
    transform: rotate(-5deg);
}

.card-even:hover,
.card-even.card-visible:hover {
    transform: rotate(5deg);
}

/* Die Faces */
.die-face {
    width: 80px;
    height: 80px;
    background: #FAFAFA;
    border: 4px solid #1A1A2E;
    border-radius: 12px;
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0) rotateZ(720deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-visible .die-face {
    transform: scale(1) rotateZ(0deg);
    transition-delay: 0.2s;
}

.pip {
    width: 14px;
    height: 14px;
    background: #1A1A2E;
    border-radius: 50%;
    position: absolute;
}

.pip-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pip-top-left { top: 12px; left: 12px; }
.pip-top-right { top: 12px; right: 12px; }
.pip-bottom-left { bottom: 12px; left: 12px; }
.pip-bottom-right { bottom: 12px; right: 12px; }
.pip-mid-left { top: 50%; left: 12px; transform: translateY(-50%); }
.pip-mid-right { top: 50%; right: 12px; transform: translateY(-50%); }

/* --- THE WHEEL --- */
.section-wheel {
    background: #4ECDC4;
    padding: 120px 0 140px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    clip-path: polygon(0 4%, 100% 0, 100% 92%, 0 100%);
}

.section-wheel .section-heading {
    color: #1A1A2E;
}

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.roulette-wheel {
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 6px solid #1A1A2E;
    position: relative;
    background:
        conic-gradient(
            #FF6B6B 0deg 60deg,
            #FFD93D 60deg 120deg,
            #6BCB77 120deg 180deg,
            #4ECDC4 180deg 240deg,
            #FF6B9D 240deg 300deg,
            #845EC2 300deg 360deg
        );
    transition: transform 0.1s linear;
}

.wheel-center {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1A1A2E;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border: 4px solid #FFD93D;
}

.wheel-center-text {
    font-family: 'Bungee', cursive;
    font-size: 32px;
    color: #FFD93D;
}

.wheel-spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    transform-origin: 0 50%;
    z-index: 2;
}

.spoke-label {
    position: absolute;
    right: 20px;
    top: -24px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A2E;
    text-align: center;
    background: #FAFAFA;
    padding: 6px 12px;
    border: 3px solid #1A1A2E;
    border-radius: 0;
    white-space: nowrap;
}

.spoke-value {
    font-family: 'Bungee', cursive;
    font-size: 12px;
    color: #845EC2;
}

.wheel-spoke-1 { transform: rotate(0deg); }
.wheel-spoke-2 { transform: rotate(60deg); }
.wheel-spoke-3 { transform: rotate(120deg); }
.wheel-spoke-4 { transform: rotate(180deg); }
.wheel-spoke-5 { transform: rotate(240deg); }
.wheel-spoke-6 { transform: rotate(300deg); }

/* --- THE CONFETTI (Closing) --- */
.section-confetti {
    background: #FF6B6B;
    padding: 120px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}

.section-confetti .section-heading {
    color: #FAFAFA;
}

.confetti-message {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    line-height: 1.6;
    font-weight: 400;
    color: #FAFAFA;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    transform: rotate(-1deg);
}

.confetti-burst-area {
    position: relative;
    height: 200px;
    overflow: visible;
}

.burst-particle {
    position: absolute;
    width: 4px;
    height: 10px;
    left: 50%;
    top: 50%;
    opacity: 0;
}

.burst-particle.burst-active {
    animation: burstScatter 2s ease-out forwards;
}

@keyframes burstScatter {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: var(--burst-end) rotate(var(--burst-rotate));
    }
}

.closing-symbol {
    text-align: center;
    margin-top: 40px;
}

.closing-dice {
    font-size: 48px;
    letter-spacing: 16px;
    color: #FAFAFA;
    display: inline-block;
    animation: diceFloat 3s ease-in-out infinite;
}

@keyframes diceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* === FLOATING GEOMETRIC SHAPES === */
.floating-shapes-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border: 4px solid #1A1A2E;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-shape:hover {
    transform: scale(1.2);
}

.shape-circle {
    border-radius: 50%;
}

.shape-square {
    border-radius: 0;
}

.shape-triangle {
    background: transparent !important;
    border: none;
    width: 0 !important;
    height: 0 !important;
}

@keyframes shapeFloat {
    0%, 100% { transform: rotate(var(--rot-start)); }
    50% { transform: rotate(var(--rot-end)); }
}

/* === SQUIGGLY DIVIDERS === */
.squiggly-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 3;
    overflow: visible;
}

.squiggly-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.squiggly-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 0.8s ease-out;
}

.squiggly-path.drawn {
    stroke-dashoffset: 0;
}

/* === CONFETTI CONTAINER (global) === */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 48px;
    }
    .roulette-wheel {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 36px;
    }
    h2.section-heading {
        font-size: 28px;
    }
    .roulette-wheel {
        width: 260px;
        height: 260px;
    }
    .spoke-label {
        font-size: 11px;
        padding: 4px 8px;
        right: 10px;
    }
}
