/* ════════════════════════════════════════════════════════════════════════════
   Analog - Main Stylesheet
   The Future of Music
   ════════════════════════════════════════════════════════════════════════════ */

/* ----------------------------------------------------------------------------
   CSS Variables
---------------------------------------------------------------------------- */
:root {
    /* Colors */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #1a1a1a;
    
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    
    --accent-primary: #8b5cf6;    /* Purple */
    --accent-secondary: #06b6d4;  /* Cyan */
    --accent-success: #22c55e;    /* Green */
    --accent-warning: #f59e0b;    /* Amber */
    --accent-danger: #ef4444;     /* Red */
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    /* Glass effect */
    --glass-bg: rgba(0, 0, 0, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    /* Safe area insets for iOS notch/home indicator */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    
    /* Spacing */
    --header-height: 56px;
    --nav-height: 64px;
    --player-height: 72px;
    
    /* Animation */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* ----------------------------------------------------------------------------
   Reset & Base
---------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: 16px; /* Prevents iOS zoom */
}

img {
    max-width: 100%;
    display: block;
}

/* ----------------------------------------------------------------------------
   Utility Classes
---------------------------------------------------------------------------- */
.hidden { display: none !important; }
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ----------------------------------------------------------------------------
   App Header
---------------------------------------------------------------------------- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-height) + var(--safe-area-top));
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 max(16px, var(--safe-area-left));
    padding-bottom: 8px;
    padding-top: var(--safe-area-top);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-icon {
    height: 20px;
    width: auto;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    transition: var(--transition-fast);
}

.header-btn:active {
    transform: scale(0.92);
    opacity: 0.8;
}

.header-btn ion-icon {
    font-size: 20px;
    color: var(--text-secondary);
}

/* ----------------------------------------------------------------------------
   Main View Container
---------------------------------------------------------------------------- */
#viewContainer {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + var(--safe-area-top));
    padding-bottom: calc(var(--nav-height) + var(--player-height) + var(--safe-area-bottom) + 16px);
}

.page {
    padding: 16px;
    animation: fadeIn 200ms ease;
}

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

/* ----------------------------------------------------------------------------
   Bottom Navigation
---------------------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active .nav-icon {
    color: var(--accent-primary);
}

.nav-icon {
    font-size: 24px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

/* ----------------------------------------------------------------------------
   Audio Player (Sticky)
---------------------------------------------------------------------------- */
.audio-player {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-bottom));
    left: 8px;
    right: 8px;
    height: var(--player-height);
    z-index: 95;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.player-progress-mini {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 100ms linear;
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 12px;
}

.player-track {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.player-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover ion-icon {
    font-size: 24px;
    color: var(--text-muted);
}

.player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.control-btn:active {
    transform: scale(0.9);
}

.control-btn ion-icon {
    font-size: 20px;
    color: var(--text-primary);
}

.control-btn-main {
    width: 44px;
    height: 44px;
    background: var(--text-primary);
}

.control-btn-main ion-icon {
    font-size: 22px;
    color: var(--bg-primary);
}

.control-btn-tip {
    background: linear-gradient(135deg, #E91E63, #C2185B);
    transition: all 0.3s ease;
}

.control-btn-tip:hover {
    background: linear-gradient(135deg, #F06292, #E91E63);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.control-btn-tip ion-icon {
    font-size: 20px;
    color: white;
}

/* ----------------------------------------------------------------------------
   Page Title
---------------------------------------------------------------------------- */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ----------------------------------------------------------------------------
   Section Headers
---------------------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-link {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
}

/* ----------------------------------------------------------------------------
   Song Cards (Grid)
---------------------------------------------------------------------------- */
.song-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 600px) {
    .song-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .song-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.song-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.song-card:active {
    transform: scale(0.97);
    opacity: 0.8;
}

.song-cover {
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--bg-elevated);
    overflow: hidden;
    position: relative;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.song-cover-placeholder ion-icon {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.song-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.song-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.2s;
}

.song-artist:hover {
    color: var(--accent-primary);
}

/* ----------------------------------------------------------------------------
   Song List (Vertical)
---------------------------------------------------------------------------- */
.song-list {
    display: flex;
    flex-direction: column;
}

.song-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.song-list-item:last-child {
    border-bottom: none;
}

.song-list-item:active {
    opacity: 0.7;
}

.song-list-cover {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--bg-elevated);
    overflow: hidden;
    flex-shrink: 0;
}

.song-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-list-info {
    flex: 1;
    min-width: 0;
}

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

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

.song-list-plays {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Playing animation */
.song-list-item.playing {
    background: linear-gradient(90deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(167, 139, 250, 0.05) 100%);
    border-left: 3px solid var(--accent-primary);
    padding-left: 9px;
}

.song-list-item.playing .song-list-title {
    color: var(--accent-primary);
}

.song-list-item.playing .song-list-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    animation: playing-pulse 1.5s ease-in-out infinite;
}

@keyframes playing-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

.song-list-artist {
    cursor: pointer;
    transition: color 0.2s;
}

.song-list-artist:hover {
    color: var(--accent-primary);
}

/* ----------------------------------------------------------------------------
   Forms & Inputs
---------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 16px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 44px;
}

/* ----------------------------------------------------------------------------
   Buttons
---------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

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

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #7c3aed;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 0.875rem;
}

.btn-icon {
    width: 48px;
    padding: 0;
}

/* Follow Button */
.btn-follow {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-follow:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.btn-follow.following {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-follow.following:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-follow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Tip Button */
.btn-quick-tip {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 24px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-quick-tip:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

/* Artist Profile Tabs */
.artist-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.artist-tab:hover {
    color: var(--text-primary);
}

.artist-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent-primary);
}

/* ----------------------------------------------------------------------------
   Cards
---------------------------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 20px;
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ----------------------------------------------------------------------------
   Stats Grid
---------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 16px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.stat-icon.plays { color: var(--accent-secondary); }
.stat-icon.revenue { color: var(--accent-success); }
.stat-icon.tracks { color: var(--accent-primary); }
.stat-icon.listeners { color: var(--accent-warning); }

/* ----------------------------------------------------------------------------
   Artist Dashboard - Tabbed Interface
---------------------------------------------------------------------------- */
.artist-dashboard-header {
    margin-bottom: 24px;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.artist-header-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    background-size: cover;
    background-position: center;
}

.artist-header-content {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -40px;
}

.artist-header-profile {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex: 1;
}

.artist-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.artist-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-profile-image ion-icon {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.artist-header-info {
    flex: 1;
    padding-bottom: 4px;
}

.artist-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.artist-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.dashboard-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.dashboard-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.dashboard-tab {
    flex-shrink: 0;
    min-width: fit-content;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.dashboard-tab ion-icon {
    font-size: 18px;
}

.dashboard-tab:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.dashboard-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.dashboard-tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    transition: var(--transition-fast);
    width: 100%;
}

.action-card:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.action-card ion-icon {
    font-size: 32px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.action-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Earnings Dashboard */
.earnings-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.earnings-hero {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(56, 142, 60, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
}

.earnings-hero-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.earnings-hero-amount {
    font-size: 3rem;
    font-weight: 800;
    color: #4CAF50;
    margin-bottom: 8px;
    line-height: 1;
}

.earnings-hero-details {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.earnings-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.earnings-breakdown-item {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.earnings-breakdown-item.earnings-payout {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.earnings-breakdown-item.earnings-fee {
    background: var(--bg-card);
}

.earnings-breakdown-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.earnings-breakdown-label ion-icon {
    font-size: 16px;
}

.earnings-breakdown-amount {
    font-size: 1.6rem;
    font-weight: 700;
}

.earnings-payout .earnings-breakdown-amount {
    color: #4CAF50;
}

/* Supporters List */
.supporters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supporter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.supporter-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.supporter-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.supporter-info {
    flex: 1;
}

.supporter-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.supporter-tips {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.supporter-amount {
    font-weight: 700;
    color: #4CAF50;
    font-size: 1rem;
}

/* Recent Tips List */
.recent-tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.tip-item.has-message {
    border-left: 3px solid #E91E63;
}

.tip-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-details {
    flex: 1;
    min-width: 0;
}

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

.tip-header strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.tip-amount {
    font-weight: 700;
    color: #4CAF50;
    font-size: 0.95rem;
}

.tip-message {
    background: rgba(233, 30, 99, 0.08);
    border-left: 2px solid #E91E63;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-style: italic;
}

.tip-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tip-song {
    color: var(--text-secondary);
}

.tip-time {
    opacity: 0.7;
}

/* Info Card */
.info-card {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: start;
}

.info-card ion-icon {
    font-size: 24px;
    color: #2196F3;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-content strong {
    color: #2196F3;
    font-weight: 600;
}

/* Pro Feature Gate */
.pro-feature-gate {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Song List Updates for Dashboard */
.song-list-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.song-list-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.song-list-meta ion-icon {
    font-size: 14px;
}

.song-list-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.song-list-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .artist-header-banner {
        height: 100px;
    }
    
    .artist-header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .artist-header-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    .artist-profile-image {
        width: 70px;
        height: 70px;
    }
    
    .artist-name {
        font-size: 1.3rem;
    }
    
    .dashboard-tab {
        font-size: 0.8rem;
        padding: 10px 8px;
        flex-direction: column;
        gap: 4px;
    }
    
    .dashboard-tab ion-icon {
        font-size: 24px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .earnings-hero-amount {
        font-size: 2.5rem;
    }
    
    .earnings-breakdown {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----------------------------------------------------------------------------
   Upload Area
---------------------------------------------------------------------------- */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-zone.active {
    border-color: var(--accent-success);
    background: rgba(34, 197, 94, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-zone.active .upload-icon {
    color: var(--accent-success);
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Image preview containers */
.image-preview {
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-preview {
    border-radius: 16px;
}

/* ----------------------------------------------------------------------------
   Settings List
---------------------------------------------------------------------------- */
.settings-group {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 16px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:active {
    background: var(--bg-elevated);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-item-icon ion-icon {
    font-size: 20px;
    color: var(--text-secondary);
}

.settings-item-text {
    font-size: 1rem;
    font-weight: 500;
}

.settings-item-arrow {
    color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
   Empty State
---------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ----------------------------------------------------------------------------
   Loading Spinner
---------------------------------------------------------------------------- */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
}

/* ----------------------------------------------------------------------------
   Auth Pages (Login/Register)
---------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 24px 24px 24px;
}

.auth-logo-img {
    height: 48px;
    width: auto;
}

.auth-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tagline {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1rem;
}

.auth-form {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ----------------------------------------------------------------------------
   Toast Notifications
---------------------------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--player-height) + var(--safe-area-bottom) + 24px);
    left: 16px;
    right: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 300ms ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ----------------------------------------------------------------------------
   Track Editor Page
---------------------------------------------------------------------------- */
.track-editor-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding-bottom: calc(var(--player-height) + var(--nav-height) + var(--safe-area-bottom) + 20px);
}

.track-editor-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.track-editor-content form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.track-stats-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.cover-preview-container {
    width: 100%;
    aspect-ratio: 1;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-preview-placeholder {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-input-file {
    display: block;
    width: 100%;
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.form-input-file::file-selector-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary,
.btn-primary,
.btn-danger {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-primary:hover {
    background: #7c3aed;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary:hover {
    background: var(--bg-card);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .track-editor-content {
        padding: 0 12px 24px;
    }
    
    .track-stats-box {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
}

/* ----------------------------------------------------------------------------
   Upload Disclaimer Styles
---------------------------------------------------------------------------- */
.disclaimer-wrapper {
    max-width: 700px;
    margin: 0 auto;
    height: calc(100vh - var(--header-height) - var(--nav-height) - 32px);
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.disclaimer-header {
    text-align: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.disclaimer-header h1 {
    margin: 12px 0 0 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.disclaimer-scroll-area {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.disclaimer-content {
    padding: 24px;
}

.disclaimer-content h3 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.disclaimer-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.disclaimer-content li {
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 8px 0 8px 24px;
    position: relative;
}

.disclaimer-content li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--accent-primary);
    font-weight: bold;
}

.disclaimer-form-fixed {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    flex-shrink: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.disclaimer-actions button {
    flex: 1;
}

@media (max-width: 640px) {
    .disclaimer-wrapper {
        padding: 12px;
        height: calc(100vh - var(--header-height) - var(--nav-height) - 24px);
    }
    
    .disclaimer-header h1 {
        font-size: 1.3rem;
    }
    
    .disclaimer-content {
        padding: 16px;
    }
    
    .disclaimer-form-fixed {
        padding: 16px;
    }
    
    .disclaimer-actions {
        flex-direction: column-reverse;
    }
    
    .disclaimer-actions button {
        width: 100%;
    }
}

/* ----------------------------------------------------------------------------
   Admin Dashboard Styles
---------------------------------------------------------------------------- */
.admin-header {
    margin-bottom: 24px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.admin-section {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.artist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artist-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.artist-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.artist-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.artist-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.artist-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.artist-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.verified-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.verified-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.verified-item:last-child {
    border-bottom: none;
}

.uploads-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.upload-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.upload-icon {
    font-size: 24px;
    color: var(--accent-primary);
}

.upload-title {
    font-weight: 600;
    color: var(--text-primary);
}

.upload-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.empty-state-small {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

@media (max-width: 640px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .artist-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .artist-actions {
        width: 100%;
    }
    
    .artist-actions button {
        flex: 1;
    }
    
    .upload-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ----------------------------------------------------------------------------
   Audit Log Styles
---------------------------------------------------------------------------- */
.audit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.audit-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-select {
    flex: 1;
    padding: 10px 12px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-log-entry {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.audit-log-entry:hover {
    border-color: var(--accent-primary);
    background: var(--surface-secondary);
}

.log-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.log-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.log-main {
    flex: 1;
    min-width: 0;
}

.log-action {
    font-weight: 600;
    margin-bottom: 4px;
}

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

.log-severity {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.log-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.log-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.log-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-detail-item strong {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.log-detail-item span {
    color: var(--text-primary);
    word-break: break-all;
}

.log-details-json {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
    color: var(--accent-primary);
}

.audit-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px;
    background: var(--surface-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.audit-pagination button {
    display: flex;
    align-items: center;
    gap: 4px;
}

.audit-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

