/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --hover-color: #2980b9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

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

/* Header */
header {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(46, 204, 113, 0.9));
    backdrop-filter: blur(10px);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
}

/* Songs grid */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.song-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: block;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.song-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.song-card .artist {
    color: #666;
    font-size: 1rem;
}

/* Song page styles */
.song-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.song-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.song-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.song-header .artist {
    font-size: 1.3rem;
    color: #666;
}

.youtube-container {
    margin: 2rem 0;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    background: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    color: #856404;
    font-size: 0.9rem;
}

.song-lyrics {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
    line-height: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.song-lyrics h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.verse, .chorus {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.verse p, .chorus p {
    margin-bottom: 0.5rem;
}

.chorus {
    font-weight: 600;
    color: var(--primary-color);
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.back-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    margin: 1rem 0;
    transition: background 0.3s ease;
    font-weight: 500;
}

.back-button:hover {
    background: var(--hover-color);
}

/* Footer */
footer {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

footer p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Lyrics synchronization styles */
.word {
    display: inline-block;
    margin: 0 0.2em;
    padding: 0.1em 0.2em;
    transition: all 0.3s ease;
    border-radius: 4px;
    cursor: default;
}

.word-active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
    padding: 0.2em 0.4em;
}

.word-past {
    color: #999;
    opacity: 0.6;
}

.word:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* YouTube player container for IFrame API */
#youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* YouTube API создает iframe внутри #youtube-player */
#youtube-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video clips section */
.video-clips {
    margin: 3rem 0 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-clips h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.clips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clip-link {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: #f0f0f0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.clip-link:hover {
    background: #e0e0e0;
    transform: translateX(5px);
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .songs-grid {
        grid-template-columns: 1fr;
    }

    .song-header h1 {
        font-size: 2rem;
    }

    .song-lyrics {
        padding: 1.5rem;
        font-size: 1rem;
    }

    .verse, .chorus {
        font-size: 1rem;
    }

    .word {
        margin: 0 0.1em;
        padding: 0.05em 0.1em;
    }

    .word-active {
        transform: scale(1.05);
        padding: 0.15em 0.3em;
    }

    .video-clips {
        padding: 1rem;
    }

    .video-clips h3 {
        font-size: 1.1rem;
    }
}

