:root {
    /* Apple Pro Palette */
    --bg-black: #000000;
    --bg-sidebar: #0a0a0c;
    --bg-card: rgba(28, 28, 30, 0.6);
    --bg-elevated: #1c1c1e;
    --accent: #0071e3;
    --accent-glow: rgba(0, 113, 227, 0.4);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --white-5: rgba(255, 255, 255, 0.05);
    --white-10: rgba(255, 255, 255, 0.1);
    
    /* SF-like settings */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glass-blur: blur(20px) saturate(180%);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-black);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.011em;
    overflow-x: hidden;
}

.tracking-tight { letter-spacing: -0.022em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.x-small { font-size: 0.75rem; }

/* Auth Styling */
.auth-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 3.5rem !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: authIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.app-icon-circle {
    width: 64px;
    height: 64px;
    background: var(--white-5);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.nav-link {
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--white-5);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(0, 113, 227, 0.12);
}

/* Content Layout */
.content-area {
    background: radial-gradient(circle at top right, #1d1d1f 0%, #000000 100%);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
}

/* Stepper & Progress */
.custom-progress {
    height: 4px;
    background: var(--white-5) !important;
}

.progress-bar {
    background-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form Controls Pro */
.form-floating > .form-control {
    background: var(--white-5);
    border: 1px solid transparent;
    border-radius: 14px;
    color: white;
}

.form-floating > .form-control:focus {
    background: var(--white-10);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.pro-input {
    background: var(--white-5) !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    color: white !important;
    padding: 14px 18px !important;
}

.pro-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1) !important;
    background: var(--white-10) !important;
}

/* Buttons Pro */
.btn-primary-pro {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 14px 28px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary-pro:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary-pro {
    background: var(--white-5);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 14px 28px;
    font-weight: 600;
}

.btn-improve-pro {
    background: rgba(0, 113, 227, 0.15);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-improve-pro:hover {
    background: rgba(0, 113, 227, 0.25);
    transform: scale(1.05);
}

/* Skeleton Loading */
.skeleton-card {
    background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
    border-radius: 18px;
}

.skeleton-card.large { height: 300px; }
.skeleton-card.medium { height: 180px; }

@keyframes skeleton-pulse {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.pulse { animation: fadeInOut 2s infinite; }
@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Mobile Adaptation */
@media (max-width: 991.98px) {
    .sidebar {
        height: auto;
        position: relative;
        padding-bottom: 0 !important;
    }
    .sidebar-footer {
        display: none;
    }
    .nav {
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    .nav-link {
        white-space: nowrap;
    }
}

/* Markdown Styling */
.pro-markdown h3 {
    font-weight: 700;
    color: white;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.pro-markdown ul { padding-left: 1.2rem; color: var(--text-secondary); }
.pro-markdown li { margin-bottom: 0.5rem; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--white-10); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--white-20); }
