/* ===================== */
/* 🌐 GLOBAL             */
/* ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --accent-color: #1db954;
    --bg-dark: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text-muted: rgba(255, 255, 255, 0.5);
}

body {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: white;
    min-height: 100vh;
    transition: background 1s ease;
}

/* ===================== */
/* 🧱 LAYOUT             */
/* ===================== */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===================== */
/* LEFT PANEL            */
/* ===================== */
.left-panel {
    width: 320px;
    min-width: 280px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ===================== */
/* RIGHT PANEL           */
/* ===================== */
.right-panel {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

/* ===================== */
/* 🎧 TITLE              */
/* ===================== */
h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    transition: color 0.5s ease;
}

.subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}

/* ===================== */
/* 📦 SECTION            */
/* ===================== */
.section {
    margin-bottom: 18px;
}

.section h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

/* ===================== */
/* 🔽 DROPDOWN           */
/* ===================== */
.dropdown {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border 0.3s;
}

.dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
}

.dropdown option {
    background: #0f172a;
    color: white;
}

/* ===================== */
/* 📝 TEXTAREA           */
/* ===================== */
textarea {
    width: 100%;
    height: 90px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    resize: none;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.88rem;
    transition: border 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea::placeholder {
    color: var(--text-muted);
}

/* ===================== */
/* 🔢 CHAR COUNTER       */
/* ===================== */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================== */
/* 💡 HINT               */
/* ===================== */
.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ===================== */
/* 🎯 MOOD BUTTONS       */
/* ===================== */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mood-btn {
    padding: 7px 13px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.mood-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.mood-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

/* ===================== */
/* 🚀 ANALYZE BUTTON     */
/* ===================== */
.analyze-btn {
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: none;
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

.analyze-btn:hover {
    background: #17a845;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.5);
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===================== */
/* 🗑️ CLEAR BUTTON       */
/* ===================== */
.clear-btn {
    width: 100%;
    padding: 10px;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* ===================== */
/* 🎬 PLAYER CONTAINER   */
/* ===================== */
.player-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

/* ===================== */
/* 🎵 PLACEHOLDER        */
/* ===================== */
.player-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ===================== */
/* 🎥 VIDEO              */
/* ===================== */
.video-player iframe {
    width: 100%;
    height: 280px;
    display: block;
}

/* ===================== */
/* 🎵 NOW PLAYING        */
/* ===================== */
.now-playing {
    padding: 10px 15px;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border);
    min-height: 38px;
}

/* ===================== */
/* 🎛 CONTROLS           */
/* ===================== */
.player-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.player-controls button {
    background: var(--accent-color);
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-controls button:hover {
    background: #17a845;
    transform: scale(1.05);
}

/* ===================== */
/* ▶ YOUTUBE LINK        */
/* ===================== */
.yt-link {
    display: block;
    text-align: center;
    padding: 8px;
    background: #ff0000;
    color: white;
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.2s;
}

.yt-link:hover {
    background: #cc0000;
}

/* ===================== */
/* 🔄 REFRESH            */
/* ===================== */
.refresh-float {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.refresh-float:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ===================== */
/* 🤖 MOOD BOX           */
/* ===================== */
.mood-box {
    padding: 15px 18px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ===================== */
/* 🎵 SONG COUNT         */
/* ===================== */
.song-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 4px;
}

/* ===================== */
/* 🎵 SONG CARD          */
/* ===================== */
.song-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fadeSlideIn 0.4s ease forwards;
    opacity: 0;
}

.song-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    border-color: var(--accent-color);
}

.song-card.active {
    background: rgba(29, 185, 84, 0.2);
    border-color: var(--accent-color);
}

/* ===================== */
/* 🎵 SONG THUMBNAIL     */
/* ===================== */
.song-card img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #333;
}

/* ===================== */
/* 🎵 SONG INFO          */
/* ===================== */
.song-info {
    flex: 1;
    overflow: hidden;
}

.song-info h4 {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.song-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info .duration {
    font-size: 0.72rem;
    color: var(--accent-color);
    margin-top: 3px;
}

/* ===================== */
/* ▶ PLAY ICON           */
/* ===================== */
.play-icon {
    font-size: 1.2rem;
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.song-card:hover .play-icon {
    opacity: 1;
}

/* ===================== */
/* ⏳ LOADER             */
/* ===================== */
.loader {
    text-align: center;
    padding: 40px 20px;
}

.loader p {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===================== */
/* 🌀 SPINNER            */
/* ===================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* ===================== */
/* 🎞 ANIMATIONS         */
/* ===================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ===================== */
/* 📜 SCROLLBAR          */
/* ===================== */
::-webkit-scrollbar {
    width: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===================== */
/* 📱 MOBILE RESPONSIVE  */
/* ===================== */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .left-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .right-panel {
        padding: 15px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .video-player iframe {
        height: 200px;
    }

    .player-placeholder {
        height: 160px;
    }
}

/* ===================== */
/* 🙈 HIDDEN             */
/* ===================== */
.hidden {
    display: none !important;
}