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

:root {
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --text-gold: #d4af37;
    --text-silver: #c0c0c0;
    --text-white: #f5f5f5;
    --accent-red: #8b0000;
    --accent-green: #0d5d0d;
    --frost-bg: rgba(255, 255, 255, 0.1);
    --frost-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #1a1f2e 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Hide clue content on clue pages initially - will be shown by JavaScript after unlock check */
body:not(.index-page) .clue-content {
    display: none;
}

body.content-unlocked .clue-content {
    display: block;
}

/* Animated snowflakes background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 40%, white, transparent),
        radial-gradient(1px 1px at 33% 60%, white, transparent),
        radial-gradient(1px 1px at 55% 80%, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: snow 20s linear infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

@keyframes snow {
    0% { transform: translateY(0); }
    100% { transform: translateY(200px); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.title {
    font-size: 3.5em;
    color: var(--text-gold);
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 3px;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3); }
    to { text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.3); }
}

.subtitle {
    font-size: 1.3em;
    color: var(--text-silver);
    font-style: italic;
    letter-spacing: 2px;
}

.frosted-glass {
    background: var(--frost-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--frost-border);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.frosted-glass h2 {
    color: var(--text-gold);
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.frosted-glass p {
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.frosted-glass strong {
    color: var(--text-gold);
}

.warning {
    color: #ff6b6b;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

.navigation {
    margin-top: 40px;
}

.navigation h3 {
    color: var(--text-gold);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.password-section {
    margin-top: 40px;
}

.password-section h3 {
    color: var(--text-gold);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.5em;
}

.password-section #password-hint {
    color: var(--text-silver);
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.page-list {
    display: grid;
    gap: 15px;
}

.page-item {
    background: var(--frost-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--frost-border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-item.unlocked:hover,
.page-item.solved:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    border-color: var(--text-gold);
}

.page-item.locked:hover {
    transform: none;
    box-shadow: none;
}

.page-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.page-item.locked::after {
    content: '🔒';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
}

.page-item.unlocked {
    opacity: 1;
    border-color: var(--text-gold);
    cursor: pointer;
}

.page-item.solved {
    opacity: 1;
    border-color: var(--text-gold);
    background: rgba(212, 175, 55, 0.15);
    cursor: pointer;
}

.page-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.page-item h4 {
    color: var(--text-gold);
    margin: 0;
    font-size: 1.3em;
    flex: 1;
}

.page-item h4.cryptic-title {
    color: var(--text-silver);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    opacity: 0.7;
    font-style: italic;
}

.solved-checkmark {
    color: #4ade80;
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.page-item p {
    color: var(--text-silver);
    font-size: 0.95em;
}

.hint-button-container {
    margin-top: 15px;
    text-align: center;
}

.hint-btn {
    padding: 8px 20px;
    border: 1px solid var(--text-gold);
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-gold);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.hint-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.hint-btn.hint-revealed {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--text-gold);
}

.hint-content {
    margin-top: 15px;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--text-gold);
    border-radius: 8px;
    animation: hintAppear 0.3s ease;
}

@keyframes hintAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-text {
    color: var(--text-gold);
    font-style: italic;
    margin: 0;
    text-align: center;
    font-size: 1em;
}

/* Santa Tracker Styles */
.santa-tracker-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.command-terminal {
    background: var(--bg-darker);
    border: 2px solid var(--text-gold);
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.terminal-header {
    background: rgba(212, 175, 55, 0.2);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--text-gold);
}

.terminal-title {
    color: var(--text-gold);
    font-weight: bold;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.terminal-status {
    color: #4ade80;
    font-size: 0.8em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.terminal-body {
    padding: 15px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
}

.terminal-line {
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.4;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.prompt {
    color: #4ade80;
    margin-right: 8px;
}

.command {
    color: var(--text-gold);
}

.output {
    color: var(--text-silver);
}

.output.success {
    color: #4ade80;
}

.output.error {
    color: #ff6b6b;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--text-gold);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    outline: none;
    flex: 1;
    padding: 0;
    min-width: 200px;
    caret-color: var(--text-gold);
}

.terminal-input:focus {
    outline: none;
}

.terminal-input::placeholder {
    color: rgba(212, 175, 55, 0.5);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.terminal-input-line::after {
    content: '█';
    color: var(--text-gold);
    animation: blink-cursor 1s infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

#terminal-output {
    max-height: 200px;
    overflow-y: auto;
}

.map-container {
    border: 2px solid var(--text-gold);
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-darker);
}

#santa-map {
    width: 100%;
    height: 500px;
    min-height: 300px;
}

.santa-marker {
    background: transparent !important;
    border: none !important;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    background: var(--bg-dark);
    color: var(--text-gold);
    border: 1px solid var(--text-gold);
    border-radius: 5px;
}

.leaflet-popup-tip {
    background: var(--bg-dark);
    border: 1px solid var(--text-gold);
}

.leaflet-popup-close-button {
    color: var(--text-gold);
}

.leaflet-popup-close-button:hover {
    color: var(--text-white);
}

.carol-link {
    display: inline-block;
    padding: 15px 30px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid var(--text-gold);
    border-radius: 8px;
    color: var(--text-gold);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.carol-link:hover {
    background: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.carol-card {
    display: block;
    padding: 20px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--text-gold);
    border-radius: 10px;
    color: var(--text-gold);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.carol-card:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
    border-color: var(--text-gold);
}

.carol-card h4 {
    color: var(--text-gold);
    margin: 0;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .santa-tracker-container {
        grid-template-columns: 1fr;
    }
    
    #santa-map {
        height: 300px;
    }
}

.prize-clues-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .prize-clues-container {
        grid-template-columns: 1fr;
    }
}

/* Password Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-dark);
    border: 2px solid var(--text-gold);
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h3 {
    color: var(--text-gold);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
}

.modal-content p {
    color: var(--text-silver);
    margin-bottom: 25px;
    text-align: center;
}

.password-input {
    width: 100%;
    padding: 15px;
    background: var(--bg-darker);
    border: 2px solid var(--frost-border);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1.1em;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.password-input:focus {
    outline: none;
    border-color: var(--text-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: 2px solid var(--text-gold);
    border-radius: 8px;
    background: transparent;
    color: var(--text-gold);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--text-gold);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.btn:active {
    transform: scale(0.98);
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.message.error {
    background: rgba(139, 0, 0, 0.3);
    color: #ff6b6b;
    border: 1px solid #8b0000;
}

.message.success {
    background: rgba(13, 93, 13, 0.3);
    color: #4ade80;
    border: 1px solid var(--accent-green);
}

/* Clue Page Styles */
.clue-content {
    margin: 30px 0;
}

.clue-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--frost-border);
}

.clue-content video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--frost-border);
}

.clue-content p {
    line-height: 1.8;
    margin: 15px 0;
}

.back-button {
    margin: 30px 0;
    text-align: center;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-silver);
    font-style: italic;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .frosted-glass {
        padding: 20px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

