/* ================================================
   TAMIL WEBSITE - PROFESSIONAL RESPONSIVE STYLES
   ================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --sidebar-width: 260px;
    --header-height: 72px;
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #1e3a8a;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    --bg-gradient-start: #1e3a8a;
    --bg-gradient-end: #0f172a;
    --sidebar-bg: #1e3a8a;
    --card-bg: #ffffff;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 50px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-family: 'Noto Sans Tamil', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #172554 100%);
    min-height: 100%;
    max-height: none;
    padding: 25px 20px;
    position: relative;
    left: auto;
    top: auto;
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
    overflow: visible;
    align-self: stretch;
}

.sidebar-logo {
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 15px 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar a {
    display: block;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.sidebar a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    transform: translateX(5px);
}

.sidebar a:hover::before {
    width: 4px;
}

.sidebar a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    font-weight: 600;
}

.sidebar-ad-box {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.sidebar-ad-box p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-section {
    margin-top: 22px;
    padding: 14px 12px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-section-title {
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 700;
}

.sidebar-test-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-test-item {
    margin-bottom: 8px;
}

.sidebar-test-item:last-child {
    margin-bottom: 0;
}

.sidebar-test-item a {
    display: block;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.sidebar-test-item a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: none;
}

.sidebar-test-meta {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    padding-left: 6px;
}

.sidebar-empty-text {
    color: #ffffff;
    font-size: 12px;
    margin: 0;
}

.content {
    flex: 1;
    padding: 0 40px 40px;
    margin-left: 0;
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1e40af 100%);
    color: var(--text-white);
    padding: 18px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1100;
    margin-left: 0;
    width: 100%;
    min-height: var(--header-height);
}

.header-logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    text-align: center;
    margin: 0;
}

.header p {
    margin: 0;
    color: var(--text-white);
}

.header-nav {
    display: flex;
    gap: 20px;
}

.header-nav a {
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition-base);
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: var(--text-white);
}

.btn-secondary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: var(--text-white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: var(--text-white);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    color: var(--text-white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: var(--text-white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-family: var(--font-family);
    transition: var(--transition-base);
    background: var(--card-bg);
}

.form-input:focus,
.form-select:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-error {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
}

/* ===== AUTH FORMS (Login/Register) ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #1e3a8a 100%);
}

.auth-card {
    background: var(--card-bg);
    padding: 45px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== LANDING PAGE ===== */
.landing-container {
    display: flex;
    min-height: 100vh;
}

.landing-sidebar {
    width: 350px;
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-white);
}

.landing-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.landing-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.landing-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

.landing-buttons {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1.2s ease;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.2;
}

.dashboard-intro {
    margin: 0 0 24px;
    padding: 18px 22px;
    background:
        radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.22), transparent 45%),
        linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-left: 6px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.dashboard-intro::after {
    content: '';
    position: absolute;
    right: -18px;
    top: -20px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.dashboard-intro:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.16);
}

.dashboard-intro-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #1e40af;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dashboard-intro-text {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.9;
    font-weight: 600;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 700;
    font-size: 20px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.logout-btn {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: var(--text-white);
    padding: 10px 22px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-base);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    color: var(--text-white);
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

#latest-results {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition-base);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.mcq-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
}

/* ===== QUIZ PAGE ===== */
.quiz-container {
    max-width: 850px;
    margin: 0 auto;
}

.quiz-header {
    background: var(--card-bg);
    padding: 25px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
}

.quiz-timer {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: var(--text-white);
    padding: 10px 25px;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.question-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 25px;
}

.question-number {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.7;
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--card-bg);
}

.option-label:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateX(5px);
}

.option-label input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 4px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.option-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    flex: 1;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ===== RESULTS PAGE ===== */
.result-container {
    max-width: 900px;
    margin: 0 auto;
}

.result-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1e40af 100%);
    color: var(--text-white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    margin-bottom: 35px;
    box-shadow: var(--shadow-xl);
}

.result-score {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-percentage {
    font-size: 24px;
    opacity: 0.9;
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
}

.result-stat {
    text-align: center;
}

.result-stat-value {
    font-size: 28px;
    font-weight: 700;
}

.result-stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.result-question {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--border-color);
}

.result-question.correct {
    border-left-color: var(--success-color);
}

.result-question.wrong {
    border-left-color: var(--error-color);
}

.result-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-question-number {
    font-weight: 700;
    color: var(--primary-color);
}

.result-question-status {
    padding: 6px 14px;
    border-radius: var(--border-radius-full);
    font-size: 13px;
    font-weight: 600;
}

.result-question-status.correct {
    background: #dcfce7;
    color: #166534;
}

.result-question-status.wrong {
    background: #fee2e2;
    color: #991b1b;
}

.result-question-text {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 18px;
    border-radius: var(--border-radius-sm);
}

.result-option {
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-option.correct {
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}

.result-option.wrong {
    background: #fee2e2;
    color: #991b1b;
}

.result-option.selected {
    border: 2px solid;
}

.result-explanation {
    background: #e0f2fe;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 20px;
    border-left: 4px solid #0284c7;
}

.result-explanation-title {
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 10px;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    margin-top: 25px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1e40af 100%);
    color: var(--text-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.table th:first-child {
    border-top-left-radius: var(--border-radius);
}

.table th:last-child {
    border-top-right-radius: var(--border-radius);
}

.table td {
    font-size: 14px;
    color: var(--text-primary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: #f8fafc;
}

.table-score {
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 35px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition-base);
}

.pagination-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

/* ===== ADS SECTION ===== */
.ad-section {
    margin: 35px 0;
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

.ad-section-inside {
    margin: 25px 0;
    text-align: center;
}

.ad-placeholder {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #d1d5db;
    text-align: center;
    padding: 25px;
    font-size: 14px;
    margin-top: auto;
    width: 100%;
    position: relative;
    margin-left: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .footer {
        margin-left: 0;
        width: 100%;
    }
}

.footer a {
    color: var(--primary-light);
    transition: var(--transition-base);
}

.footer a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.policy-page-title {
    margin-bottom: 16px;
}

.policy-page p,
.policy-page li {
    margin-bottom: 12px;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.animate-slide-in {
    animation: slideInLeft 0.6s ease;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
        --header-height: 68px;
    }

    .sidebar {
        width: var(--sidebar-width);
    }
    
    .content {
        margin-left: 0;
        padding: 0 30px 30px;
    }
    
    .landing-sidebar {
        width: 280px;
        padding: 30px;
    }
    
    .landing-title {
        font-size: 36px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --header-height: 64px;
    }

    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        max-height: none;
        padding: 15px;
        top: 0;
    }
    
    .sidebar a {
        display: inline-block;
        padding: 10px 15px;
        margin-right: 5px;
        margin-bottom: 5px;
    }

    .sidebar-section {
        margin-top: 16px;
    }
    
    .sidebar-ad-box {
        display: none;
    }
    
    .content {
        margin-left: 0;
        padding: 0 20px 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        margin-left: 0;
        width: 100%;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .landing-container {
        flex-direction: column;
    }
    
    .landing-sidebar {
        width: 100%;
        padding: 30px 20px;
        text-align: center;
    }
    
    .landing-content {
        padding: 40px 20px;
    }
    
    .landing-title {
        font-size: 28px;
    }
    
    .landing-subtitle {
        font-size: 16px;
    }
    
    .landing-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .landing-buttons .btn {
        width: 100%;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .dashboard-intro {
        padding: 14px 16px;
        font-size: 15px;
        line-height: 1.8;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 16px;
        padding: 15px;
    }
    
    .option-label {
        padding: 12px 15px;
    }
    
    .result-header {
        padding: 30px 20px;
    }
    
    .result-score {
        font-size: 42px;
    }
    
    .result-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .table-container {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .content {
        padding: 0 15px 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .dashboard-title {
        font-size: 24px;
    }

    .dashboard-intro {
        font-size: 14px;
        border-left-width: 5px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .pagination-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .ad-section,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

