/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #FAFAFA;
    --text-color: #1A1A1A;
    --accent-color: #E8B44F;
    --light-gray: #666;
    --border-color: #E0E0E0;
    --warm-yellow: #F4D03F;
    --soft-blue: #A8C5DD;
}

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Crimson+Text:wght@400;600;700&display=swap');

body {
    font-family: 'Crimson Text', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 19px;
}

/* Password Screen */
.password-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #FFFFFF;
}

.password-box {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.password-box h1 {
    font-family: 'Caveat', cursive;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-color);
    letter-spacing: 0.5px;
    position: relative;
}

.password-box h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.password-form input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.error-message {
    color: #D32F2F;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

/* Letter Container */
.letter-container {
    min-height: 100vh;
    padding: 40px 20px;
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.letter {
    max-width: 650px;
    margin: 0 auto;
    background-color: #FFFFFF;
    padding: 60px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Letter Text Styles */
.letter-greeting {
    font-size: 20px;
    margin-bottom: 60px;
    font-weight: 500;
}

.chapter {
    margin-bottom: 80px;
}

.chapter-title {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.chapter-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.chapter-subtitle {
    font-size: 14px;
    color: var(--light-gray);
    margin-bottom: 30px;
    font-style: italic;
}

.chapter-note {
    font-size: 16px;
    color: var(--light-gray);
    font-style: italic;
    margin-bottom: 20px;
}

.chapter p {
    margin-bottom: 24px;
    text-align: justify;
}

.quote {
    font-style: italic;
    font-size: 20px;
    margin: 40px 0;
    padding: 20px 20px 20px 24px;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(to right, rgba(232, 180, 79, 0.08) 0%, rgba(232, 180, 79, 0) 100%);
    line-height: 1.6;
    position: relative;
}

.closing {
    margin-top: 60px;
    margin-bottom: 40px;
    font-size: 18px;
}

/* Playlist Section */
.playlist-section {
    margin-top: 80px;
    padding-top: 40px;
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--warm-yellow));
    margin: 0 auto 40px;
    border-radius: 2px;
}

.playlist-intro {
    text-align: center;
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 30px;
    font-weight: 500;
}

.playlist-link {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    font-weight: 600;
}

.playlist-link:hover {
    color: var(--warm-yellow);
    border-bottom-color: var(--warm-yellow);
}

.playlist {
    list-style: none;
    counter-reset: playlist-counter;
    margin-bottom: 40px;
}

.playlist li {
    counter-increment: playlist-counter;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
}

.playlist li:before {
    content: counter(playlist-counter) ". ";
    color: var(--light-gray);
    font-weight: 500;
    margin-right: 8px;
}

.playlist li:last-child {
    border-bottom: none;
}

.artist {
    color: var(--light-gray);
    font-size: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }

    .letter {
        padding: 40px 24px;
    }

    .password-box h1 {
        font-size: 30px;
        letter-spacing: 1px;
        line-height: 1.3;
    }

    .chapter-title {
        font-size: 26px;
        letter-spacing: 0.5px;
        line-height: 1.3;
    }

    .quote {
        font-size: 18px;
        padding: 16px 16px 16px 20px;
    }

    .letter-container {
        padding: 20px 12px;
    }

    .playlist-title {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 17px;
    }

    .letter {
        padding: 30px 20px;
        box-shadow: none;
    }

    .letter-greeting {
        font-size: 18px;
        margin-bottom: 40px;
    }

    .chapter {
        margin-bottom: 60px;
    }

    .chapter-title {
        font-size: 24px;
        letter-spacing: 1px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .chapter p {
        text-align: left;
        margin-bottom: 20px;
    }

    .playlist-section {
        margin-top: 60px;
    }

    .playlist-title {
        font-size: 23px;
    }

    .password-box h1 {
        font-size: 28px;
        letter-spacing: 1.5px;
        line-height: 1.4;
    }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
    body {
        font-size: 20px;
    }

    .letter {
        padding: 80px 60px;
    }

    .chapter-title {
        font-size: 36px;
    }

    .quote {
        font-size: 22px;
    }

    .password-box h1 {
        font-size: 40px;
    }

    .playlist-title {
        font-size: 30px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--accent-color);
    color: white;
}

::-moz-selection {
    background-color: var(--accent-color);
    color: white;
}
