@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Base Colors - Light Mode Default */
    --primary-color: #2563eb;
    --primary-light: #60a5fa;
    --primary-hover: #1d4ed8;

    --secondary-color: #0d9488;
    --secondary-light: #2dd4bf;

    --accent-color: #7c3aed;
    --accent-light: #a78bfa;

    --vibrant-pink: #db2777;
    --vibrant-orange: #ea580c;
    --vibrant-green: #16a34a;

    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;

    --border-color: #e2e8f0;

    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;

    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --grad-vibrant: linear-gradient(135deg, #db2777 0%, #ea580c 100%);
    --grad-ocean: linear-gradient(135deg, #0d9488 0%, #2563eb 100%);
    --grad-success: linear-gradient(135deg, #059669 0%, #16a34a 100%);

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-neon: 0 0 15px rgba(37, 99, 235, 0.2);
    --shadow-accent: 0 0 15px rgba(124, 58, 237, 0.2);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-hover: #2563eb;

    --secondary-color: #14b8a6;
    --secondary-light: #5eead4;

    --accent-color: #8b5cf6;
    --accent-light: #c4b5fd;

    --vibrant-pink: #f472b6;
    --vibrant-orange: #fb923c;
    --vibrant-green: #4ade80;

    --bg-color: #020617;
    --bg-secondary: #0f172a;
    --card-bg: #0f172a;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border-color: #1e293b;

    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-neon: 0 0 20px rgba(59, 130, 246, 0.3);
    --shadow-accent: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Watermark */
body::after {
    content: "Think Bot by Ojashwa ";
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.4;
    pointer-events: none;
    z-index: 9999;
    letter-spacing: 0.5px;
}

/* Logo Image */
.logo-img {
    height: 90px;
    /* Increased for visibility */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

code,
pre {
    font-family: var(--font-mono);
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

.grid {
    display: grid;
}

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

/* Components: Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--primary-color);
}

/* Component: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-neon);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Component: Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
    border-color: var(--primary-color);
}

/* Glassmorphism Card Variant */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Featured Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Dashboard & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Dashboard Sidebar Layout */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    /* Adjust for navbar */
    position: relative;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    height: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0.2;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

/* Footer */
footer {
    margin-top: auto;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
}

/* --- NEW ADDITIONS FOR REVAMPED UI --- */

/* Badge Variations */
.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

/* Test Wizard UI */
.test-progress-container {
    height: 4px;
    background: var(--bg-secondary);
    /* Darker track */
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
}

.test-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.question-card-container {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.option-card {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: var(--primary-light, #818cf8);
    background: rgba(129, 140, 248, 0.05);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2) inset;
}

.option-card .option-key {
    min-width: 32px;
    height: 32px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    transition: all 0.2s;
}

.option-card.selected .option-key {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.option-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Animation Utilities */
.slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}



.scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Theme Image Utilities */
.theme-img-light {
    display: block;
}

.theme-img-dark {
    display: none;
}

[data-theme="dark"] .theme-img-light {
    display: none;
}

[data-theme="dark"] .theme-img-dark {
    display: block;
}

/* --- MOBILE RESPONSIVENESS & MEDIA QUERIES --- */

/* Mobile Menu Toggle (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 1024px) {
    :root {
        --spacing-xl: 3rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Navbar Mobile Styles */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        text-align: center;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
    }

    .nav-link::after {
        display: none;
        /* Hide hover underline on mobile */
    }

    /* Hero Section Mobile */
    section[style*="padding: 8rem 1rem"] {
        padding: 6rem 1rem !important;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    p[style*="font-size: 1.4rem"] {
        font-size: 1.1rem !important;
    }

    .flex.justify-center.gap-md {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
    }

    /* Dashboard Sidebar Mobile */
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .sidebar::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .sidebar-link {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    .dashboard-main {
        padding: 1.5rem;
        max-height: none;
    }

    /* Grid Adjustments */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Footer Adjustments */
    footer div.grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    footer div.flex.gap-md {
        justify-content: center;
    }

    /* Assessment Portal Mobile */
    .test-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .option-card {
        padding: 1rem;
    }

    .option-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem !important;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }
}