/* Mobile-First Responsive Design */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding-bottom: 150px; /* INCREASED: Space for fixed player + footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   FOOTER STYLES - FIXED
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    margin-top: auto;
    padding-bottom: 90px; /* Space for music player */
}

.site-footer h5,
.site-footer h6 {
    font-weight: 600;
}

.site-footer a {
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.social-links a {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
}

.site-footer hr {
    opacity: 0.3;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

@media (max-width: 768px) {
    .site-footer {
        padding-bottom: 90px;
    }
    
    body {
        padding-bottom: 150px;
    }
}

/* ============================================
   WELCOME CARD
   ============================================ */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.welcome-card .card-body {
    position: relative;
    z-index: 1;
}

.welcome-card h2 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .welcome-card h2 {
        font-size: 1.3rem;
    }
    
    .welcome-card p {
        font-size: 0.9rem;
    }
    
    .welcome-card .card-body {
        padding: 1.5rem !important;
    }
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
.navbar-brand {
    font-size: 1.2rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 2px 0;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar form.d-flex {
    width: 100%;
}

@media (min-width: 992px) {
    .navbar form.d-flex {
        width: auto;
    }
}

/* ============================================
   CARD STYLES
   ============================================ */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SONG CARD
   ============================================ */
.song-card {
    margin-bottom: 15px;
}

.song-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

@media (min-width: 768px) {
    .song-card .card-img-top {
        height: 250px;
    }
}

.song-card .card-body {
    padding: 15px;
}

.song-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-card .card-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.song-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.song-actions .btn {
    flex: 1;
    min-width: 45px;
    padding: 8px;
    font-size: 0.9rem;
}

/* ============================================
   MUSIC PLAYER - FIXED
   ============================================ */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    color: white;
    padding: 10px 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1050; /* Higher than footer */
    display: none;
}

.music-player.active {
    display: block;
}

.player-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.player-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 10px;
    object-fit: cover;
}

.player-details {
    flex: 1;
    overflow: hidden;
}

.player-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-artist {
    font-size: 0.75rem;
    color: #aaa;
    margin: 0;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.player-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.player-controls button:hover {
    transform: scale(1.1);
}

.player-controls .btn-play {
    font-size: 2rem;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}

.player-progress input[type="range"] {
    flex: 1;
    height: 5px;
    background: #444;
    outline: none;
    border-radius: 5px;
    -webkit-appearance: none;
}

.player-progress input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.player-progress input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* ============================================
   PLAYLIST & MODALS
   ============================================ */
.playlist-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.playlist-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-item:hover {
    background: #f8f9fa;
}

/* ============================================
   LIKE BUTTON
   ============================================ */
.btn-like.liked,
.like-btn.liked {
    color: #dc3545 !important;
    background-color: #fff !important;
    border-color: #dc3545 !important;
}

.like-btn.liked i {
    color: #dc3545 !important;
}

/* ============================================
   MOVIE CARD
   ============================================ */
.movie-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-10px);
}

.movie-card .card-img-top {
    height: 280px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .movie-card .card-img-top {
        height: 220px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 2rem;
    margin: 0;
}

.stat-card p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
.btn, .nav-link, .card {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

/* ============================================
   SCROLLING & ANIMATIONS
   ============================================ */
html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ============================================
   FORM IMPROVEMENTS
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    transition: all 0.3s ease;
}

.btn:active {
    transform: scale(0.95);
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
}