@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6366f1;
    /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.4);
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 20%);
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* Grid */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card */
.song-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.song-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.song-meta {
    margin-bottom: 1rem;
}

.song-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.song-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.audio-player {
    width: 100%;
    margin-top: 1rem;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

/* Webkit Audio Player Styling (Chrome/Safari) */
audio::-webkit-media-controls-panel {
    background-color: rgba(255, 255, 255, 0.1);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    filter: invert(1);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: #fff;
    text-shadow: none;
}

/* Voting actions */
.vote-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.score-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vote-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.vote-btn.up:hover {
    color: var(--success);
}

.vote-btn.down:hover {
    color: var(--danger);
}

.score {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 2ch;
    text-align: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #111;
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

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

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

    h1 {
        font-size: 2rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
/* Custom Audio Player */
.custom-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: 12px;
}

.play-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.player-controls {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #e11d48);
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
    font-family: monospace;
}
