/* 
   ASYLAYIM'S TILASHAR TOYI - SIMPSONS STYLE WEB INVITATION
   Custom Premium Stylesheet (Vanilla CSS)
*/

@font-face {
    font-family: 'Fredoka';
    src: url('Fredoka-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Fredoka';
    src: url('Fredoka-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Fredoka';
    src: url('Fredoka-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Nunito';
    src: url('Nunito-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Nunito';
    src: url('Nunito-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Nunito';
    src: url('Nunito-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Nunito';
    src: url('Nunito-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}


:root {
    --simpsons-yellow: #FED90F;
    --simpsons-blue: #45B3E3;
    --simpsons-dark-blue: #007DC3;
    --donut-pink: #E05A9C;
    --donut-pink-hover: #f06bb3;
    --donut-brown: #8D5B4C;
    --chalkboard-green: #1E4620;
    --tv-purple: #A074C4;
    --console-grey: #5A6B7C;
    --dark-border: #1C1C1C;
    --light-bg: #FFFDF0;
    --white: #FFFFFF;
    
    --transition-speed: 0.3s;
    
    /* Dynamic scroll variables controlled by JS */
    --scroll-zoom: 1;
    --scroll-opacity: 1;
    --scroll-split-left: 0%;
    --scroll-split-right: 0%;
}

/* Base Settings & Cartoon Borders */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Comic Neue', 'Fredoka', 'Nunito', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #BFE3FF;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.45) 40%, transparent 40%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.45) 50%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.45) 50%, transparent 50%);
    background-size: 160px 120px;
    background-position: 0 0, 10px 10px, 30px 10px;
    background-attachment: fixed;
    color: var(--dark-border);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Comic Book Outlined Text */
.text-stroke {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 700;
    color: var(--simpsons-yellow);
    -webkit-text-stroke: 2.5px var(--dark-border);
    text-stroke: 2.5px var(--dark-border);
    text-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

/* Cartoon Styled Containers */
.cartoon-card {
    background: var(--white);
    border: 4px solid var(--dark-border);
    border-radius: 16px;
    box-shadow: 8px 8px 0px var(--dark-border);
    padding: 24px;
    position: relative;
}

/* Audio Player Toggle Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: var(--simpsons-yellow);
    border: 3.5px solid var(--dark-border);
    border-radius: 50%;
    width: 54px;
    height: 54px;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-btn:hover {
    transform: scale(1.05) translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--dark-border);
}

.music-btn:active {
    transform: scale(0.95) translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--dark-border);
}

.speaker-icon {
    font-size: 20px;
}

.music-wave {
    display: none;
    align-items: flex-end;
    justify-content: space-between;
    width: 20px;
    height: 15px;
    position: absolute;
    bottom: 8px;
}

.music-btn.playing .speaker-icon {
    transform: translateY(-4px);
    font-size: 16px;
}

.music-btn.playing .music-wave {
    display: flex;
}

.music-wave span {
    background-color: var(--dark-border);
    width: 3px;
    height: 100%;
    border-radius: 3px;
    transform-origin: bottom;
    animation: bounce-wave 1s ease-in-out infinite alternate;
}

.music-wave span:nth-child(2) { animation-delay: 0.2s; }
.music-wave span:nth-child(3) { animation-delay: 0.4s; }
.music-wave span:nth-child(4) { animation-delay: 0.1s; }

@keyframes bounce-wave {
    0% { transform: scaleY(0.2); }
    100% { transform: scaleY(1); }
}

/* Confetti Donut Layer */
#sprinkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
    overflow: hidden;
}

/* SCROLL TRIGGER SPACE & INTRO SKY SETUP */
#sky-trigger-spacer {
    height: 250vh; /* Extended scroll distance for a slow, majestic cloud split and title reveal */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.sky-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #5ec3f5 0%, var(--simpsons-blue) 100%);
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Sunburst effect */
.sun-rays {
    position: absolute;
    width: 150%;
    height: 150%;
    background-image: radial-gradient(circle, rgba(254, 217, 15, 0.2) 10%, transparent 60%);
    top: -25%;
    left: -25%;
    pointer-events: none;
    animation: rotate-sun 120s linear infinite;
}

@keyframes rotate-sun {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Clouds Elements */
.cloud-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.left-clouds {
    transform: translateX(var(--scroll-split-left));
}

.right-clouds {
    transform: translateX(var(--scroll-split-right));
}

.cloud {
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    /* Soft fluffy cartoon clouds with no borders, exactly like the original show's intro sky */
    filter: drop-shadow(0px 8px 16px rgba(255, 255, 255, 0.55)) drop-shadow(5px 12px 18px rgba(0, 0, 0, 0.06));
}

/* Four completely unique, hand-drawn vector cloud shapes from The Simpsons stylebook */
.cloud-type-a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 70'%3E%3Cpath d='M20,48 C15,44 14,35 20,28 C25,22 34,20 40,24 C45,13 62,8 74,15 C83,10 95,17 95,28 C100,33 100,44 95,49 C92,54 84,57 78,54 C71,60 53,62 44,57 C35,60 26,57 20,48 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}
.cloud-type-b {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cpath d='M15,42 C12,38 12,31 16,27 C20,23 27,21 31,24 C35,16 48,12 58,18 C64,10 77,8 87,15 C95,12 104,18 104,26 C110,31 110,39 104,44 C100,48 93,50 88,48 C82,53 66,54 58,50 C50,53 41,51 36,47 C30,50 21,48 15,42 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}
.cloud-type-c {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 85'%3E%3Cpath d='M25,60 C18,55 16,45 22,37 C26,30 35,28 42,32 C46,20 62,12 76,20 C84,10 98,12 106,22 C114,18 126,25 126,37 C132,43 132,54 126,60 C122,66 112,68 106,65 C98,72 80,74 72,69 C62,72 50,70 42,65 C34,68 28,66 25,60 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}
.cloud-type-d {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 115 65'%3E%3Cpath d='M20,38 C15,34 15,26 20,20 C24,15 31,14 36,17 C40,8 55,5 65,12 C72,6 83,10 88,18 C94,14 103,20 103,28 C108,32 108,40 103,45 C100,49 93,50 88,48 C83,53 70,54 63,50 C56,53 47,51 42,47 C36,50 28,48 20,38 Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}

/* Various Massive Cloud Sizes & Drifts (Creating a dense wall that parts on scroll) */
.cloud-1 { width: 480px; height: 300px; top: 1%; left: -6%; z-index: 5; animation: float-slow 35s linear infinite alternate; }
.cloud-2 { width: 680px; height: 400px; top: 18%; left: -12%; z-index: 3; animation: float-mid 28s linear infinite alternate; }
.cloud-3 { width: 550px; height: 330px; top: 52%; left: -5%; z-index: 4; animation: float-slow 45s linear infinite alternate; }
.cloud-7 { width: 600px; height: 360px; top: 5%; left: 22%; z-index: 7; animation: float-mid 33s linear infinite alternate; }
.cloud-8 { width: 640px; height: 380px; top: 34%; left: 16%; z-index: 6; animation: float-slow 39s linear infinite alternate; }
.cloud-9 { width: 520px; height: 310px; top: 64%; left: 14%; z-index: 2; animation: float-mid 48s linear infinite alternate; }

.cloud-4 { width: 500px; height: 310px; top: 0%; right: -6%; z-index: 5; animation: float-mid 32s linear infinite alternate; }
.cloud-5 { width: 720px; height: 420px; top: 22%; right: -14%; z-index: 3; animation: float-slow 40s linear infinite alternate; }
.cloud-6 { width: 560px; height: 340px; top: 56%; right: -5%; z-index: 4; animation: float-mid 26s linear infinite alternate; }
.cloud-10 { width: 620px; height: 370px; top: 6%; right: 22%; z-index: 7; animation: float-slow 36s linear infinite alternate; }
.cloud-11 { width: 660px; height: 390px; top: 38%; right: 16%; z-index: 6; animation: float-mid 42s linear infinite alternate; }
.cloud-12 { width: 510px; height: 300px; top: 68%; right: 14%; z-index: 2; animation: float-slow 50s linear infinite alternate; }

@keyframes float-slow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, -10px); }
}

@keyframes float-mid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-25px, 15px); }
}

/* The Big Simpsons Title Styles */
.title-wrapper {
    position: relative;
    z-index: 12;
    text-align: center;
    perspective: 800px;
    transform: scale(var(--scroll-zoom));
    opacity: var(--scroll-opacity);
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    padding: 20px;
    max-width: 95%;
}

.simpsons-title {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 8vw;
    line-height: 1.15;
    color: var(--simpsons-yellow);
    transform: rotateX(12deg) rotateY(-8deg) rotateZ(-3deg) skew(-5deg);
    filter: drop-shadow(4px 4px 0px var(--dark-border));
}

.simpsons-title span {
    display: inline-block;
    position: relative;
    color: var(--simpsons-yellow);
    text-shadow: 8px 8px 0px rgba(0, 0, 0, 0.25);
    letter-spacing: 2px;
}

@media (min-width: 768px) {
    .simpsons-title .line-1 {
        font-size: 7.5rem !important;
        -webkit-text-stroke: 3.8px var(--dark-border) !important;
        text-stroke: 3.8px var(--dark-border) !important;
    }
    .simpsons-title .line-2 {
        font-size: 3.8rem !important;
        -webkit-text-stroke: 2.2px var(--dark-border) !important;
        text-stroke: 2.2px var(--dark-border) !important;
    }
}

.simpsons-title .line-1 {
    font-size: 11.5vw !important;
    white-space: nowrap !important;
    -webkit-text-stroke: 2.8px var(--dark-border) !important;
    text-stroke: 2.8px var(--dark-border) !important;
    transform: scale(0.95) rotateZ(-1.5deg) translate(-5px, -5px);
    z-index: 1;
}

.simpsons-title .line-2 {
    font-size: 6.2vw !important;
    white-space: nowrap !important;
    -webkit-text-stroke: 1.5px var(--dark-border) !important;
    text-stroke: 1.5px var(--dark-border) !important;
    transform: scale(1.05) rotateZ(2deg) translateY(8px);
    z-index: 2;
}

.simpsons-title .letter-y {
    font-family: 'Comic Sans MS', 'Comic Neue', 'Nunito', sans-serif;
    display: inline-block;
}

.zoom-letter {
    display: inline-block;
    position: relative;
}

/* Scroll down instruction */
.scroll-instruction {
    position: absolute;
    bottom: 30px;
    z-index: 15;
    text-align: center;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    opacity: var(--scroll-opacity);
    transition: opacity 0.2s ease;
    text-shadow: 2px 2px 0 var(--dark-border);
}

.donut-indicator {
    font-size: 32px;
    animation: bounce-donut 1.5s infinite alternate ease-in-out;
    cursor: pointer;
    display: inline-block;
}

.arrow-down {
    font-size: 24px;
    margin-top: 5px;
    animation: arrow-bounce 1s infinite alternate;
}

@keyframes bounce-donut {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(15deg); }
}

@keyframes arrow-bounce {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(8px); opacity: 1; }
}

/* MAIN CONTENT BLOCK */
/*.content-wrapper {*/
.content-wrapper {
    position: relative;
    z-index: 5;
    margin-top: 150vh; /* Aligns with the end of the 250vh cloud-split animation (250vh - 100vh viewport) */
    padding: 40px 24px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--light-bg);
    border: 5px solid var(--dark-border);
    border-radius: 24px;
    box-shadow: 12px 12px 0px var(--dark-border);
    margin-bottom: 60px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden-init {
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
}

.visible-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Main layouts and Sections spacings */
.invitation-section {
    margin-bottom: 70px;
    width: 100%;
}

.section-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
}

/* SECTION 1: BART'S CHALKBOARD */
.chalkboard-frame {
    width: 100%;
    max-width: 650px;
    background: #6D4C41; /* Wooden framing */
    border: 5px solid var(--dark-border);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 10px 10px 0 var(--dark-border);
    transform: rotateZ(-1.5deg);
}

#chalkboard-section {
    margin-top: 60px;
}

.chalkboard-surface {
    background-color: var(--chalkboard-green);
    border: 3px solid var(--dark-border);
    min-height: 250px;
    padding: 24px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.chalkboard-text {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    line-height: 1.6;
    letter-spacing: 1px;
    white-space: pre-wrap;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.chalk-icon {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 24px;
    transform: rotate(45deg);
    opacity: 0.7;
}

.cartoon-caption {
    margin-top: 20px;
    background: var(--simpsons-yellow);
    border: 3.5px solid var(--dark-border);
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    box-shadow: 4px 4px 0 var(--dark-border);
    text-align: center;
    font-size: 1.2rem;
}

@media (max-width: 480px) {
    .content-wrapper {
        border-width: 4px !important;
        box-shadow: 8px 8px 0px var(--dark-border) !important;
        padding: 30px 16px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
    #chalkboard-section {
        margin-top: 35px !important;
    }
    .chalkboard-frame {
        padding: 8px !important;
        border-width: 3.5px !important;
        box-shadow: 6px 6px 0 var(--dark-border) !important;
    }
    .chalkboard-surface {
        padding: 12px !important;
        min-height: 180px !important;
    }
    .chalkboard-text {
        font-size: 1.15rem !important;
        line-height: 1.45 !important;
    }
    .cartoon-caption {
        padding: 8px 16px !important;
        font-size: 1rem !important;
        border-width: 2.5px !important;
        box-shadow: 3px 3px 0 var(--dark-border) !important;
        margin-top: 15px !important;
    }
}

/* SECTION 2: RETRO SIMPSONS TV */
.retro-tv {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* Antenna */
.tv-antenna {
    display: flex;
    justify-content: center;
    height: 45px;
    margin-bottom: -5px;
    position: relative;
    z-index: 1;
}

.antenna-left, .antenna-right {
    width: 6px;
    background: #7F8C8D;
    border: 2px solid var(--dark-border);
    height: 100%;
    transform-origin: bottom;
}

.antenna-left { transform: rotate(-35deg); margin-right: 15px;}
.antenna-right { transform: rotate(35deg); }

.antenna-left::before, .antenna-right::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #E74C3C;
    border: 2px solid var(--dark-border);
    border-radius: 50%;
}

/* Cabinet */
.tv-cabinet {
    background: var(--tv-purple);
    border: 5px solid var(--dark-border);
    border-radius: 28px;
    padding: 10px; /* More compact on mobile to give screen space */
    box-shadow: 12px 12px 0 var(--dark-border);
    display: flex;
    flex-direction: row; /* Always row to keep iconic TV shape! */
}

@media(min-width: 500px) {
    .tv-cabinet {
        padding: 20px;
    }
}

/* Screen outer frame */
.tv-screen-bezel {
    flex: 3;
    background: #DDD1C7;
    border: 4px solid var(--dark-border);
    border-radius: 18px;
    padding: 8px; /* Compact on mobile */
    display: flex;
    flex-direction: column;
    min-height: 210px; /* Fits row layout perfectly on mobile */
}

@media(min-width: 500px) {
    .tv-screen-bezel {
        padding: 12px;
        min-height: 280px;
    }
}

/* Screen */
.tv-screen {
    flex: 1;
    background: #34495E;
    border: 4px solid var(--dark-border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Retro lines and glass glare */
.screen-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 3;
}

.screen-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 20%, transparent 40%);
    transform: rotate(5deg);
    pointer-events: none;
    z-index: 4;
}

/* Screen content and slides */
.tv-content-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.tv-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}

.tv-slide.active {
    opacity: 1;
    visibility: visible;
}

.tv-slide-inner {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tv-slide-inner h3 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.05rem; /* Compact on mobile */
    margin-bottom: 5px;
    color: var(--simpsons-yellow);
    text-shadow: 2px 2px 0 var(--dark-border);
}

@media(min-width: 500px) {
    .tv-slide-inner h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
}

.tv-slide-inner p {
    font-size: 0.8rem; /* Compact on mobile */
    line-height: 1.35;
    max-height: 100px;
    overflow-y: auto;
}

@media(min-width: 500px) {
    .tv-slide-inner p {
        font-size: 0.95rem;
        line-height: 1.4;
        max-height: 160px;
    }
}

.tv-subtitle {
    font-size: 0.72rem !important;
    padding: 6px !important;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media(min-width: 500px) {
    .tv-subtitle {
        font-size: 0.9rem !important;
        padding: 8px !important;
    }
}

/* Avatar styling */
.avatar-container {
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
}

@media(min-width: 500px) {
    .avatar-container {
        width: 68px;
        height: 68px;
        margin-bottom: 8px;
    }
}

.girl-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3.5px solid var(--dark-border);
    object-fit: cover;
    background-color: var(--simpsons-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Slider Controls */
.screen-footer {
    padding: 8px;
    display: flex;
    justify-content: center;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    border-top: 2px solid var(--dark-border);
}

.slide-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1.5px solid var(--dark-border);
    cursor: pointer;
    transition: background-color 0.2s;
}

.dot.active {
    background: var(--simpsons-yellow);
}

/* Details grid inside TV */
.info-badge {
    background: var(--donut-pink);
    border: 2px solid var(--dark-border);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.details-grid {
    text-align: left;
    width: 100%;
    font-size: 0.72rem !important;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 4px 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

@media(min-width: 500px) {
    .details-grid {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px !important;
    margin-bottom: 4px !important;
}

.detail-item:last-child {
    margin-bottom: 0 !important;
}

@media(min-width: 500px) {
    .detail-item {
        gap: 8px !important;
        margin-bottom: 6px !important;
    }
}

.detail-item .icon {
    font-size: 16px;
}

.detail-item p {
    font-weight: 700;
    color: var(--simpsons-yellow);
}

/* Action Buttons inside TV Slide 3 */
.map-actions {
    display: flex;
    flex-direction: column; /* Stacks vertically on mobile to fit nicely */
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    align-items: center;
}

@media(min-width: 500px) {
    .map-actions {
        flex-direction: row;
        gap: 10px;
        margin-top: 10px;
        justify-content: center;
    }
}

.tv-btn {
    text-decoration: none;
    color: var(--dark-border);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 12px;
    border: 2.5px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 2px 2px 0 var(--dark-border);
    display: flex;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-blue { background: var(--simpsons-blue); }
.btn-pink { background: var(--donut-pink); }

.tv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--dark-border);
}
.tv-btn:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0 var(--dark-border);
}

/* TV Controls Bezel */
.tv-controls {
    background: #C4B7AC;
    border: 4px solid var(--dark-border);
    border-radius: 14px;
    padding: 8px 4px; /* More compact on mobile */
    display: flex;
    flex-direction: column; /* Always column to keep controls on the right */
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-left: 8px; /* on the right side of the screen */
    min-height: 210px;
    width: 50px; /* fixed width on mobile */
    flex-shrink: 0;
}

@media(min-width: 500px) {
    .tv-controls {
        padding: 20px 10px;
        margin-left: 12px;
        min-height: 280px;
        width: 75px;
        gap: 12px;
    }
}

.tuner-dial {
    width: 36px; /* smaller dial on mobile */
    height: 36px;
    border-radius: 50%;
    background: #605952;
    border: 3px solid var(--dark-border);
    position: relative;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

@media(min-width: 500px) {
    .tuner-dial {
        width: 50px;
        height: 50px;
        border-width: 3.5px;
    }
}

.dial-indicator {
    width: 3px;
    height: 10px;
    background: var(--white);
    position: absolute;
    top: 3px;
    left: calc(50% - 1.5px);
    border-radius: 2px;
}

@media(min-width: 500px) {
    .dial-indicator {
        width: 4px;
        height: 15px;
        top: 4px;
        left: calc(50% - 2px);
    }
}

.tuner-dial-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #605952;
    border: 3px solid var(--dark-border);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

@media(min-width: 500px) {
    .tuner-dial-small {
        width: 35px;
        height: 35px;
        border-width: 3.5px;
    }
}

.tv-speaker-grille {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 32px;
}

@media(min-width: 500px) {
    .tv-speaker-grille {
        gap: 4px;
        width: 45px;
    }
}

.tv-speaker-grille span {
    height: 3px;
    background: #7A6F65;
    border-radius: 2px;
    border-bottom: 1.5px solid rgba(255,255,255,0.2);
}

.power-button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #27AE60;
    border: 2.5px solid var(--dark-border);
    cursor: pointer;
    box-shadow: 1px 1px 0 var(--dark-border);
    margin-top: 5px;
}

.power-button:active {
    transform: scale(0.9);
    background: #219653;
}

.power-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #95A5A6;
    border: 1px solid var(--dark-border);
}

.power-light.on {
    background: #E74C3C;
    box-shadow: 0 0 8px #E74C3C;
}

/* TV base/feet */
.tv-base {
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    margin-top: -4px;
}

.tv-foot-left, .tv-foot-right {
    width: 25px;
    height: 15px;
    background: #4A352F;
    border: 4px solid var(--dark-border);
    border-radius: 4px;
}

.tv-foot-left { transform: skewX(-20deg); }
.tv-foot-right { transform: skewX(20deg); }

/* SECTION 3: NUCLEAR POWER PLANT CONTROL PANEL COUNTDOWN */
.console-panel {
    background: var(--console-grey);
    border: 5px solid var(--dark-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 10px 10px 0 var(--dark-border);
    width: 100%;
    max-width: 650px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--dark-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.1);
    padding: 8px;
    border-radius: 8px;
}

.console-title {
    font-size: 1.25rem;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    color: var(--white);
    text-shadow: 2px 2px 0 var(--dark-border);
    text-align: center;
}

.radiation-symbol {
    font-size: 26px;
    animation: rotate-rad 10s linear infinite;
}

@keyframes rotate-rad {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.warning-banner {
    background: #F1C40F;
    color: var(--dark-border);
    border: 3.5px solid var(--dark-border);
    padding: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-radius: 8px;
}

.blinking-fast {
    animation: blink-hazard 0.6s infinite;
}

@keyframes blink-hazard {
    0%, 100% { background: #F1C40F; color: var(--dark-border); }
    50% { background: #E74C3C; color: var(--white); }
}

/* Gauges row */
.gauge-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
}

.gauge-box {
    width: 64px;
    height: 40px;
    background: #EAEAEA;
    border: 3px solid var(--dark-border);
    border-radius: 40px 40px 0 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

.gauge-needle {
    width: 4px;
    height: 32px;
    background: #E74C3C;
    position: absolute;
    bottom: 0;
    left: calc(50% - 2px);
    transform-origin: bottom center;
    border-radius: 2px;
    transition: transform 0.5s ease-out;
}

.gauge-needle.animate-wobble {
    animation: gauge-shake 1.5s infinite alternate ease-in-out;
}

@keyframes gauge-shake {
    0% { transform: rotate(90deg); }
    30% { transform: rotate(100deg); }
    70% { transform: rotate(85deg); }
    100% { transform: rotate(115deg); }
}

.gauge-label {
    position: absolute;
    bottom: -18px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
}

/* Countdown Display */
.countdown-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    border: 4px solid var(--dark-border);
    border-radius: 12px;
    padding: 16px 8px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 15px rgba(0, 255, 0, 0.15);
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.time-value {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    color: #4AF626; /* Sci-fi radioactive green */
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(74, 246, 38, 0.8);
}

.time-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 700;
}

.time-separator {
    color: #4AF626;
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: -20px;
    animation: blink-colon 1s infinite;
}

@keyframes blink-colon {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Flashing Alert Lights */
.status-lights {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: rgba(0,0,0,0.15);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--dark-border);
}

.status-light {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid var(--dark-border);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4);
}

.status-light.red { background: #7f1d1d; }
.status-light.red.blinking { animation: light-red 0.8s infinite alternate; }

.status-light.yellow { background: #78350f; }
.status-light.yellow.blinking-delayed { animation: light-yellow 0.8s infinite alternate 0.4s; }

.status-light.green { background: #064e3b; }
.status-light.green.blinking { animation: light-green 0.8s infinite alternate 0.2s; }

.status-light.blue { background: #1e3a8a; }

.status-light.orange { background: #7c2d12; }
.status-light.orange.blinking-delayed { animation: light-orange 0.8s infinite alternate 0.6s; }

@keyframes light-red { 0% { background: #7f1d1d; box-shadow: none; } 100% { background: #EF4444; box-shadow: 0 0 10px #EF4444; } }
@keyframes light-yellow { 0% { background: #78350f; box-shadow: none; } 100% { background: #F59E0B; box-shadow: 0 0 10px #F59E0B; } }
@keyframes light-green { 0% { background: #064e3b; box-shadow: none; } 100% { background: #10B981; box-shadow: 0 0 10px #10B981; } }
@keyframes light-orange { 0% { background: #7c2d12; box-shadow: none; } 100% { background: #F97316; box-shadow: 0 0 10px #F97316; } }

/* SECTION 4: THE KWIK-E-MART / DONUT BAKERY RSVP CARD */
.donut-bakery-card {
    background: var(--white);
    border: 4px solid var(--dark-border);
    border-radius: 20px;
    padding: 40px 24px 24px;
    box-shadow: 10px 10px 0 var(--dark-border);
    position: relative;
    width: 100%;
    max-width: 650px;
}

/* Classic Striped Awning */
.card-awning {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    height: 35px;
    display: flex;
    overflow: hidden;
    border-top: 4px solid var(--dark-border);
    border-left: 4px solid var(--dark-border);
    border-right: 4px solid var(--dark-border);
    border-bottom: 4px solid var(--dark-border);
    border-radius: 16px 16px 0 0;
    z-index: 2;
}

.card-awning span {
    flex: 1;
    height: 100%;
}

.card-awning span:nth-child(odd) { background-color: var(--donut-pink); }
.card-awning span:nth-child(even) { background-color: var(--white); }

.rsvp-intro {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Simpsons Form Layout */
.simpsons-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-border);
}

.form-input {
    border: 3.5px solid var(--dark-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1.05rem;
    background: var(--light-bg);
    outline: none;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}

.form-input:focus {
    border-color: var(--simpsons-blue);
    background: var(--white);
}

/* Styled Radio Attendance Cards */
.attendance-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media(min-width: 500px) {
    .attendance-options {
        flex-direction: row;
    }
}

.attendance-card {
    flex: 1;
    cursor: pointer;
    border: 3.5px solid var(--dark-border);
    border-radius: 12px;
    background: var(--light-bg);
    overflow: hidden;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.attendance-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.attendance-card .card-content {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.attendance-card .card-emoji {
    font-size: 32px;
    transition: transform 0.2s;
}

.attendance-card .card-title {
    font-weight: 700;
    font-size: 1rem;
}

.attendance-card .card-sub {
    font-size: 0.75rem;
    color: #666;
}

/* Hover & Active States */
.attendance-card:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.15);
}

.attendance-card:hover .card-emoji {
    transform: scale(1.15) rotate(5deg);
}

.attendance-card.positive input:checked ~ .card-content {
    background-color: #E2F5E5;
}
.attendance-card.negative input:checked ~ .card-content {
    background-color: #FCE8E6;
}

.attendance-card input:checked ~ .card-content {
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.attendance-card input:checked {
    /* Implicit via JS toggle or simple parent border coloring in CSS */
}

/* Class applied by JS */
.card-checked {
    border-color: var(--donut-pink) !important;
    background: var(--white);
    transform: scale(1.02);
    box-shadow: 5px 5px 0 var(--dark-border) !important;
}

.card-checked.positive { border-color: #27AE60 !important; }
.card-checked.negative { border-color: #E74C3C !important; }

/* Selection menu */
.form-select {
    border: 3.5px solid var(--dark-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1.05rem;
    background: var(--light-bg);
    outline: none;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}

.form-select:focus {
    border-color: var(--simpsons-blue);
}

/* Custom Speech Bubble Textarea */
.speech-bubble-wrapper {
    position: relative;
}

.form-textarea {
    width: 100%;
    border: 3.5px solid var(--dark-border);
    border-radius: 16px;
    padding: 16px;
    font-size: 1.05rem;
    background: var(--white);
    outline: none;
    resize: none;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
}

.form-textarea:focus {
    border-color: var(--simpsons-blue);
}

/* GIANT DONUT SUBMIT BUTTON */
.donut-submit-btn {
    margin-top: 15px;
    background: var(--donut-pink);
    border: 4px solid var(--dark-border);
    border-radius: 50px;
    padding: 16px 24px;
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 0 var(--dark-border);
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--dark-border);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.donut-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.donut-submit-btn:hover {
    background-color: var(--donut-pink-hover);
    transform: scale(1.03) translateY(-3px);
    box-shadow: 8px 8px 0 var(--dark-border);
}

.donut-submit-btn:hover::before {
    left: 100%;
}

.donut-submit-btn:active {
    transform: scale(0.97) translateY(2px);
    box-shadow: 3px 3px 0 var(--dark-border);
}

/* Success Screen inside card */
.success-screen {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: scale-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scale-up {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-donut {
    font-size: 70px;
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    100% { transform: rotate(360deg); }
}

.success-screen h3 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.8rem;
    color: var(--donut-pink);
    text-shadow: 2px 2px 0 var(--dark-border);
}

.success-screen p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* FOOTER SECTION STYLING */
.simpsons-footer {
    border-top: 5px dashed var(--dark-border);
    padding-top: 40px;
    padding-bottom: 20px;
    text-align: center;
    width: 100%;
}

.footer-sign {
    background: #FFF;
    border: 4.5px solid var(--dark-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 6px 6px 0 var(--dark-border);
    display: inline-block;
    max-width: 90%;
    margin-bottom: 25px;
    transform: rotate(1deg);
}

.footer-sign span {
    display: block;
}

.footer-sign .text-1 {
    font-size: 0.95rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-sign .text-2 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.5rem;
    color: var(--simpsons-blue);
    font-weight: 700;
    margin: 4px 0;
    text-shadow: 1px 1px 0 var(--dark-border);
}

.footer-gag {
    font-size: 0.9rem;
    font-style: normal;
    color: var(--donut-pink);
    margin-top: 8px;
    font-weight: 700;
}

.copyright {
    font-size: 0.8rem;
    color: #777;
}

/* Falling Sprinkles Styles (JS Controlled) */
.sprinkle {
    position: absolute;
    width: 15px;
    height: 6px;
    border-radius: 10px;
    opacity: 0.85;
    border: 1.5px solid var(--dark-border);
    pointer-events: none;
    z-index: 99;
}

.mini-donut {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    z-index: 99;
}

/* TV Screen Image */
.tv-screen-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Invitation Details Card outside TV */
.invitation-details-card {
    width: 100%;
    max-width: 500px;
    margin-top: 35px;
    text-align: center;
    background-color: var(--white);
}

.details-welcome-title {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.8rem;
    color: var(--donut-pink);
    margin-bottom: 12px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.05);
}

.details-welcome-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--dark-border);
}

.details-divider {
    font-size: 1.4rem;
    margin: 20px 0;
    letter-spacing: 5px;
}

.details-section-title {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 1.4rem;
    color: var(--simpsons-dark-blue);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-details-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    background: #FFFDF0;
    border: 3.5px solid var(--dark-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 5px 5px 0 var(--dark-border);
}

.info-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    font-size: 22px;
    background-color: var(--simpsons-yellow);
    border: 2.5px solid var(--dark-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 var(--dark-border);
}

.info-content strong {
    font-size: 0.85rem;
    color: #555;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.info-content p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-border);
}

.card-map-actions {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.card-map-actions .tv-btn {
    flex: 1;
    max-width: 200px;
    padding: 12px;
    font-size: 1rem;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 480px) {
    .card-map-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .card-map-actions .tv-btn {
        max-width: 100%;
        width: 100%;
    }
    .info-details-grid {
        padding: 12px;
    }
    .info-content p {
        font-size: 0.95rem;
    }
}

