/* ============================================
   GLASSMORPHISM DESIGN SYSTEM
   Inspired by artlist.io - Premium glass aesthetics
   ============================================ */

:root {
    /* Core colors */
    --md-bg-deep: #050810;
    --md-bg: #0a0f1a;
    --md-bg-elevated: #101624;

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: 20px;

    /* Accent colors */
    --accent-amber: #F59E0B;
    --accent-amber-glow: rgba(245, 158, 11, 0.4);
    --accent-gold: #FBBF24;
    --accent-blue: #3B82F6;
    --accent-purple: #8B5CF6;
    --accent-emerald: #10B981;
    --accent-rose: #F43F5E;

    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: rgba(248, 250, 252, 0.7);
    --text-muted: rgba(248, 250, 252, 0.45);

    /* Gradients */
    --gradient-amber: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #F59E0B 100%);
    --gradient-mesh:
        radial-gradient(at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(at 80% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(at 40% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(at 90% 90%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);

    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 64px;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--md-bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animated background */
.bg-mesh {
    position: fixed;
    inset: 0;
    background: var(--gradient-mesh);
    pointer-events: none;
    z-index: 0;
}

.bg-mesh::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Floating orbs animation */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.12);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.1);
    top: 50%;
    right: -150px;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.08);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ============================================
   GLASS CARD COMPONENTS
   ============================================ */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.glass-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-hover:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-gradient {
    background: var(--gradient-amber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-amber);
    color: #111827;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-amber-glow);
    color: #111827;
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

/* ============================================
   FORMS
   ============================================ */

.form-control, .form-select {
    font-family: 'Outfit', sans-serif;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background: var(--glass-bg-hover);
}

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

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 0.35em 0.8em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.badge-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress {
    height: 6px;
    background: var(--glass-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-amber);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   APP LAYOUT - AUTHENTICATED
   ============================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 2rem;
    padding: 0.25rem 0;
}

.sidebar-brand:hover {
    color: var(--text-primary);
}

.sidebar-brand .icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-amber);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 1.1rem;
}

.sidebar-cta {
    margin-bottom: 2rem;
}

.record-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--gradient-amber);
    border: none;
    border-radius: 14px;
    color: #111827;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.record-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px var(--accent-amber-glow);
}

.record-btn:hover::before {
    transform: translateX(100%);
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 450;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sidebar-nav-link:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.sidebar-nav-link.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.sidebar-nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.8;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-footer .sidebar-nav-link {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* Mobile header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-brand .icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-amber);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 0.9rem;
}

.menu-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
}

.mobile-record {
    width: 40px;
    height: 40px;
    background: var(--gradient-amber);
    border: none;
    border-radius: 10px;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
}

.landing-mobile-header {
    display: none;
}

.landing-mobile-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.record-btn-nav {
    width: auto;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    text-decoration: none;
}

.landing-nav-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.landing-nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.landing-nav-btn-mobile {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 98;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   LANDING PAGE LAYOUT
   ============================================ */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    background: rgba(10, 15, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.landing-brand .icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-amber);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 1.1rem;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 450;
    transition: color 0.2s;
}

.landing-nav-link:hover {
    color: var(--text-primary);
}

.landing-main {
    position: relative;
    z-index: 1;
    padding-top: 72px;
}

.landing-footer {
    position: relative;
    z-index: 1;
    background: rgba(10, 15, 26, 0.6);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-brand i {
    color: var(--accent-amber);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-amber);
}

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

/* ============================================
   UTILITIES
   ============================================ */

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

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-2 { margin-left: 0.5rem !important; }

.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }

.flex-column { flex-direction: column !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }

.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.text-center { text-align: center !important; }
.text-start { text-align: left !important; }

.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

.small { font-size: 0.875rem !important; }

.border-0 { border: none !important; }
.bg-transparent { background: transparent !important; }

/* Row/Col Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row > * {
    padding: 0 0.75rem;
}

.g-4 { gap: 1.5rem !important; margin: 0 !important; }
.g-4 > * { padding: 0 !important; }

.col-md-4, .col-md-6, .col-lg-3, .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #FDA4AF;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

.btn-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    margin-left: auto;
    font-size: 1.25rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (max-width: 1024px) {
    .landing-nav {
        padding: 0 1.5rem;
    }

    .landing-nav-links {
        gap: 1rem;
    }
}

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

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        margin-top: 50px;
        padding-bottom: 80px;
    }

    .sidebar-brand {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }

    .landing-nav {
        display: none;
    }

    .landing-mobile-header {
        display: flex;
    }

    .landing-main {
        padding-top: var(--header-height);
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
        padding-top: calc(var(--header-height) + 0.75rem);
    }

    h1 { font-size: 1.75rem; }
}
