/* CSS Variables */
:root {
    --color-primary: #1a365d;
    --color-primary-light: #2c5282;
    --color-accent: #d4af37;
    --color-accent-light: #e9c85d;
    --color-background: #fefcf8;
    --color-card: #ffffff;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-border: #e2e8f0;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --max-width: 600px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 54, 93, 0.05) 0%, transparent 50%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Preview Banner */
.preview-banner {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: var(--color-primary);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.preview-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.preview-date {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.preview-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.preview-btn {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

.preview-btn.disabled {
    background: rgba(26, 54, 93, 0.3);
    cursor: not-allowed;
}

.preview-day-indicator {
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0;
}

.title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-accent);
    margin: 0.5rem 0 0;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Section Title */
.section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    margin: 0 0 1rem;
}

/* Hint Cards */
.hint-card {
    background: var(--color-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hint-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-inner {
    padding: 1.5rem;
}

.hint-text {
    font-size: 1.125rem;
    line-height: 1.7;
}

.hint-text p {
    margin: 0 0 1rem;
}

.hint-text p:last-child {
    margin-bottom: 0;
}

.hint-emphasis {
    font-style: italic;
    color: var(--color-text-light);
}

/* Coming Soon Card */
.coming-soon {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
}

.coming-soon h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin: 0 0 1rem;
}

.coming-soon p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.coming-soon .check-back {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Riddles */
.riddle {
    background: linear-gradient(135deg, #f7f7f7 0%, #fefefe 100%);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1rem 0;
    border-left: 4px solid var(--color-accent);
}

.riddle-question {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.6;
}

.riddle-answer {
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.riddle-answer:hover {
    background: var(--color-primary-light);
}

.riddle-answer .answer-text {
    display: none;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.riddle-answer.revealed .answer-prompt {
    display: none;
}

.riddle-answer.revealed .answer-text {
    display: block;
}

/* Rebus Puzzles */
.rebus-puzzle {
    text-align: center;
    padding: 1rem 0;
}

.rebus-symbols {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rebus-item {
    font-size: 3rem;
    line-height: 1;
}

.rebus-hint {
    font-style: italic;
    color: var(--color-text-light);
    margin: 0;
}

.rebus-puzzle.small .rebus-item {
    font-size: 2rem;
}

/* Image Hints */
.hint-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.image-hint.small .hint-image {
    max-height: 200px;
    object-fit: cover;
}

/* Reveal Card (Final Day) */
.reveal-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2c5282 50%, var(--color-primary) 100%);
    color: white;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.reveal-card .card-inner {
    padding: 2rem 1.5rem;
}

.reveal-content h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    text-align: center;
    margin: 0 0 1.5rem;
    color: var(--color-accent);
}

.reveal-destination {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Packing instructions (standalone) */
.packing-instructions {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0 0;
}

.packing-instructions h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    color: var(--color-accent-light);
}

.packing-instructions ul {
    margin: 0;
    padding-left: 1.25rem;
}

.packing-instructions li {
    margin: 0.5rem 0;
}

.reveal-content .itinerary,
.reveal-content .excursions {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.reveal-content .excursions {
    background: rgba(212, 175, 55, 0.15);
}

.reveal-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    color: var(--color-accent-light);
}

.reveal-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.reveal-content li {
    margin: 0.5rem 0;
}

.departure-notice {
    font-size: 1.25rem;
    text-align: center;
    margin: 1.5rem 0 0;
    font-weight: 600;
    color: var(--color-accent);
}

/* Past Hints Section */
.past-hints {
    margin-top: 2rem;
}

.past-hints-toggle {
    width: 100%;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.past-hints-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.past-hints-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.past-hints-container {
    display: none;
    margin-top: 1rem;
}

.past-hints-container.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.past-hint-card {
    opacity: 0.85;
    transform: scale(0.98);
}

.past-hint-title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-primary);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.past-hint-card .hint-text {
    font-size: 1rem;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

.music-player:hover {
    transform: scale(1.1);
    background: var(--color-primary-light);
}

.music-player.playing {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 54, 93, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(26, 54, 93, 0); }
}

.music-icon {
    font-size: 1.5rem;
    color: white;
}

.music-player.playing .music-icon {
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (min-width: 640px) {
    .container {
        padding: 2rem;
    }

    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .card-inner {
        padding: 2rem;
    }

    .rebus-item {
        font-size: 4rem;
    }

    .rebus-puzzle.small .rebus-item {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --max-width: 700px;
    }

    .title {
        font-size: 3.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
button:focus-visible,
.riddle-answer:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .music-player,
    .past-hints-toggle {
        display: none;
    }
}
