
:root {
    /* Light Side of the Moon Theme */
    --bg-color: #f0f2f5; /* Light grey-blue background */
    --text-color: #0a192f; /* Dark navy text */
    --container-bg: #ffffff; /* White container */
    --container-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    --header-color: #ff4e50; /* Bright rocket red */
    --header-shadow: #0a192f; /* Dark navy shadow */
    --subheader-color: #00bfff; /* Deep sky blue */
    --placeholder-bg: #e9ecef;
    --placeholder-border: #adb5bd;
    --placeholder-text: #6c757d;
    --survey-border: #ffd700; /* Gold/yellow survey border */
    --slider-bg: #ced4da;
    --link-color: #00ff7f; /* Bright green links */
}

body.dark-mode {
    /* Deep Space Theme */
    --bg-color: #0a192f; /* Dark navy background */
    --text-color: #ccd6f6; /* Light grey-cyan text */
    --container-bg: #112240; /* Lighter navy container */
    --container-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
    --header-color: #ff4e50; /* Bright rocket red */
    --header-shadow: #000;
    --subheader-color: #64ffda; /* Bright cyan */
    --placeholder-bg: #1d3b66;
    --placeholder-border: #64ffda;
    --placeholder-text: #ccd6f6;
    --survey-border: #ffd700; /* Gold/yellow survey border */
    --slider-bg: #1d3b66;
    --link-color: #64ffda; /* Bright cyan links */
}

body {
    font-family: 'Space Mono', monospace;
    font-size: 1.1em;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-image:
        radial-gradient(1px 1px at 20px 30px, white, rgba(255,255,255,0)),
        radial-gradient(1px 1px at 40px 70px, white, rgba(255,255,255,0)),
        radial-gradient(1px 1px at 90px 40px, white, rgba(255,255,255,0)),
        radial-gradient(2px 2px at 150px 120px, white, rgba(255,255,255,0));
    background-repeat: repeat;
    background-size: 200px 200px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--container-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--container-shadow);
    transition: background-color 0.3s;
}

h1 {
    font-family: 'Orbitron', 'Noto Color Emoji', sans-serif;
    text-align: center;
    color: var(--header-color);
    text-shadow: 2px 2px var(--header-shadow);
    position: relative; /* For pseudo-element positioning */
}

h1::before, h1::after {
    content: "🚀";
    font-size: 0.8em;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--subheader-color);
    text-shadow: 1px 1px 2px var(--header-shadow);
}

h1::before {
    left: .5em;
}

h1::after {
    content: "🪐";
    right: .5em;
}

.party-details {
    margin-bottom: 20px;
}

.party-details h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--subheader-color);
}

.birthday-person-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 20px auto;
    display: block;
    border: 3px solid var(--subheader-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--subheader-color);
}

#surveyContainer {
    padding: 20px;
    border: 2px solid var(--survey-border);
    border-radius: 5px;
    font-family: 'Space Mono', monospace !important;
}

/* Custom SurveyJS Dark Theme */
/* 
body.dark-mode .sv-body {
    background-color: var(--container-bg);
    border: 2px solid var(--survey-border);
    padding: 20px;
    border-radius: 5px;
}

body.dark-mode .sv-question__title,
body.dark-mode .sv-question__description,
body.dark-mode .sv-description,
body.dark-mode .sv-title,
body.dark-mode .sv-radio__label,
body.dark-mode .sv-checkbox__label {
    color: var(--text-color);
}

body.dark-mode .sv-text,
body.dark-mode .sv-comment,
body.dark-mode .sv-dropdown {
    background-color: var(--placeholder-bg);
    border: 1px solid var(--placeholder-border);
    color: var(--text-color);
}

body.dark-mode .sv-text:focus,
body.dark-mode .sv-comment:focus,
body.dark-mode .sv-dropdown:focus {
    border-color: var(--subheader-color);
}

body.dark-mode .sv-btn {
    background-color: var(--header-color);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    border: none;
    border-radius: 5px;
}

body.dark-mode .sv-btn:hover {
    background-color: var(--subheader-color);
    color: var(--bg-color);
}
*/

/* Theme Toggle Switch */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    background-color: var(--slider-bg);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "☀️";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1c3a5e;
}

input:checked + .slider {
    background-color: var(--header-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
    content: "🌙";
    color: var(--container-bg);
}

/* Improve link visibility */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--header-color);
}

.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    display: block;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 50%; left: 80%; animation-delay: 0.2s; }
.star:nth-child(3) { top: 30%; left: 40%; animation-delay: 0.4s; }
.star:nth-child(4) { top: 70%; left: 10%; animation-delay: 0.6s; }
.star:nth-child(5) { top: 90%; left: 50%; animation-delay: 0.8s; }
.star:nth-child(6) { top: 25%; left: 90%; animation-delay: 1s; }
.star:nth-child(7) { top: 5%; left: 50%; animation-delay: 1.2s; }
.star:nth-child(8) { top: 80%; left: 30%; animation-delay: 1.4s; }
.star:nth-child(9) { top: 60%; left: 70%; animation-delay: 1.6s; }
.star:nth-child(10) { top: 40%; left: 5%; animation-delay: 1.8s; }

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

#floating-rocket {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 50px;
    z-index: 999;
    animation: float 3s infinite ease-in-out;
    font-family: 'Noto Color Emoji';
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}
