/**
 * =====================================================
 * MZIKI APP - MAIN STYLESHEET
 * =====================================================
 * Modern, mobile-first design with native app feel
 * Primary: #238647 | Secondary: #2872bc | Background: #ffffff
 */

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
    --primary: #238647;
    --primary-dark: #1a6b36;
    --primary-light: #2ea85a;
    --primary-rgb: 35, 134, 71;
    --secondary: #2872bc;
    --secondary-dark: #1e5a9a;
    --secondary-rgb: 40, 114, 188;
    --background: #ffffff;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --text-light: #adb5bd;
    --border-color: #e9ecef;
    --border-light: #f1f3f5;
    --card-bg: #ffffff;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

/* =====================================================
   BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: 100vh;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: var(--background);
    box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary) !important;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-link i {
    margin-right: 6px;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
}

/* Credits Badge */
.credits-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.credits-badge-sm {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   BOTTOM NAVIGATION (Mobile)
   ===================================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    padding: 8px 0;
    padding-bottom: calc(8px + var(--safe-area-bottom));
    z-index: 1030;
}

@media (max-width: 991px) {
    .bottom-nav {
        display: block;
    }
    .desktop-nav {
        display: none !important;
    }
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-item.active {
    background: rgba(var(--primary-rgb), 0.1);
}

.bottom-nav-create {
    background: var(--primary);
    color: white !important;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -26px;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.bottom-nav-create i {
    font-size: 1.4rem;
    margin: 0;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--border-color);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    background: var(--card-bg);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-control, .form-select {
    font-family: 'Outfit', sans-serif;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.input-group-text {
    background: var(--border-light);
    border: 2px solid var(--border-color);
    border-right: none;
    color: var(--text-muted);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-dark);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #a71d2a;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.alert-info {
    background: rgba(var(--secondary-rgb), 0.1);
    color: var(--secondary-dark);
}

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-container {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.auth-header p {
    color: var(--text-muted);
    margin: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.auth-footer p {
    margin: 0;
    color: var(--text-muted);
}

/* Account Type Selection */
.account-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.account-type-option {
    cursor: pointer;
}

.account-type-option input {
    display: none;
}

.account-type-card {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.account-type-card i {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.account-type-card span {
    font-size: 0.85rem;
    font-weight: 500;
}

.account-type-option input:checked + .account-type-card,
.account-type-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.account-type-option input:checked + .account-type-card i,
.account-type-card.selected i {
    color: var(--primary);
}

/* Welcome Bonus */
.welcome-bonus {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-bonus i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Verification Icon */
.verification-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.verification-icon.success {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.verification-icon.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* =====================================================
   DASHBOARD
   ===================================================== */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

@media (max-width: 576px) {
    .welcome-title {
        font-size: 1.25rem;
    }
}

.welcome-subtitle {
    font-size: 1rem;
}

/* Stat Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Section Title */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

/* Track Cards */
.track-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.track-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.track-cover {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    overflow: hidden;
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
}

.track-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.track-play-overlay i {
    color: white;
    font-size: 2rem;
}

.track-card:hover .track-play-overlay {
    opacity: 1;
}

.track-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.track-info {
    padding: 12px;
}

.track-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    gap: 12px;
}

.track-meta i {
    margin-right: 4px;
}

.track-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.track-actions .btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    color: var(--text-dark);
}

/* How It Works */
.how-it-works {
    margin-top: 40px;
}

.step-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--card-shadow);
    position: relative;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.step-card h4 {
    margin-bottom: 8px;
}

/* =====================================================
   STUDIO PAGES
   ===================================================== */
.studio-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.progress-step.active .step-circle {
    background: var(--primary);
    color: white;
}

.progress-step.completed .step-circle {
    background: var(--primary);
    color: white;
}

.progress-step span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-step.active span {
    color: var(--primary);
}

.progress-line {
    width: 40px;
    height: 3px;
    background: var(--border-color);
    margin: 0 8px;
    margin-bottom: 24px;
}

.progress-line.active, .progress-line.completed {
    background: var(--primary);
}

@media (max-width: 576px) {
    .progress-step span {
        display: none;
    }
    .progress-line {
        margin-bottom: 0;
    }
}

.studio-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
}

/* Purpose Grid */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 576px) {
    .purpose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.purpose-option {
    cursor: pointer;
}

.purpose-option input {
    display: none;
}

.purpose-card {
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.purpose-card i {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.purpose-card span {
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
}

.purpose-option input:checked + .purpose-card,
.purpose-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.purpose-option input:checked + .purpose-card i,
.purpose-card.selected i {
    color: var(--primary);
}

/* Duration Options */
.duration-options {
    display: flex;
    gap: 12px;
}

.duration-option {
    flex: 1;
    cursor: pointer;
}

.duration-option input {
    display: none;
}

.duration-card {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.duration-time {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.duration-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.duration-option input:checked + .duration-card,
.duration-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Credits Info */
.credits-info {
    background: rgba(var(--secondary-rgb), 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

/* Lyrics Editor */
.lyrics-editor {
    min-height: 300px;
    font-family: 'Outfit', monospace;
    line-height: 1.8;
    resize: none;
}

.structure-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.structure-btn {
    font-size: 0.8rem;
    padding: 4px 10px;
}

.char-counter {
    font-size: 0.85rem;
    font-weight: 600;
}

.char-counter.text-warning {
    color: #ffc107 !important;
}

.char-counter.text-danger {
    color: #dc3545 !important;
}

.save-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lyrics-preview {
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Tag Selector */
.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-selector.compact {
    gap: 6px;
}

.tag-option {
    cursor: pointer;
}

.tag-option input {
    display: none;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--border-light);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag-selector.compact .tag {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.tag-option input:checked + .tag {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Vocal Options */
.vocal-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .vocal-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.vocal-option {
    cursor: pointer;
}

.vocal-option input {
    display: none;
}

.vocal-card {
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.vocal-card i {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.vocal-card span {
    font-size: 0.75rem;
    font-weight: 500;
}

.vocal-option input:checked + .vocal-card,
.vocal-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.vocal-option input:checked + .vocal-card i,
.vocal-card.selected i {
    color: var(--primary);
}

/* Sliders */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 50px;
}

.slider-label:last-child {
    text-align: right;
}

/* Prompt Preview */
.prompt-preview .prompt-box {
    background: var(--border-light);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    min-height: 60px;
}

/* Music Loading Animation */
.music-loading-animation {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 50px;
}

.music-bar {
    width: 6px;
    background: var(--primary);
    border-radius: 3px;
    animation: musicBar 1s ease-in-out infinite;
}

.music-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.music-bar:nth-child(2) { height: 35px; animation-delay: 0.1s; }
.music-bar:nth-child(3) { height: 25px; animation-delay: 0.2s; }
.music-bar:nth-child(4) { height: 40px; animation-delay: 0.3s; }
.music-bar:nth-child(5) { height: 30px; animation-delay: 0.4s; }

@keyframes musicBar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* Audio Player */
.audio-player {
    background: var(--border-light);
    padding: 20px;
    border-radius: var(--radius-lg);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 80px;
}

.audio-progress {
    flex: 1;
}

.audio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.audio-volume input {
    width: 80px;
}

/* Style Grid (Album Art) */
.style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.style-option {
    cursor: pointer;
}

.style-option input {
    display: none;
}

.style-card {
    padding: 14px 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.style-card i {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.style-card span {
    font-size: 0.7rem;
    font-weight: 500;
}

.style-option input:checked + .style-card,
.style-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.style-option input:checked + .style-card i,
.style-card.selected i {
    color: var(--primary);
}

/* Color Picker */
.color-picker-row {
    display: flex;
    gap: 12px;
}

.form-control-color {
    width: 50px;
    height: 40px;
    padding: 4px;
    border-radius: var(--radius-sm);
}

/* Art Preview */
.art-preview-container {
    text-align: center;
}

.art-preview {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--border-light);
}

.art-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.art-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
    font-size: 0.85rem;
}

/* Upload Area */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.02);
}

.upload-area i {
    font-size: 2rem;
    margin-bottom: 12px;
}

.upload-area span {
    font-weight: 600;
}

.upload-area small {
    font-size: 0.8rem;
}

/* Track Details */
.track-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.track-details .detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-weight: 600;
}

/* =====================================================
   EXPORT PAGE
   ===================================================== */
.success-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 24px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 20px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.success-content h2 {
    margin-bottom: 4px;
}

.track-preview-card .track-preview-art {
    aspect-ratio: 1;
    background: var(--border-light);
}

.track-preview-card .track-preview-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-placeholder-lg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-light);
}

.audio-player-export {
    padding: 16px;
    background: var(--border-light);
    border-radius: var(--radius-lg);
}

.player-controls {
    margin-bottom: 12px;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-progress .form-range {
    flex: 1;
}

.track-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.track-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Format Options */
.format-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.format-option {
    cursor: pointer;
}

.format-option input {
    display: none;
}

.format-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.format-icon {
    width: 44px;
    height: 44px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.format-info {
    flex: 1;
}

.format-info strong {
    display: block;
}

.format-info small {
    color: var(--text-muted);
}

.format-check {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--transition);
}

.format-option input:checked + .format-card,
.format-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.02);
}

.format-option input:checked + .format-card .format-check,
.format-card.selected .format-check {
    opacity: 1;
}

/* Social Pack Features */
.social-pack-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-pack-features li {
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-pack-features li i {
    width: 24px;
    color: var(--text-dark);
}

/* =====================================================
   CREDITS PAGE
   ===================================================== */
.credits-balance-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 24px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.balance-info {
    flex: 1;
}

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
}

.balance-value {
    font-size: 2rem;
    font-weight: 700;
}

.balance-worth {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Credit Packages */
.credit-package {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.credit-package:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.credit-package.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.credit-package.popular {
    border-color: var(--primary);
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.package-credits {
    margin-bottom: 8px;
}

.credits-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.credits-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.package-bonus {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.package-price {
    margin-bottom: 4px;
}

.price-kes {
    font-weight: 600;
    display: block;
}

.price-usd {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.package-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Currency Toggle */
.currency-toggle {
    display: flex;
    background: var(--border-light);
    border-radius: var(--radius-full);
    padding: 4px;
}

.currency-option {
    flex: 1;
    cursor: pointer;
}

.currency-option input {
    display: none;
}

.currency-option span {
    display: block;
    padding: 8px 16px;
    text-align: center;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition);
}

.currency-option input:checked + span {
    background: var(--primary);
    color: white;
}

/* Payment Methods */
.payment-method {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.method-header {
    padding: 16px;
    background: var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.method-badge {
    background: var(--text-muted);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.method-body {
    padding: 20px;
}

/* Payment Summary */
.payment-summary {
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius-md);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Credits Info Grid */
.credits-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 576px) {
    .credits-info-grid {
        grid-template-columns: 1fr;
    }
}

.credit-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary);
}

.info-content strong {
    display: block;
}

.info-content span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-card {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.profile-name {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.profile-type {
    font-size: 0.9rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.profile-link:last-child {
    border-bottom: none;
}

.profile-link:hover {
    background: var(--border-light);
}

.profile-link i:first-child {
    width: 24px;
    color: var(--text-muted);
}

.profile-link span {
    flex: 1;
    margin-left: 12px;
}

.profile-link i:last-child {
    color: var(--text-light);
}

/* =====================================================
   LIBRARY PAGE
   ===================================================== */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.filters-bar {
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.filter-tab:hover {
    background: var(--border-light);
    color: var(--text-dark);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

/* Mini Player */
.mini-player {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--text-dark);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1020;
}

@media (min-width: 992px) {
    .mini-player {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 400px;
    }
}

.mini-player-info {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-controls {
    display: flex;
    gap: 8px;
}

.mini-player-controls .btn-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    color: white;
}

.mini-player-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s;
}

/* =====================================================
   PROJECT VIEW PAGE
   ===================================================== */
.project-art-large {
    aspect-ratio: 1;
    background: var(--border-light);
}

.project-art-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-player-view {
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius-lg);
}

.project-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Status Steps */
.status-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-step .step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-step.completed .step-icon {
    background: var(--primary);
    color: white;
}

.status-step.active .step-icon {
    background: var(--secondary);
    color: white;
}

.step-info strong {
    display: block;
}

.step-info small {
    color: var(--text-muted);
}

.lyrics-display {
    background: var(--border-light);
    padding: 16px;
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.8;
}

.prompt-display {
    background: var(--border-light);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    gap: 4px;
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.page-link:hover {
    background: var(--border-light);
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--text-light);
}

/* =====================================================
   DROPDOWN
   ===================================================== */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--border-light);
}

.dropdown-divider {
    margin: 8px 0;
}

/* =====================================================
   TABLES
   ===================================================== */
.table {
    margin: 0;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 16px;
}

.table td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.table-hover tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Selection */
::selection {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--text-dark);
}
