:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --border-card: #334155;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --nav-blur: rgba(15, 23, 42, 0.8);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Glow Effect */
.bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-blur);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent);
    width: 28px;
    height: 28px;
}

.logo small {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-btn:hover {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

/* Base Views */
.view {
    display: none;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    min-height: 70vh;
}

.view.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.primary-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn.ai-btn {
    background: var(--gradient);
}

.secondary-btn.sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: var(--border-card);
    transform: translateY(-2px);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Features Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 2.5rem;
    border-radius: 1.25rem;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    color: var(--accent);
    width: 40px;
    height: 40px;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Test Section styles */
.test-header {
    margin-bottom: 2.5rem;
}

.progress-container {
    width: 100%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-card);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: width 0.5s ease;
}

.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 3rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
}

.q-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.option-btn:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.option-btn.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.test-footer {
    display: flex;
    justify-content: space-between;
}

/* Results styles */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 2rem;
    border-radius: 1.25rem;
}

.chart-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.strategies-container ul {
    list-style: none;
    margin-top: 1.5rem;
}

.strategies-container li {
    padding: 1rem;
    border-left: 3px solid var(--accent);
    background: rgba(15, 23, 42, 0.3);
    margin-bottom: 0.75rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* History styles */
.history-actions-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.history-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.history-info {
    flex: 1;
}

.history-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.history-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.danger-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.danger-btn:hover {
    background: #ef4444;
    color: white;
}

.history-empty {
    text-align: center;
    padding: 4rem 0;
}

.history-empty i {
    width: 64px;
    height: 64px;
    color: var(--border-card);
    margin-bottom: 1.5rem;
}

/* AI Roadmap Section Styles */
.ai-roadmap-section {
    border: 1px solid var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1rem;
}

.ai-icon {
    color: var(--accent);
    width: 32px;
    height: 32px;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    gap: 1.5rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-main);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ai-content {
    line-height: 1.8;
}

.ai-content h3 {
    color: var(--accent);
    margin: 1.5rem 0 1rem;
}

.ai-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-content li {
    margin-bottom: 0.5rem;
}

.error-text {
    color: #ef4444;
    text-align: center;
    padding: 1rem;
}

/* Footer / Settings Extension */
.footer {
    padding: 4rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar {
        padding: 1.5rem 0;
    }
}