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

:root {
    --dark-bg: #0a0e27;
    --darker-bg: #050810;
    --card-bg: #13192b;
    --accent: #d4af37;
    --accent-light: #e8c547;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --border: #1e2747;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'EB Garamond', serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(13, 18, 43, 0.9) 0%, rgba(5, 8, 16, 0.95) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="dots" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(212,175,55,0.05)"/></pattern></defs><rect width="1200" height="600" fill="url(%23dots)"/></svg>');
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

.hero-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-artist {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 1px;
}

.admin-link {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.6;
    z-index: 10;
}

.admin-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Poems Grid */
.poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

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

/* Poem Card */
.poem-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.poem-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15),
                0 0 20px rgba(212, 175, 55, 0.05);
    transform: translateY(-4px);
}

.poem-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.poem-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.poem-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poem-cover.placeholder {
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.5;
}

.placeholder-icon {
    animation: float 3s ease-in-out infinite;
}

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

.poem-info {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.poem-title {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.poem-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

.play-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #000;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.play-button svg {
    width: 20px;
    height: 20px;
}

/* Player Modal */
.player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 16, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
}

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

.player-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--accent);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.player-close:hover {
    color: var(--accent-light);
    transform: rotate(90deg);
}

.player-header {
    margin-bottom: 2rem;
    padding-right: 2rem;
}

.player-title {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.player-subtitle {
    font-size: 1rem;
    color: var(--accent);
    font-style: italic;
}

.player-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Waveform */
.waveform-container {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

#waveform {
    margin-bottom: 1rem;
}

#waveform wave {
    wave-color: var(--accent);
    progress-color: var(--accent-light);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

/* Player Controls */
.player-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

/* Lyrics */
.lyrics-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
}

#lyrics-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.lyric-line {
    transition: var(--transition);
    cursor: pointer;
    padding: 0.25rem 0;
}

.lyric-line.current {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.lyric-line.past {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .poems-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero {
        height: 50vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .player-modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .player-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .poems-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .player-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .player-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-btn {
        width: 100%;
        border-radius: 8px;
    }
}
