/* Spotify-inspired Dark Theme */
:root {
    --spotify-green: #1db954;
    --spotify-black: #191414;
    --spotify-dark-gray: #121212;
    --spotify-gray: #282828;
    --spotify-light-gray: #b3b3b3;
    --spotify-white: #ffffff;
}

body {
    background-color: var(--spotify-dark-gray);
    color: var(--spotify-white);
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Dark Cards */
.card {
    background-color: var(--spotify-gray);
    border: none;
    border-radius: 8px;
}

.card-header {
    background-color: var(--spotify-black) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--spotify-white);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    color: var(--spotify-white);
}

/* Navbar Dark */
.navbar {
    background-color: var(--spotify-black) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand, .nav-link {
    color: var(--spotify-white) !important;
}

.nav-link:hover {
    color: var(--spotify-green) !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--spotify-green);
}

/* Spotify Green Accents */
.bg-spotify {
    background-color: var(--spotify-green) !important;
}

.text-spotify {
    color: var(--spotify-green) !important;
}

.btn-spotify {
    background-color: var(--spotify-green);
    color: var(--spotify-white);
    border: none;
    border-radius: 500px;
    padding: 12px 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-spotify:hover {
    background-color: #1ed760;
    transform: scale(1.04);
    color: var(--spotify-white);
}

/* Form Controls Dark */
.form-control {
    background-color: var(--spotify-black);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--spotify-white);
}

.form-control:focus {
    background-color: var(--spotify-black);
    border-color: var(--spotify-green);
    color: var(--spotify-white);
    box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25);
}

.form-control::placeholder {
    color: var(--spotify-light-gray);
}

.form-control[readonly] {
    background-color: var(--spotify-gray);
    color: var(--spotify-white);
}

.input-group-text {
    background-color: var(--spotify-black);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--spotify-light-gray);
}

/* Tables Dark */
.table {
    color: var(--spotify-white);
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}

.table thead {
    border-color: rgba(255, 255, 255, 0.1);
}

.table tbody {
    border-color: rgba(255, 255, 255, 0.1);
}

.table td, .table th {
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--spotify-white);
}

.table-light {
    background-color: var(--spotify-black) !important;
    color: var(--spotify-white) !important;
}

.table-light th {
    background-color: var(--spotify-black);
    color: var(--spotify-light-gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Text Colors */
.text-muted {
    color: var(--spotify-light-gray) !important;
}

/* Alerts Dark */
.alert-info {
    background-color: rgba(29, 185, 84, 0.1);
    border-color: rgba(29, 185, 84, 0.2);
    color: var(--spotify-white);
}

.alert {
    border-radius: 8px;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 6px 12px;
}

/* Progress Bar */
.progress {
    background-color: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
}

.progress-bar {
    background-color: var(--spotify-green);
    transition: width 0.5s ease;
}

/* Spotify Player Card */
.spotify-player {
    background: linear-gradient(180deg, var(--spotify-gray) 0%, var(--spotify-black) 100%);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.album-art-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.album-art {
    width: 100%;
    height: auto;
    display: block;
}

.track-info {
    flex-grow: 1;
}

.track-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--spotify-white);
}

.track-artist {
    font-size: 1rem;
    color: var(--spotify-light-gray);
    margin-bottom: 16px;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.time-display {
    font-size: 0.75rem;
    color: var(--spotify-light-gray);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
}

.progress-container {
    flex-grow: 1;
    position: relative;
}

.progress-bar-custom {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar-custom:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background-color: var(--spotify-green);
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--spotify-white);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar-custom:hover .progress-fill::after {
    opacity: 1;
}

/* Playing Animation */
.playing-animation {
    display: inline-flex;
    align-items: flex-end;
    height: 16px;
    gap: 2px;
}

.playing-bar {
    width: 3px;
    background-color: var(--spotify-green);
    border-radius: 2px;
    animation: playing 0.8s ease-in-out infinite;
}

.playing-bar:nth-child(1) { animation-delay: 0s; }
.playing-bar:nth-child(2) { animation-delay: 0.2s; }
.playing-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes playing {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

/* Buttons Dark */
.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--spotify-white);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--spotify-white);
    color: var(--spotify-white);
}

/* Shadow effects */
.shadow-sm {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, var(--spotify-gray) 0%, var(--spotify-black) 100%);
    border-left: 4px solid var(--spotify-green);
}

/* Footer */
.footer {
    background-color: var(--spotify-black) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--spotify-black);
}

::-webkit-scrollbar-thumb {
    background: var(--spotify-gray);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3e3e3e;
}

/* Error Page */
.error-page {
    padding: 60px 0;
}

.error-page h1 {
    font-size: 120px;
    font-weight: bold;
    color: var(--spotify-green);
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    background-color: var(--spotify-gray);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--spotify-white);
}

.page-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--spotify-white);
}

.page-item.active .page-link {
    background-color: var(--spotify-green);
    border-color: var(--spotify-green);
    color: var(--spotify-white);
}

.page-item.disabled .page-link {
    background-color: var(--spotify-black);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--spotify-light-gray);
}

.card-footer {
    background-color: var(--spotify-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .error-page h1 {
        font-size: 80px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .track-title {
        font-size: 1.2rem;
    }
}
