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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #fff;
}

/* Search */

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    font-size: 1.1rem;
    border: 2px solid #333;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #7c3aed;
}

.search-box button {
    padding: 14px 28px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background: #7c3aed;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-box button:hover {
    background: #6d28d9;
}

.search-box button:disabled {
    background: #444;
    cursor: not-allowed;
}


/* Layout */

.content {
    display: flex;
    gap: 24px;
}

.results {
    flex: 1;
    min-width: 0;
}

.lyrics-panel {
    width: 380px;
    flex-shrink: 0;
}

/* Card */

.card {
    padding: 16px;
    margin-bottom: 12px;
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    transition: border-color 0.2s;
    cursor: pointer;
}

.card:hover {
    border-color: #444;
}

.card.selected {
    border-color: #7c3aed;
}

.card-head {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.card-head img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-channel {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 6px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yt-link {
    font-size: 0.78rem;
    color: #888;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #333;
    border-radius: 4px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.yt-link:hover {
    color: #fff;
    border-color: #666;
}

/* Verdict */

.verdict {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.verdict.good {
    background: #064e3b;
    color: #34d399;
}

.verdict.warn {
    background: #713f12;
    color: #fbbf24;
}

.verdict.bad {
    background: #7f1d1d;
    color: #f87171;
}

/* Status grid */

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.status-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.status-row {
    font-size: 0.82rem;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-row b {
    color: #ddd;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.good {
    background: #34d399;
}

.dot.warn {
    background: #fbbf24;
}

.dot.bad {
    background: #f87171;
}

/* Geo details */

.geo-toggle {
    margin-top: 10px;
    padding: 8px 0 0;
    border-top: 1px solid #2a2a2a;
    font-size: 0.78rem;
    color: #777;
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: color 0.2s;
}

.geo-toggle:hover {
    color: #bbb;
}

.geo-details {
    display: none;
    margin-top: 10px;
}

.geo-details.open {
    display: block;
}

.geo-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.geo-col-head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #2a2a2a;
}

.geo-col-head.bad {
    color: #f87171;
}

.geo-col-head.good {
    color: #34d399;
}

.geo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.geo-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: #252525;
    color: #999;
}

.geo-tag.ru {
    background: #7f1d1d;
    color: #f87171;
    font-weight: 700;
}

/* Lyrics */

.lyrics-box {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 18px;
    max-height: 70vh;
    overflow-y: auto;
    position: sticky;
    top: 24px;
}

.lyrics-box h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #aaa;
}

.lyrics-text {
    white-space: pre-wrap;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #ccc;
}

.lyrics-placeholder {
    color: #555;
    font-style: italic;
    font-size: 0.9rem;
}

/* Misc */

.spinner {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1rem;
}

.error-msg {
    text-align: center;
    padding: 20px;
    color: #f87171;
}

.empty-msg {
    text-align: center;
    padding: 40px;
    color: #555;
}

@media (max-width: 800px) {
    .content {
        flex-direction: column;
    }

    .lyrics-panel {
        width: 100%;
    }

    .lyrics-box {
        position: static;
        max-height: 50vh;
    }

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