/* ================================================
   ABExam - Modern Google-Style CSS
   Inspired by Google Gemini, Drive, Gmail
   ================================================ */

/* CSS Variables - Color System */
:root {
    /* Core Colors - Sophisticated Monochromatic Palette */
    --primary: #ffffff;
    --background: #000000;
    --secondary-bg: #0a0a09;
    --tertiary-bg: #111110;

    /* Text */
    --text-main: #ffffff;
    --text-dim: #a1a1a1;
    --text-muted: #666666;

    /* Borders & Glass */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Accents */
    --accent-glow: rgba(255, 255, 255, 0.05);
    --accent-blue: #2BB2FF;

    /* Spacing */
    --gap: 1.5rem;
    --radius: 12px;

    /* Fonts */
    --font-display: 'Outfit', sans-serif;
    --font-ui: 'Inter', sans-serif;

    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Base styles refinement */
h1,
h2,
h3,
.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
/* Animated Background - x.ai style subtle glow */
.bg-gradient {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

.bg-pattern {
    /* Subtle grid or stars */
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
}

/* ================================================
   LAYOUT UTILITIES
   ================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ================================================
   NAVIGATION
   ================================================ */
/* Navbar x.ai Style */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-link i {
    display: none;
    /* Hide icons for cleaner look */
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-xs) var(--space-md);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}


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


.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    color: #000000;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}


/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + var(--space-xs));
    right: 0;
    width: 220px;
    background: #0a0a0a;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xs);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: var(--z-dropdown);
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-xs) 0;
    border: none;
}

/* ================================================
   BUTTONS (x.ai style)
   ================================================ */
/* Buttons Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* ================================================
   CARDS (Premium Look)
   ================================================ */
.card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ================================================
   MESSAGES
   ================================================ */
.message {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-success {
    border-left-color: var(--accent-green);
}

.message-error {
    border-left-color: var(--accent-red);
}

.message-warning {
    border-left-color: var(--accent-yellow);
}

.message-info {
    border-left-color: var(--accent-blue);
}

.message i {
    font-size: 1.2rem;
}

.message-success i {
    color: var(--accent-green);
}

.message-error i {
    color: var(--accent-red);
}

.message-warning i {
    color: var(--accent-yellow);
}

.message-info i {
    color: var(--accent-blue);
}

.message-close {
    margin-left: auto;
    padding: var(--space-xs);
    border: none;
    background: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.message-close:hover {
    color: var(--text-primary);
}

/* Hero Section - x.ai influence */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    margin-top: 2rem;
}

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

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text>* {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.hero-text .hero-badge {
    animation-delay: 0.1s;
}

.hero-text .hero-title {
    animation-delay: 0.2s;
}

.hero-text .hero-description {
    animation-delay: 0.3s;
}

.hero-text .hero-actions {
    animation-delay: 0.4s;
}

.hero-text .hero-stats {
    animation-delay: 0.5s;
}

/* ================================================
   FEATURES SECTION
   ================================================ */
/* Feature Cards Premium */
.card {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: var(--transition);
}

.card:hover {
    background: var(--tertiary-bg);
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.03em;
}

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

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
}

.feature-icon.listening {
    background: rgba(66, 133, 244, 0.15);
    color: var(--accent-blue);
}

.feature-icon.reading {
    background: rgba(52, 168, 83, 0.15);
    color: var(--accent-green);
}

.feature-icon.writing {
    background: rgba(251, 188, 4, 0.15);
    color: var(--accent-yellow);
}

.feature-icon.speaking {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-red);
}

.feature-icon.ai {
    background: rgba(161, 66, 244, 0.15);
    color: var(--accent-purple);
}

.feature-icon.analytics {
    background: rgba(36, 193, 224, 0.15);
    color: var(--accent-cyan);
}

.feature-title {
    margin-bottom: var(--space-sm);
}

.feature-description {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ================================================
   TEST CARDS
   ================================================ */
.test-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.test-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.test-card-category {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.test-card-category.listening {
    background: rgba(66, 133, 244, 0.15);
    color: var(--accent-blue);
}

.test-card-category.reading {
    background: rgba(52, 168, 83, 0.15);
    color: var(--accent-green);
}

.test-card-category.writing {
    background: rgba(251, 188, 4, 0.15);
    color: var(--accent-yellow);
}

.test-card-category.speaking {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-red);
}

.test-card-badge {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: white;
}

.test-card-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.test-card-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.test-card-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.test-card-actions {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-desc {
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-600);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.made-with {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* ================================================
   AUTH PAGES
   ================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.auth-card-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.6s ease-out;
}

.glass-card {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-primary);
}

.field-error {
    color: var(--accent-red);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.checkbox-label input:checked+.checkbox-custom {
    background: #ffffff;
    border-color: #ffffff;
}

.checkbox-label input:checked+.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #000000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link,
.register-link {
    font-size: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.forgot-link:hover,
.register-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
}

.auth-divider {
    text-align: center;
    margin: var(--space-xl) 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.auth-divider span {
    background: #0a0a0a;
    padding: 0 var(--space-md);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.social-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.social-btn.telegram {
    background: rgba(0, 136, 204, 0.1);
    border-color: rgba(0, 136, 204, 0.2);
    color: #0088cc;
}

.social-btn.telegram:hover {
    background: rgba(0, 136, 204, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.auth-footer .register-link {
    margin-left: 0.5rem;
    font-weight: 700;
}


/* ================================================
   DASHBOARD
   ================================================ */
.dashboard {
    padding-top: 100px;
    padding-bottom: var(--space-3xl);
}

.dashboard-header {
    margin-bottom: var(--space-2xl);
}

.dashboard-greeting {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.dashboard-title {
    margin-bottom: var(--space-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.tests {
    background: rgba(66, 133, 244, 0.15);
    color: var(--accent-blue);
}

.stat-icon.score {
    background: rgba(52, 168, 83, 0.15);
    color: var(--accent-green);
}

.stat-icon.time {
    background: rgba(251, 188, 4, 0.15);
    color: var(--accent-yellow);
}

.stat-icon.streak {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-red);
}

.stat-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ================================================
   MAIN CONTENT SPACING
   ================================================ */
.main-content {
    min-height: calc(100vh - 80px);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-2xl) var(--space-xl);
        gap: var(--space-sm);
        transition: left 0.3s ease;
        z-index: var(--z-navbar);
        display: flex;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        font-size: 1.1rem;
        padding: var(--space-md);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav-link i {
        width: 24px;
        text-align: center;
    }

    .nav-actions .btn:not(.theme-toggle),
    .nav-actions .user-menu {
        display: none;
    }

    .nav-actions {
        gap: var(--space-sm);
    }

    .mobile-menu-btn {
        display: flex;
        margin-left: var(--space-sm);
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: var(--space-xl);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }

    .stat-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
        padding-bottom: var(--space-md);
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-desc {
        margin: 0 auto var(--space-lg);
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    /* Dashboard Fixes */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: var(--space-lg) !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .btn-lg {
        width: 100%;
    }

    .auth-card {
        padding: var(--space-lg);
    }

    .test-card-meta {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
}

/* ================================================
   LOADING SPINNER
   ================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(26, 26, 46, 0.95);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Google-style Loading Dots */
.loading-dots {
    display: flex;
    gap: var(--space-xs);
}

.loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    background: var(--accent-blue);
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    background: var(--accent-red);
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    background: var(--accent-yellow);
    animation-delay: 0.4s;
}

.loading-dots span:nth-child(4) {
    background: var(--accent-green);
    animation-delay: 0.6s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-tertiary) 25%,
            var(--bg-secondary) 50%,
            var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin-bottom: var(--space-md);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

/* ================================================
   TOOLTIPS
   ================================================ */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ================================================
   PROGRESS BAR
   ================================================ */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* ================================================
   BADGES & TAGS
   ================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

.badge-success {
    background: rgba(52, 168, 83, 0.15);
    color: var(--accent-green);
}

.badge-warning {
    background: rgba(251, 188, 4, 0.15);
    color: #b06c00;
}

.badge-danger {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-red);
}

.badge-premium {
    background: linear-gradient(135deg, #fbbc04, #ea4335);
    color: white;
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: var(--space-lg);
}

.empty-state-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.empty-state-description {
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
}

/* ================================================
   RIPPLE EFFECT (Google Material)
   ================================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ripple:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
    transition: width 0.3s, height 0.3s, opacity 0.5s;
}