/* ============================================
   RESET & BASE STYLES
   The * selector targets every element on the page.
   box-sizing: border-box makes width/height include padding and border.
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Single Day', sans-serif;
    background-color: #b5ceb5;
    color: #7d7d7d;
    min-height: 100vh;
}

/* ============================================
   BACKGROUND EFFECT
   Creates a subtle green glow behind the page.
   "position: fixed" means it stays in place when you scroll.
   "pointer-events: none" means you can click through it.
   ============================================ */
.bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(29, 185, 84, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================
   LAYOUT CONTAINER
   max-width stops it from getting too wide on big screens.
   margin: 0 auto centers it horizontally.
   ============================================ */
.container {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px 40px;
}

/* ============================================
   HEADER / HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-family: 'Single Day', serif;
    font-size: 3em;
    font-weight: 700;
    color: #25a35e;
    margin-bottom: 8px;
}

.hero-subtitle {
    color: #779247;
    font-size: 1.05em;
}

/* ============================================
   SEARCH BAR
   "display: flex" puts the input and button side by side.
   Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout
   ============================================ */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    padding: 16px 22px;
    font-size: 1em;
    font-family: 'Single Day', sans-serif;
    border: 1.5px solid #2a2a3d;
    border-radius: 50px;
    background: #a2c9b0;
    color: #0b0b0b;
    outline: none;
}

.search-input:focus {
    border-color: #1DB954;
}

.search-input::placeholder {
    color: #8484ab;
}

.search-btn {
    padding: 16px 32px;
    font-size: 1em;
    font-family: 'Single Day', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    background: #1DB954;
    color: #fff;
    cursor: pointer;
}

.search-btn:hover {
    background: #1ed760;
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint {
    text-align: center;
    color: #555568;
    font-size: 0.85em;
    margin-bottom: 50px;
}

/* ============================================
   RESULTS HEADER
   ============================================ */
.results-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a3d;
}

.results-header h2 {
    font-weight: 500;
    font-size: 1em;
    color: #8888a0;
}

.results-header span {
    color: #1DB954;
    font-weight: 700;
}

/* ============================================
   SONG CARDS
   Each search result is a "card."
   ============================================ */
.song-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px;
    margin-bottom: 10px;
    background: #b9b9d2;
    border: 1px solid transparent;
    border-radius: 12px;
}

.song-card:hover {
    background: #f4f3ba;
    border-color: #e1e1e1;
}

/* Album art image */
.album-art {
    width: 72px;
    height: 72px;
    border-radius: 8px;
}

/* Placeholder when no album art is available */
.no-art {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
}

/* Song info section */
.song-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-weight: 700;
    font-size: 1.05em;
    margin-bottom: 2px;
}

.artist-name {
    color: #8888a0;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* The matching lyric line */
.matching-lyric {
    background: rgba(43, 43, 43, 0.15);
    border-left: 3px solid #2e2e2e;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    font-size: 0.92em;
    color: #2e2e2e;
}

.timestamp {
    color: #2e2e2e;
    font-style: normal;
    font-size: 0.82em;
    font-weight: 600;
}

/* Links row (Apple Music link + audio preview) */
.links-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.music-link {
    color: #2e2e2e;
    text-decoration: none;
    font-size: 0.82em;
    font-weight: 500;
}

.music-link:hover {
    text-decoration: underline;
}

/* Audio preview player */
.preview-player {
    height: 28px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #8888a0;
}

/* No results state */
.no-results {
    text-align: center;
    padding: 60px 0;
    color: #8888a0;
}

.no-results .emoji {
    font-size: 2.5em;
    margin-bottom: 12px;
}