body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9f9; 
    text-align: center;
    color: #333;
    transition: background-color 0.5s; 
    padding-bottom: 35px; /* Add space at the bottom for the fixed footer */
}

/* Ensure padding and borders are calculated inside the element's width */
* {
    box-sizing: border-box;
}

#app-container {
    position: relative; 
    width: 90%;
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    background: transparent; 
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px; 
}

/* --- NEW: Footer Style for License Acknowledgment --- */
#license-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Small semi-transparent box */
    background-color: rgba(255, 255, 255, 0.4); 
    color: #333; 
    padding: 5px 10px;
    font-size: 0.75em; /* Small font */
    text-align: center;
    z-index: 50; 
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
#license-footer a {
    color: #004d40;
    text-decoration: none;
}
#license-footer a:hover {
    text-decoration: underline;
}
/* --- END FOOTER STYLE --- */


/* Header Box for readability (Title and Date) */
#header-box {
    margin-bottom: 20px;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: rgba(232, 245, 233, 0.6); 
    border: 3px solid #004d40;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#day-title {
    margin-top: 0;
}
.date-header {
    margin-bottom: 0;
}


/* --- CAROUSEL STRUCTURE --- */
#day-challenge-container {
    overflow: hidden; 
    position: relative;
    padding-bottom: 20px;
}

#carousel-inner {
    display: flex; 
    width: 400%; 
    transition: transform 0.5s ease-in-out; 
}

.carousel-page {
    min-width: 25%; 
    box-sizing: border-box;
    padding: 0 10px; 
}

/* --- START SPLASH SCREEN --- */
.splash-screen {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); 
    z-index: 100; 
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    cursor: pointer;
}

#start-content {
    text-align: center;
    padding: 30px;
}

#start-button {
    font-size: 1.5em;
    padding: 15px 30px;
    margin-top: 20px;
    background-color: #c62828; 
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* --- CHALLENGE ITEM (SEMI-TRANSPARENCY & DEFAULT STYLES) --- */
.challenge-item {
    border: 3px solid #004d40; 
    background-color: rgba(232, 245, 233, 0.6); 
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: pulse 1.5s infinite alternate; 
    transition: all 0.5s;
}

/* Completion Message Style */
#completion-message {
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.7); 
    border: 3px solid #004d40; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
    margin: 20px 0;
}


.clue {
    font-size: 1.1em; 
    line-height: 1.3;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.005); }
}

.anagram-display {
    font-size: 2.5em;
    font-weight: 900;
    color: #c62828;
    margin: 15px 0;
    letter-spacing: 5px;
}

input[type="text"] {
    padding: 10px;
    font-size: 1.2em;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
    text-transform: uppercase;
}

button {
    padding: 10px 20px;
    background-color: #004d40;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.feedback { margin-top: 10px; font-weight: bold; }
.correct { color: green; }
.incorrect { color: red; }
.hidden { display: none !important; }
.locked-container { padding: 40px; background-color: #ffe0b2; border: 2px dashed #e65100; border-radius: 10px; }

/* --- 10 THEME-SPECIFIC STYLES (Update to include #header-box) --- */
/* The logic below applies theme-specific border color and background-color (0.6 opacity) to challenge items, completion message, AND the header box. */

/* Day 1: Sleigh */
body.theme-Sleigh { background: url('assets/bg_sleigh.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Sleigh .challenge-item, body.theme-Sleigh #completion-message, body.theme-Sleigh #header-box { border-color: #c62828; background-color: rgba(255, 248, 225, 0.6); animation: rock 3s ease-in-out infinite alternate; }

/* Day 2: Bauble */
body.theme-Bauble { background: url('assets/bg_bauble.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Bauble .challenge-item, body.theme-Bauble #completion-message, body.theme-Bauble #header-box { border-color: #d84315; background-color: rgba(255, 255, 255, 0.6); }

/* Day 3: Bell */
body.theme-Bell { background: url('assets/bg_bell.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Bell .challenge-item, body.theme-Bell #completion-message, body.theme-Bell #header-box { border-color: #ffc107; background-color: rgba(255, 250, 230, 0.6); }

/* Day 4: Candle */
body.theme-Candle { background: url('assets/bg_candle.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Candle .challenge-item, body.theme-Candle #completion-message, body.theme-Candle #header-box { border-color: #fbc02d; background-color: rgba(255, 255, 255, 0.6); }

/* Day 5: Scroll */
body.theme-Scroll { background: url('assets/bg_scroll.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Scroll .challenge-item, body.theme-Scroll #completion-message, body.theme-Scroll #header-box { border-color: #a1887f; background-color: rgba(255, 255, 240, 0.6); }

/* Day 6: Snowman */
body.theme-Snowman { background: url('assets/bg_snowman.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Snowman .challenge-item, body.theme-Snowman #completion-message, body.theme-Snowman #header-box { border-color: #455a64; background-color: rgba(240, 248, 255, 0.6); }

/* Day 7: Antler */
body.theme-Antler { background: url('assets/bg_antler.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Antler .challenge-item, body.theme-Antler #completion-message, body.theme-Antler #header-box { border-color: #8b4513; background-color: rgba(240, 245, 233, 0.6); }

/* Day 8: Chimney */
body.theme-Chimney { background: url('assets/bg_chimney.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Chimney .challenge-item, body.theme-Chimney #completion-message, body.theme-Chimney #header-box { border-color: #bf360c; background-color: rgba(255, 245, 230, 0.6); }

/* Day 9: Gingerbread */
body.theme-Gingerbread { background: url('assets/bg_gingerbread.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Gingerbread .challenge-item, body.theme-Gingerbread #completion-message, body.theme-Gingerbread #header-box { border-color: #8d6e63; background-color: rgba(250, 240, 210, 0.6); }

/* Day 10: Star */
body.theme-Star { background: url('assets/bg_star.jpeg') no-repeat center center fixed; background-size: cover; }
body.theme-Star .challenge-item, body.theme-Star #completion-message, body.theme-Star #header-box { border-color: #fdd835; background-color: rgba(255, 255, 255, 0.6); }