/* ============================================
   Exam Simulator Pro - Main Stylesheet
   Mobile-First Responsive Design
   ============================================ */

/* CSS Variables */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 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);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-logo i {
    font-size: 1.5rem;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    display: flex;
}

.nav-menu.active {
    transform: translateY(0);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--dark);
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.nav-btn {
    background: var(--gradient-primary);
    color: var(--white) !important;
}

.nav-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.nav-logout:hover {
    background: var(--danger);
    color: var(--white);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        transform: none;
        width: auto;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 1rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

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

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

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

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

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   Forms
   ============================================ */
.form-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.form-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray);
}

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

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

.form-label i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--gray);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

.form-footer a {
    color: var(--primary);
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

/* ============================================
   Cards
   ============================================ */
.section {
    padding: 3rem 1rem;
}

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

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

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

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.card-price span {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.8;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-text {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-features {
    margin-bottom: 1.5rem;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--dark);
    font-size: 0.9375rem;
}

.card-features li i {
    color: var(--success);
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray);
}

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

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-icon.blue {
    background: #dbeafe;
    color: #1e40af;
}

.stat-icon.green {
    background: #d1fae5;
    color: #065f46;
}

.stat-icon.orange {
    background: #fef3c7;
    color: #92400e;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #5b21b6;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

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

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card-body {
    padding: 1.5rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: var(--light);
}

.table .actions {
    display: flex;
    gap: 0.5rem;
}

.table .actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray);
}

/* ============================================
   Test Page
   ============================================ */
.test-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.test-header {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.test-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.test-timer.warning {
    color: var(--warning);
}

.test-timer.danger {
    color: var(--danger);
}

.test-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .test-layout {
        grid-template-columns: 1fr 280px;
    }
}

.question-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.question-number {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    border-color: var(--primary-light);
}

.option-item.selected {
    border-color: var(--primary);
    background: #ede9fe;
}

.option-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.option-label {
    flex: 1;
    cursor: pointer;
}

.question-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

/* Question Palette */
.palette-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}

.palette-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.palette-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.palette-item:hover {
    transform: scale(1.1);
}

.palette-item.default {
    background: var(--gray-light);
    color: var(--dark);
}

.palette-item.answered {
    background: var(--success);
    color: var(--white);
}

.palette-item.current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary-dark);
}

.palette-item.review {
    background: var(--warning);
    color: var(--white);
}

.palette-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* ============================================
   Leaderboard
   ============================================ */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.leaderboard-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.leaderboard-list {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: var(--light);
}

.leaderboard-item.top-3 {
    background: linear-gradient(90deg, #fef3c7 0%, transparent 100%);
}

.leaderboard-item.top-3:nth-child(1) {
    background: linear-gradient(90deg, #fde68a 0%, transparent 100%);
}

.rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.rank.gold {
    background: #fbbf24;
    color: #92400e;
    border-radius: 50%;
}

.rank.silver {
    background: #e5e7eb;
    color: #374151;
    border-radius: 50%;
}

.rank.bronze {
    background: #fdba74;
    color: #9a3412;
    border-radius: 50%;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.25rem;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-info h4 {
    font-weight: 600;
    color: var(--dark);
}

.leaderboard-info p {
    font-size: 0.875rem;
    color: var(--gray);
}

.leaderboard-score {
    text-align: right;
}

.leaderboard-score .score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.leaderboard-score .label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ============================================
   Admin Panel
   ============================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: calc(100vh - 70px);
}

@media (min-width: 1024px) {
    .admin-layout {
        grid-template-columns: 260px 1fr;
    }
}

.admin-sidebar {
    background: var(--dark);
    color: var(--white);
    padding: 1.5rem;
}

.admin-sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.admin-sidebar-header h3 {
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.8);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-main {
    padding: 2rem;
    background: var(--light);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
}

/* Data Table */
.data-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.data-table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
    background: var(--light);
}

.data-table tbody tr:hover {
    background: var(--light);
}

.data-table .btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Poppins', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 1rem 1rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-section h3,
.footer-section h4 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info li i {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
}

/* Anti-cheat overlay */
.cheat-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--danger);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    padding: 2rem;
}

.cheat-warning h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cheat-warning p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}
