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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #fff;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.back-btn, .logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-btn:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Login Page */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.3);
}

.login-card h2 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

.login-card p {
    margin-bottom: 30px;
    color: #b8b8d1;
    line-height: 1.6;
}

.spotify-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
}

.spotify-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Dashboard */
.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.year-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.year-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.3);
}

.year-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.year-card .song-count {
    color: #b8b8d1;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.year-card .edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.year-card .edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.add-year-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #b8b8d1;
    font-size: 1.2rem;
}

.add-year-card:hover {
    border-color: rgba(102, 126, 234, 0.5);
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Edit Page */
.edit-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "left-column right-column";
    gap: 20px;
    margin-top: 30px;
}

.left-column {
    grid-area: left-column;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-column {
    grid-area: right-column;
}

.search-section, .current-list-section, .top-tracks-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-section h2, .current-list-section h2, .top-tracks-section h2 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #b8b8d1;
}

#search-input:focus {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

#search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.search-results, .current-songs {
    max-height: 500px;
    overflow-y: auto;
}

/* Top Tracks Section */
.time-range-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.time-range-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #b8b8d1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.time-range-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.time-range-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.top-tracks-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.top-track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.top-track-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(102, 126, 234, 0.3);
}

.top-track-rank {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.top-track-item img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    flex-shrink: 0;
}

.top-track-info {
    flex: 1;
    min-width: 0;
}

.top-track-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.top-track-artist {
    color: #b8b8d1;
    font-size: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.top-track-album {
    color: #8888a8;
    font-size: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.play-frequency {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frequency-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #667eea;
    white-space: nowrap;
    min-width: 60px;
}

.play-bar {
    max-width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.play-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.top-track-add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 70px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.top-track-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.top-track-add-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
}

.year-filter-note {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    text-align: center;
}

.year-filter-note small {
    color: #667eea;
    font-weight: 500;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(4px);
}

.song-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.song-info {
    flex: 1;
}

.song-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.song-artist {
    color: #b8b8d1;
    font-size: 0.9rem;
}

.song-album {
    color: #8888a8;
    font-size: 0.8rem;
}

.release-year {
    color: #667eea;
    font-weight: bold;
    font-size: 0.9rem;
}

.add-btn, .remove-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.add-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
}

.remove-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.remove-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.5);
}

.full-play-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.full-play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.25);
}

.position-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    color: #b8b8d1;
    font-style: italic;
    padding: 40px;
}

.empty-state {
    text-align: center;
    color: #b8b8d1;
    padding: 40px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #fff;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* Utility Classes for Mobile/Desktop Toggle */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    /* ========== FOUNDATION ========== */
    /* Spacing & Layout */
    .container {
        padding: 12px;
    }

    /* Typography Scale */
    .header-content h1 {
        font-size: 1.75rem; /* 28px - reduced from 2rem */
    }

    h2 {
        font-size: 1.5rem; /* 24px */
    }

    h3 {
        font-size: 1.25rem; /* 20px */
    }

    /* ========== HEADER & NAVIGATION ========== */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Touch-friendly header buttons (44x44px minimum) */
    .back-btn, .logout-btn {
        min-height: 44px;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* ========== BUTTONS & TOUCH TARGETS ========== */
    /* All buttons meet 44x44px touch target */
    button, .btn-primary, .btn-secondary, .add-btn, .remove-btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .full-play-btn {
        min-height: 44px;
        min-width: 120px;
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    /* Search button full-width */
    #search-btn {
        width: 100%;
        min-height: 48px;
        font-size: 1.05rem;
    }

    /* ========== LAYOUT SECTIONS ========== */
    .edit-section {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left-column"
            "right-column";
        gap: 16px;
    }

    .years-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 0 12px;
    }

    /* ========== HERO SECTION ========== */
    .top-songs-hero {
        padding: 16px;
        margin-bottom: 20px;
    }

    .hero-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .hero-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    /* Full-width stacked buttons for better thumb access */
    .play-playlist-btn, .export-playlist-btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        font-size: 1rem;
        padding: 14px 24px;
    }

    /* ========== DISCOVERY TABS ========== */
    .time-range-selector {
        flex-wrap: wrap;
        gap: 8px;
    }

    .time-range-btn {
        min-height: 44px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* Discovery tabs with better touch targets */
    .discovery-tabs {
        flex-direction: row;
    }

    .tab-btn {
        flex: 1;
        min-height: 48px;
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .tab-content {
        padding: 16px;
        max-height: 400px;
    }

    /* ========== TOP TRACKS LIST (MOST PLAYED) ========== */
    /* Simplified flex layout matching Top Songs structure */
    .top-track-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        min-height: 80px;
    }

    /* Hide rank badge on mobile to save space */
    .top-track-rank {
        display: none;
    }

    /* Larger thumbnails matching Top Songs */
    .top-track-item img {
        width: 72px;
        height: 72px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .top-track-info {
        flex: 1;
        min-width: 0;
        margin-right: 8px;
    }

    .top-track-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.3;
    }

    .top-track-artist {
        font-size: 0.9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 2px;
        line-height: 1.3;
    }

    .top-track-album {
        font-size: 0.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.3;
    }

    /* Hide play frequency on mobile to save space */
    .play-frequency {
        display: none;
    }

    /* Compact Play button */
    .top-track-item .full-play-btn {
        min-height: 36px;
        min-width: 54px;
        padding: 8px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Compact Add button */
    .top-track-add-btn {
        min-height: 36px;
        min-width: 50px;
        padding: 8px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ========== SONG ITEMS (TOP SONGS LIST) ========== */
    .song-item {
        display: grid !important; /* Force grid layout to override default flex */
        grid-template-columns: auto 72px 1fr auto;
        grid-template-rows: auto auto;
        gap: 8px;
        align-items: start;
        padding: 10px 12px;
        text-align: left;
        min-height: 80px;
    }

    /* Show drag handle as visual indicator for reordering */
    .song-item .drag-handle {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 1.2rem;
        color: #999;
        padding: 0 4px;
    }

    /* Position album cover */
    .song-item img,
    .song-item .album-cover-placeholder {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        width: 72px;
        height: 72px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    /* Position song info */
    .song-item .song-info {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
        min-width: 0;
        margin-right: 8px;
    }

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

    .song-artist {
        font-size: 0.9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 2px;
        line-height: 1.3;
    }

    .song-album {
        font-size: 0.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.3;
    }

    /* Stack buttons vertically in the fourth column */
    .song-item .full-play-btn {
        grid-column: 4;
        grid-row: 1;
        min-height: 32px;
        min-width: 54px;
        padding: 6px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .song-item .remove-btn {
        grid-column: 4;
        grid-row: 2;
        min-height: 32px;
        min-width: 54px;
        padding: 6px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Hide position number on mobile to save space */
    .position-number {
        display: none;
    }

    /* Mobile reorder buttons - hidden (use long press drag instead) */
    .mobile-reorder-buttons {
        display: none !important;
    }

    /* ========== SEARCH ========== */
    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    #search-input {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 14px 18px;
    }

    /* ========== GROUPS PAGE ========== */
    /* Full-width cards on mobile */
    .groups-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .group-card {
        padding: 20px;
    }

    .group-header h3 {
        font-size: 1.3rem;
    }

    /* Touch-friendly invite button */
    .invite-code-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Create group button */
    .create-group-btn, .groups-btn {
        min-height: 48px;
        padding: 14px 24px;
        width: auto;
    }

    /* Group detail page */
    .group-info-section {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .group-details {
        min-width: auto;
    }

    .group-meta {
        flex-direction: column;
        gap: 12px;
    }

    .group-actions-header {
        width: 100%;
    }

    .group-actions-header .export-playlist-btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    /* View mode tabs */
    .view-mode-tabs {
        flex-direction: row;
        padding: 6px;
        gap: 6px;
    }

    .view-mode-tabs .tab-btn {
        flex: 1;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .group-songs-container {
        padding: 16px;
    }

    /* Person header in group view */
    .person-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .play-person-list {
        width: 100%;
        min-height: 44px;
    }

    /* Copy button touch target */
    .copy-mini-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    /* ========== MODALS ========== */
    /* Full-screen modals on mobile */
    .modal {
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px 20px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    /* Touch-friendly close button */
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.75rem;
    }

    .modal-body {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        min-height: 48px;
        font-size: 1rem;
        padding: 14px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .form-actions button {
        width: 100%;
        min-height: 48px;
    }

    /* ========== YEAR CARDS (DASHBOARD) ========== */
    .year-card {
        padding: 20px;
    }

    .year-card h3 {
        font-size: 1.75rem;
    }

    .year-card .song-count {
        font-size: 1rem;
    }

    .year-card .edit-btn {
        width: 100%;
        min-height: 48px;
        padding: 14px 24px;
        text-align: center;
    }

    /* ========== USER INFO ========== */
    .user-info {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
}

/* Audio Controls Styles */
.audio-controls {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-label {
    font-size: 11px;
    font-weight: 600;
    color: #b8b8d1;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.audio-preview {
    margin-bottom: 8px;
}

.track-preview {
    width: 100%;
    max-width: 280px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    outline: none;
}

.track-preview::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.track-preview::-webkit-media-controls-play-button,
.track-preview::-webkit-media-controls-pause-button {
    background-color: #667eea;
    border-radius: 50%;
}

.track-preview::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.track-preview::-webkit-media-controls-current-time-display,
.track-preview::-webkit-media-controls-time-remaining-display {
    font-size: 11px;
    color: #b8b8d1;
}

.full-playback {
    margin-top: 8px;
}

.full-play-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.full-play-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.full-play-btn[data-playing="true"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.full-play-btn[data-playing="true"]:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.premium-badge {
    font-size: 14px;
    margin-right: 2px;
}

.no-preview {
    font-size: 12px;
    color: #8888a8;
    font-style: italic;
    margin: 8px 0;
    padding: 4px 0;
}

/* Bottom Spotify Player */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(90deg, #181818 0%, #282828 100%);
    border-top: 1px solid #404040;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 24px;
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease;
}

.player-main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
}

.bottom-player.hidden {
    transform: translateY(100%);
}

.player-track-info {
    display: flex;
    align-items: center;
    min-width: 250px;
    flex: 1;
}

.player-album-cover {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 12px;
}

.player-track-details {
    overflow: hidden;
}

.player-track-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.player-artist-name {
    color: #b3b3b3;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 0 0 auto;
}

.player-btn {
    background: none;
    border: none;
    color: #a7a7a7;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.15s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-btn:hover {
    color: white;
    transform: scale(1.05);
}

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

.player-btn-main {
    background: white;
    border: none;
    color: #000;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
}

.player-btn-main:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

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

/* Hide SVG icons and use CSS-drawn shapes for play/pause */
.player-btn-main svg {
    display: none !important;
}

/* Draw play triangle with CSS */
.player-btn-main::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 10px solid #000;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

/* Draw pause bars with CSS when playing */
.player-btn-main[data-playing="true"]::before {
    border: none;
    width: 3px;
    height: 12px;
    background: #000;
    transform: translate(-150%, -50%);
}

.player-btn-main[data-playing="true"]::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    width: 3px;
    height: 12px;
    background: #000;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.time-display {
    color: #a7a7a7;
    font-size: 11px;
    font-weight: 400;
    min-width: 35px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #5e5e5e;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

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

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #5e5e5e;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    z-index: 1;
}

.progress-bar:hover .progress-fill {
    background: #1db954;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: #1db954;
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.volume-slider {
    width: 93px;
    height: 4px;
    border-radius: 2px;
    background: #5e5e5e;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    transition: all 0.15s ease;
}

.volume-slider:hover {
    height: 6px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.volume-slider:hover::-webkit-slider-thumb {
    opacity: 1;
    background: #1db954;
}

.volume-slider::-webkit-slider-track {
    background: transparent;
    height: 4px;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #ffffff 0%, #ffffff var(--volume-percent, 50%), #5e5e5e var(--volume-percent, 50%), #5e5e5e 100%);
    height: 4px;
    border-radius: 2px;
}

.volume-slider:hover::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #1db954 0%, #1db954 var(--volume-percent, 50%), #5e5e5e var(--volume-percent, 50%), #5e5e5e 100%);
}

/* Add bottom padding to main content when player is visible */
body.player-active {
    padding-bottom: 90px;
}

/* Responsive Bottom Player */
@media (max-width: 768px) {
    .bottom-player {
        height: 80px;
        padding: 8px 12px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .player-main-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 0;
    }

    .player-track-info {
        min-width: auto;
        flex: 1;
        width: auto;
        justify-content: flex-start;
    }

    .player-controls {
        flex: 0 0 auto;
        gap: 16px;
        justify-content: center;
    }

    .player-progress {
        width: 100%;
        gap: 6px;
        margin: 0;
        padding: 0 4px;
    }

    .player-volume {
        display: none;
    }

    .player-album-cover {
        width: 48px;
        height: 48px;
        margin-right: 10px;
        border-radius: 6px;
    }

    .player-track-details {
        max-width: 140px;
    }

    .player-track-name {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .player-artist-name {
        font-size: 0.75rem;
    }

    /* Fix play/pause button icons - Use CSS-drawn shapes instead of SVG */
    .player-btn-main {
        width: 36px;
        height: 36px;
        position: relative;
    }

    /* Hide the SVG icons on mobile */
    .player-btn-main svg {
        display: none !important;
    }

    /* Draw play triangle with CSS */
    .player-btn-main::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-40%, -50%);
        width: 0;
        height: 0;
        border-left: 10px solid #000;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
    }

    /* Draw pause bars with CSS when playing */
    .player-btn-main[data-playing="true"]::before {
        border: none;
        width: 3px;
        height: 12px;
        background: #000;
        transform: translate(-150%, -50%);
    }

    .player-btn-main[data-playing="true"]::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(50%, -50%);
        width: 3px;
        height: 12px;
        background: #000;
    }

    .player-btn {
        width: 32px;
        height: 32px;
    }

    .player-btn svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }

    body.player-active {
        padding-bottom: 80px;
    }
}

/* Responsive audio players */
@media (max-width: 768px) {
    .track-preview {
        max-width: 100%;
        height: 30px;
    }

    .audio-controls {
        margin: 8px 0;
        padding: 6px;
    }

    .full-play-btn {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 90px;
    }

    .audio-label {
        font-size: 10px;
    }
}
/* Hero Section: Top Songs */
.top-songs-hero {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hero-header h2 {
    color: white;
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.play-playlist-btn, .export-playlist-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #2d3748;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.play-playlist-btn:hover, .export-playlist-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: #f7fafc;
}

.play-playlist-btn:disabled, .export-playlist-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.play-playlist-btn svg, .export-playlist-btn svg {
    fill: #2d3748;
}

.export-playlist-btn {
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    color: white;
}

.export-playlist-btn svg {
    fill: white;
}

.export-playlist-btn:hover {
    background: linear-gradient(135deg, #1ed760 0%, #21e065 100%);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.top-songs-hero .current-songs {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 16px;
    min-height: 200px;
}

.top-songs-hero .song-item .song-title {
    color: #1a202c;
}

.top-songs-hero .song-item .song-artist {
    color: #4a5568;
}

.top-songs-hero .song-item .song-album {
    color: #718096;
}

.top-songs-hero .song-item .full-play-btn {
    background: #e2e8f0;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

.top-songs-hero .song-item .full-play-btn:hover {
    background: #cbd5e0;
}

.top-songs-hero .song-item .remove-btn {
    color: white;
}

.top-songs-hero .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.top-songs-hero .empty-state h3 {
    color: #333;
    margin-bottom: 8px;
}

/* Discovery Section: Tabs */
.discovery-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.discovery-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #b8b8d1;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-content {
    display: none;
    padding: 24px;
    max-height: 600px;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .hero-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .hero-actions {
        width: 100%;
    }

    .play-playlist-btn, .export-playlist-btn {
        justify-content: center;
        flex: 1;
        min-width: 140px;
    }

    .tab-content {
        max-height: 400px;
    }
}

/* Now Playing Indicator */
.song-item.now-playing {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.position-number.now-playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.position-number.now-playing svg {
    fill: white;
}

.song-item.now-playing .song-title {
    color: #667eea;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Drag and Drop Styles */
.drag-handle {
    cursor: grab;
    color: #667eea;
    font-size: 1.2rem;
    padding: 0 8px;
    user-select: none;
    display: flex;
    align-items: center;
}

/* Mobile reorder buttons - hidden on desktop */
.mobile-reorder-buttons {
    display: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.song-item[draggable="true"] {
    cursor: move;
    transition: all 0.2s ease;
}

.song-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    background: rgba(102, 126, 234, 0.1);
}

.song-item.drag-over {
    border-top: 3px solid #667eea;
    margin-top: 3px;
}

.top-songs-hero .song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s ease;
}

.top-songs-hero .song-item:hover {
    background: #f8f9fa;
}

/* ============ GROUPS PAGES STYLING ============ */

/* Groups List Page */
.groups-actions {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.create-group-btn, .groups-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.create-group-btn:hover, .groups-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.group-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.group-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.3);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.group-header h3 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.role-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.group-description {
    color: #b8b8d1;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.group-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #b8b8d1;
    font-size: 0.9rem;
}

.group-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.invite-code-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #b8b8d1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.invite-code-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.view-btn {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Group View Page */
.group-info-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.group-details {
    flex: 1;
    min-width: 300px;
}

.group-meta {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b8b8d1;
    font-size: 0.9rem;
}

.copy-mini-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s ease;
}

.copy-mini-btn:hover {
    transform: scale(1.2);
    color: #764ba2;
}

.group-actions-header {
    display: flex;
    gap: 12px;
}

.view-mode-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    gap: 8px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.view-mode-tabs .tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: #b8b8d1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-mode-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.view-mode-tabs .tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.group-songs-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

/* By Person View */
.by-person-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.person-section {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.person-header {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.person-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 700;
}

.song-count {
    color: #b8b8d1;
    font-size: 0.9rem;
}

.person-songs {
    padding: 15px;
}

.person-songs .song-item {
    margin-bottom: 12px;
}

/* Combined View */
.combined-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-separator {
    text-align: center;
    padding: 15px 0;
    border-top: 2px solid rgba(102, 126, 234, 0.5);
    margin: 10px 0;
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
}

.combined-view .song-item {
    border-left-width: 4px;
}

/* Shuffled View */
.shuffled-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.distribution-header {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #b8b8d1;
    margin-bottom: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.shuffled-view .song-item {
    position: relative;
}

.shuffled-view .song-item.shuffled {
    border-left-width: 4px;
}

.user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #b8b8d1;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8888a8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #b8b8d1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Join Group Page */
.join-group-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.join-group-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.join-success,
.join-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.join-success h2,
.join-error h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
    font-weight: 700;
}

.join-success p,
.join-error p {
    margin: 0;
    font-size: 1.1rem;
    color: #b8b8d1;
    line-height: 1.6;
}

/* Profile Page */
.profile-info {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.profile-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.profile-songs-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-songs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.album-cover-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Responsive - Groups */
@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }

    .group-info-section {
        flex-direction: column;
        align-items: stretch;
    }

    .group-actions-header {
        width: 100%;
    }

    .group-actions-header .export-playlist-btn {
        width: 100%;
        justify-content: center;
    }

    .view-mode-tabs {
        flex-direction: column;
    }

    .person-header {
        padding: 12px 15px;
    }

    .group-meta {
        flex-direction: column;
        gap: 10px;
    }
}
