/* ==========================================================================
   PrepPilot Design System — Dark Mode, Glassmorphism, Premium Aesthetics
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #090d16;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(26, 35, 54, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-glow: rgba(56, 189, 248, 0.3);

    /* Text Colors */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Accents */
    --cyan: #38bdf8;
    --purple: #c084fc;
    --amber: #fbbf24;
    --emerald: #34d399;
    --rose: #fb7185;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(192, 132, 252, 0.15));

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;

    /* Radius & Transitions */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Ambient Glowing Background Orbs */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.sphere-1 {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #38bdf8, transparent 70%);
}

.sphere-2 {
    top: 40%;
    right: -150px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #c084fc, transparent 70%);
}

.sphere-3 {
    bottom: -150px;
    left: 30%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #34d399, transparent 70%);
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 60px 24px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-tagline {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.nav-meta {
    display: flex;
    gap: 12px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
}

/* Hero Section */
.hero-section {
    margin-bottom: 40px;
}

.hero-header {
    margin-bottom: 28px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
}

/* Quick Samples */
.quick-samples {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sample-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

/* Glass Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-glass-glow);
}

/* Form Styling */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control {
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.textarea-jd {
    resize: vertical;
    line-height: 1.5;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
    width: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.btn-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* Loading Section */
.loading-card {
    padding: 48px;
}

.spinner-ring {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(56, 189, 248, 0.2);
    border-top: 4px solid var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 8px;
}

.loading-text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar-fill {
    width: 15%;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s ease;
}

/* Dashboard Section */
.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.company-badge-large {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.company-heading {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
}

.role-subheading {
    color: var(--text-muted);
    font-size: 14px;
}

.ms-auto { margin-left: auto; }

/* Tabs */
.tab-nav {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-glass);
    padding-top: 16px;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--cyan);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-count {
    background: var(--purple);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Grids */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

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

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tech Stack Badges */
.tech-stack-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-badge {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--cyan);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Insights List */
.insights-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insights-list li {
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    color: var(--text-main);
}

.insights-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--amber);
}

/* Signals Grid */
.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.signal-pill {
    background: rgba(192, 132, 252, 0.1);
    border: 1px solid rgba(192, 132, 252, 0.25);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #e9d5ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Topic Cards */
.topic-card {
    border-left: 4px solid var(--cyan);
}

.topic-card.priority-High { border-left-color: var(--rose); }
.topic-card.priority-Medium { border-left-color: var(--amber); }
.topic-card.priority-Low { border-left-color: var(--emerald); }

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

.topic-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.priority-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.priority-High { background: rgba(251, 113, 133, 0.2); color: var(--rose); }
.priority-Medium { background: rgba(251, 191, 36, 0.2); color: var(--amber); }
.priority-Low { background: rgba(52, 211, 153, 0.2); color: var(--emerald); }

.topic-concepts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.concept-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-muted);
}

/* Score Banner */
.score-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.score-metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--cyan);
}

.weakness-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.weak-chip {
    background: rgba(251, 113, 133, 0.15);
    border: 1px solid rgba(251, 113, 133, 0.3);
    color: var(--rose);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Practice Questions */
.question-card {
    margin-bottom: 20px;
}

.q-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.q-topic {
    font-size: 12px;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
}

.q-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.options-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.option-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--cyan);
}

.option-btn.selected {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--cyan);
    font-weight: 600;
}

.option-btn.correct {
    background: rgba(52, 211, 153, 0.2) !important;
    border-color: var(--emerald) !important;
    color: #fff !important;
}

.option-btn.incorrect {
    background: rgba(251, 113, 133, 0.2) !important;
    border-color: var(--rose) !important;
}

.code-box {
    background: #0d1117;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--font-code);
    font-size: 13px;
    color: #e6edf3;
    overflow-x: auto;
    margin-bottom: 16px;
}

.feedback-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--emerald);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 14px;
    font-size: 14px;
}

.feedback-box.wrong {
    background: rgba(251, 113, 133, 0.1);
    border-color: var(--rose);
}

/* Timeline */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 20px;
}

.day-badge {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-glow);
    border: 1px solid var(--cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.day-badge-num {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--cyan);
}

.day-badge-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 8px;
}

.action-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-list li::before {
    content: "✓ ";
    color: var(--emerald);
    font-weight: bold;
}

/* Utilities & Footer */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 24px; }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-amber { color: var(--amber); }
.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }

.footer {
    margin-top: 60px;
    border-top: 1px solid var(--border-glass);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}
