/* ===== MODERN DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* Text Colors */
    --text-dark: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    
    /* Background Colors */
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.25);
    --bg-overlay: rgba(0, 0, 0, 0.4);
    
    /* Border & Effects */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 24px;
    
    /* Status Colors */
    --success: #48bb78;
    --error: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== DARK THEME OVERRIDES ===== */
.dark-theme,
html.dark-theme,
body.dark-theme {
    --primary-color: #8ea0ff;
    --primary-dark: #7086ff;
    --secondary-color: #7c5cff;
    --accent-color: #e79cff;
    --gradient-primary: linear-gradient(135deg, #3543a8 0%, #5a3fb5 100%);
    --gradient-secondary: linear-gradient(135deg, #6b3fb3 0%, #e57ab7 100%);

    --text-dark: #e6eef8;
    --text-light: #b7c6dd;
    --text-muted: #93a2bd;

    --bg-light: #0b1020;
    --bg-white: #0f1724;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-overlay: rgba(0, 0, 0, 0.6);

    --border-color: rgba(255,255,255,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.6);
    --shadow-md: 0 6px 18px rgba(0,0,0,0.6);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.6);
}

/* Smooth transitions for theme changes */
html, body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Surface tokens for cards and inputs */
:root {
    --surface: var(--bg-white);
    --surface-2: #f3f6fa;
}

/* Dark surface overrides */
.dark-theme {
    --surface: var(--bg-white);
    --surface-2: #0b1220;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.nav-link.btn-login:hover {
    background: var(--primary-dark);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* transform hamburger into X when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Accessible focus styles */
.nav-link:focus,
.nav-link:focus-visible {
    outline: 3px solid rgba(102,126,234,0.2);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Ensure mobile menu is hidden by default in CSS (toggled with .active class) */
.nav-menu {
    transition: max-height 0.28s ease, opacity 0.28s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }
}

/* Theme toggle button */
.theme-toggle {
    margin-left: 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(102,126,234,0.06);
}

.dark-theme .theme-toggle {
    color: var(--text-dark);
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
}

/* Small icon sizing for toggle */
.theme-toggle .tt-icon {
    font-size: 1.05rem;
}

/* Animate toggle icon */
.theme-toggle .tt-icon {
    display: inline-block;
    transition: transform 0.28s ease, opacity 0.28s ease;
}
.theme-toggle.spin .tt-icon {
    transform: rotate(360deg);
}

/* Buttons: improved contrast and focus */
.btn {
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(102,126,234,0.12);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(102,126,234,0.16);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
}

/* Inputs & form elements */
.form-group input,
.form-group textarea,
input[type="text"],
input[type="email"],
select {
    background: var(--surface);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.9rem 1rem;
    border-radius: 10px;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 6px 18px rgba(102,126,234,0.08);
    border-color: var(--primary-color);
}

/* Card surfaces */
.auth-card, .project-card, .welcome-card, .results-card, .modal-content, .profile-card {
    background: var(--surface);
}

/* Accessibility: stronger focus for keyboard users */
:focus {
    outline: 3px solid rgba(102,126,234,0.12);
    outline-offset: 2px;
}

/* ===== SOCIAL MEDIA SECTION ===== */
.social-media-section {
    text-align: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.social-media-section h2,
.social-media-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102,126,234,0.16);
}

.social-link span {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.profile-card {
    position: relative;
}

.profile-img-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
}

.profile-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scroll-indicator span {
    width: 3px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 3px;
    animation: scroll 1.5s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scroll {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(5px);
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 6rem 0;
    background: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 6rem 0;
    background: var(--bg-light);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 1rem;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 6rem 0;
    background: var(--bg-white);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}

.btn-block {
    width: 100%;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* ===== AUTH PAGES (LOGIN) ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
}

.back-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auth-container {
    position: relative;
    z-index: 10;
}

.auth-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--bg-white);
    padding: 0 1rem;
    color: var(--text-light);
}

.btn-google {
    width: 100%;
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
}

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

.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.signup-link:hover {
    text-decoration: underline;
}

.auth-decoration .circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: white;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: white;
    bottom: -50px;
    left: -50px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background: white;
    top: 50%;
    left: -75px;
}

.error-msg {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-msg.show {
    display: block;
}

/* ===== QUIZ PAGE ===== */
.quiz-page {
    background: var(--bg-light);
    min-height: 100vh;
}

.quiz-header {
    background: var(--bg-white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.quiz-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.timer {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 4rem;
}

.quiz-welcome, .quiz-results {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.welcome-card, .results-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.quiz-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.info-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.question-counter {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.question-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    width: 100%;
    padding: 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.quiz-navigation .btn {
    flex: 1;
}

.score-display {
    margin: 2rem 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.score-percentage {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.results-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.breakdown-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.breakdown-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.breakdown-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.breakdown-item.correct .breakdown-value {
    color: var(--success);
}

.breakdown-item.incorrect .breakdown-value {
    color: var(--error);
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ===== PRODUCTS PAGE ===== */
.products-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.products-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.products-filter {
    background: var(--bg-white);
    padding: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.data-source-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.toggle-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.products-section {
    padding: 3rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-discount {
    background: var(--error);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.cart-count {
    background: var(--error);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    position: relative;
    margin: 2rem auto;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image img {
    width: 100%;
    border-radius: 12px;
}

.modal-details h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-category {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-tags span {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: var(--bg-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
}

.btn-add-cart {
    flex: 1;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow-xl);
    z-index: 1500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-cart:hover {
    color: var(--text-dark);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
}

.cart-item-qty {
    color: var(--text-light);
    font-size: 0.9rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.total-price {
    color: var(--primary-color);
}

.floating-cart-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== APP DEMO PAGE ===== */
.app-demo-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.app-demo-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.app-overview {
    padding: 4rem 0;
    background: var(--bg-white);
}

.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.overview-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.overview-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.app-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.feature-icon {
    font-size: 2rem;
    min-width: 50px;
}

.feature-text h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-text p {
    color: var(--text-light);
    margin: 0;
}

.phone-mockup {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 300px;
    height: 600px;
    border: 12px solid var(--text-dark);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-walkthrough {
    padding: 4rem 0;
    background: var(--bg-light);
    text-align: center;
}

/* grid removed since we only have 1 video */
.video-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    margin: 0 auto;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* keep aspect ratio + fix background */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: var(--text-dark); /* keeps for local videos */
    border-radius: 12px;
    overflow: hidden;
}

/* override gray background for YouTube embeds */
.video-walkthrough .video-wrapper {
    background: none !important;
}

/* make iframe fill the container */
.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-link-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.project-link-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.project-link-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-link-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.link-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.link-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.screenshots-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.screenshot-item p {
    font-weight: 600;
    color: var(--text-dark);
}

.cta-section {
    padding: 4rem 0;
    background: var(--bg-white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .profile-img-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .overview-content {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .auth-card {
        margin: 1rem;
        padding: 2rem;
    }

    .quiz-info {
        grid-template-columns: 1fr;
    }

    .results-breakdown {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .quiz-navigation {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .phone-frame {
        width: 250px;
        height: 500px;
    }
}