:root {
    --deep-sky: #0c2aad;
    --blue-ocean: #4272ab;
    --celestial-iris: #b4bbfa;
    --helio-cosmos: #ffa314;
    --infinite-ivory: #fef9f3;

    --bg-color: var(--deep-sky);
    --text-color: var(--infinite-ivory);
    --box-shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
    background: radial-gradient(circle at center, var(--blue-ocean), var(--deep-sky));
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.bg-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1em;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) translateX(0);
    }

    100% {
        transform: translateY(110vh) translateX(20px);
    }
}

.main-container {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
}

.title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: var(--helio-cosmos);
    margin-bottom: 2rem;
    display: none;
}

.tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tree-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.day-box {
    width: 60px;
    height: 60px;
    background-color: var(--blue-ocean);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--infinite-ivory);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    position: relative;
    box-shadow: 0 4px 6px var(--box-shadow-color);
    border-radius: 50%;
}

.day-box.ball--dark {
    background-color: var(--deep-sky);
    color: var(--infinite-ivory);
}

.day-box.ball--light {
    background-color: var(--celestial-iris);
    color: transparent;
    cursor: default;
    box-shadow: none;
}

.day-box.ball--light:hover {
    transform: none;
    background-color: var(--celestial-iris);
}

.day-box:hover {
    transform: scale(1.05);
    background-color: var(--helio-cosmos);
    color: var(--deep-sky);
    z-index: 5;
}

.day-box.star-box {
    background: transparent;
    box-shadow: none;
    color: var(--helio-cosmos);
    font-size: 3rem;
    overflow: visible;
    border: none;
    cursor: pointer;
}

.day-box.star-box:hover {
    background: transparent;
    transform: scale(1.1);
}

.day-box.star-box span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 1.2rem;
    color: var(--deep-sky);
    font-weight: bold;
}

.star-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: var(--helio-cosmos);
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(255, 163, 20, 0.5));
}

.day-box.ball--locked {
    opacity: 0.4;
    filter: grayscale(60%);
    cursor: not-allowed;
}

.day-box.ball--locked:hover {
    transform: scale(1.0);
    background-color: inherit;
    color: inherit;
}

.ball--non-interactive {
    opacity: 0.5;
    cursor: default !important;
    filter: grayscale(60%);
}

.ball--non-interactive:hover {
    transform: none !important;
    box-shadow: 0 8px 25px rgba(255, 163, 20, 0.2) !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.day-box.shake {
    animation: shake 0.5s ease-in-out;
}

.decoration {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.leaf {
    width: 30px;
    height: 30px;
    background: #81c784;
    border-radius: 0 50% 0 50%;
    transform: rotate(45deg);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 42, 173, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--infinite-ivory);
    color: var(--deep-sky);
    padding: 2rem;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: sticky;
    top: 0;
    float: right;
    background: var(--helio-cosmos);
    border: none;
    color: var(--infinite-ivory);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.1);
    background: var(--deep-sky);
}

#char-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: var(--blue-ocean);
    margin-bottom: 0.5rem;
    clear: both;
}

.char-day {
    font-weight: bold;
    color: var(--helio-cosmos);
    margin-bottom: 1rem;
}

#char-desc {
    white-space: pre-wrap;
    text-align: left;
    line-height: 1.5;
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .day-box {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .star-shape {
        font-size: 3.5rem;
    }
}

.tree-trunk {
    width: 180px;
    height: 80px;
    background-color: #1a4b7c;
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--infinite-ivory);
    cursor: pointer;
    transition: transform 0.2s;
}

.tree-trunk:hover {
    transform: scale(1.05);
}

/* PASSWORD PROTECTION STYLES */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--blue-ocean), var(--deep-sky));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-container {
    background: rgba(254, 249, 243, 0.95);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    z-index: 1001;
}

.password-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.password-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: var(--deep-sky);
    margin-bottom: 0.5rem;
}

.password-subtitle {
    font-size: 1rem;
    color: var(--blue-ocean);
    margin-bottom: 2rem;
}

.password-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--celestial-iris);
    border-radius: 10px;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    transition: border-color 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: var(--helio-cosmos);
}

.password-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--deep-sky), var(--blue-ocean));
    color: var(--infinite-ivory);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
}

.password-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(12, 42, 173, 0.3);
}

.password-submit:active {
    transform: translateY(0);
}

.password-error {
    margin-top: 1rem;
    color: #d32f2f;
    font-weight: 600;
    font-size: 0.9rem;
}

.password-error.hidden {
    display: none;
}

/* CAROUSEL STYLES */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.carousel-slide.active {
    display: block;
    animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    user-select: none;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    text-align: center;
    margin-top: 10px;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--deep-sky);
}

/* VOTING STYLES */
.voting-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--celestial-iris);
    text-align: center;
}

.voting-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--helio-cosmos);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.voting-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.vote-input {
    padding: 0.5rem;
    border: 2px solid var(--celestial-iris);
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    width: 60%;
}

.vote-submit {
    padding: 0.5rem 1rem;
    background-color: var(--deep-sky);
    color: var(--infinite-ivory);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: bold;
    transition: background-color 0.2s;
}

.vote-submit:hover {
    background-color: var(--blue-ocean);
}

.vote-message {
    margin-bottom: 1rem;
    font-weight: bold;
    min-height: 1.5rem;
}

.vote-message.success {
    color: #2e7d32;
}

.vote-message.error {
    color: #d32f2f;
}

.leaderboard {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    text-align: left;
}

.leaderboard h4 {
    color: var(--deep-sky);
    margin-bottom: 0.5rem;
    text-align: center;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#leaderboard-list li:last-child {
    border-bottom: none;
}

#leaderboard-list span.vote-count {
    font-weight: bold;
    color: var(--helio-cosmos);
}

/* COMPLIMENT STYLES */
.compliment-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--celestial-iris);
    text-align: center;
}

.compliment-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--helio-cosmos), #ff8c00);
    color: var(--infinite-ivory);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 163, 20, 0.4);
}

.compliment-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 163, 20, 0.6);
}

.compliment-btn:active {
    transform: translateY(0) scale(1);
}

.compliment-text {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    border: 2px solid var(--celestial-iris);
    font-size: 1.1rem;
    line-height: 1.6;
    color: black !important;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.compliment-text:empty {
    display: none;
}

/* Microsoft Forms Container */
.forms-container {
    margin-top: 2rem;
}

.forms-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--celestial-iris);
    text-align: center;
}

.forms-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--infinite-ivory);
    text-align: center;
    opacity: 0.9;
}

.forms-vote-section {
    margin-bottom: 3rem;
}

.forms-vote-section iframe {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.forms-results-section {
    margin-top: 2rem;
}

.forms-results-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--deep-sky);
}

/* VOTING STYLES */
.voting-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--celestial-iris);
    text-align: center;
}

.voting-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--helio-cosmos);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.voting-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.vote-input {
    padding: 0.5rem;
    border: 2px solid var(--celestial-iris);
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    width: 60%;
}

.vote-submit {
    padding: 0.5rem 1rem;
    background-color: var(--deep-sky);
    color: var(--infinite-ivory);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: bold;
    transition: background-color 0.2s;
}

.vote-submit:hover {
    background-color: var(--blue-ocean);
}

.vote-message {
    margin-bottom: 1rem;
    font-weight: bold;
    min-height: 1.5rem;
}

.vote-message.success {
    color: #2e7d32;
}

.vote-message.error {
    color: #d32f2f;
}

.leaderboard {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    text-align: left;
}

.leaderboard h4 {
    color: var(--deep-sky);
    margin-bottom: 0.5rem;
    text-align: center;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#leaderboard-list li:last-child {
    border-bottom: none;
}

#leaderboard-list span.vote-count {
    font-weight: bold;
    color: var(--helio-cosmos);
}

/* COMPLIMENT STYLES */
.compliment-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--celestial-iris);
    text-align: center;
}

.compliment-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--helio-cosmos), #ff8c00);
    color: var(--infinite-ivory);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 163, 20, 0.4);
}

.compliment-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 163, 20, 0.6);
}

.compliment-btn:active {
    transform: translateY(0) scale(1);
}

.compliment-text {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    border: 2px solid var(--celestial-iris);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--infinite-ivory);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.compliment-text:empty {
    display: none;
}

/* Microsoft Forms Container */
.forms-container {
    margin-top: 2rem;
}

.forms-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--celestial-iris);
    text-align: center;
}

.forms-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--infinite-ivory);
    text-align: center;
    opacity: 0.9;
}

.forms-vote-section {
    margin-bottom: 3rem;
}

.forms-vote-section iframe {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.forms-results-section {
    margin-top: 2rem;
}

.forms-results-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--celestial-iris);
    text-align: center;
}

.forms-results-section iframe {
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* FLIP CARDS STYLES */
.flip-cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: nowrap;
}

.flip-card {
    background-color: transparent;
    width: 300px;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
}

.flip-card-front {
    background: linear-gradient(135deg, var(--deep-sky), var(--blue-ocean));
    color: var(--infinite-ivory);
}

.flip-card-front h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.flip-card-front p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.flip-card-back {
    background-color: var(--celestial-iris);
    color: white;
    transform: rotateY(180deg);
    padding: 0;
    overflow: hidden;
}

.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* IMAGE STYLES */
.image-container {
    margin: 1.5rem auto;
    text-align: center;
    max-width: 400px;
}

.character-image {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* CLOSING TEXT STYLES */
.closing-text-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--deep-sky), var(--blue-ocean));
    color: var(--infinite-ivory);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

/* VIDEO STYLES */
.video-container {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.video-player {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Character Description Formatting */
#char-desc {
    line-height: 1.5;
}

#char-desc p {
    margin: 0.3rem 0;
}

#char-desc ul {
    margin: 0.3rem 0 0.3rem 1.5rem;
    list-style-type: disc;
}

#char-desc li {
    margin-bottom: 0.1rem;
    padding-left: 0.3rem;
    line-height: 1.4;
}

#char-desc b {
    color: var(--helio-cosmos);
}