:root {
    --bg-color: #0b0d17;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Dynamic background */
.background-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%);
    filter: blur(80px);
    z-index: -1;
    animation: pulse 10s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

h1 span {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

/* Result Area */
.result-area {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    border: 1px solid transparent;
}

.result-area.active {
    border-color: var(--accent-glow);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.placeholder-state {
    color: var(--text-secondary);
}

.placeholder-state .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Result Item Styles */
.song-card {
    animation: fadeIn 0.5s ease forwards;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.song-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    word-break: break-word;
}

.song-detail {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Button */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 1rem 2.5rem;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .glass-container {
        padding: 2rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Filter Group */
.filter-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.filter-group label {
    font-size: 1.1rem;
    font-weight: 600;
}

.dropdown {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown:focus {
    border-color: var(--accent);
}

.dropdown option {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Secondary Button */
.btn-secondary {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    z-index: 1;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.3);
}

/* Table Styles for List Page */
.glass-container.wide {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.table-container {
    width: 100%;
    overflow-y: auto;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    flex-grow: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
    position: sticky;
    top: 0;
    background: #111422;
    /* solid background for sticky header */
    z-index: 10;
}

th:hover {
    background: rgba(255, 255, 255, 0.08);
    /* slightly lighter on hover */
}

.sort-icon {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

tbody tr {
    transition: background 0.3s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}