/**
 * ISMO - Inter Schools Math Competition
 * Main Stylesheet
 */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Navbar Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

/* QR Code Container */
.qr-code-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: inline-block;
}

.qr-code-container img {
    max-width: 300px;
    height: auto;
    border: 5px solid #f8f9fa;
    border-radius: 10px;
}

/* Exam Center Cards */
.exam-center-card {
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.exam-center-card:hover {
    border-color: var(--primary-color);
    background-color: var(--light-color);
}

/* Button Styles */
.btn {
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Sidebar */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 5px;
    margin: 5px 10px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

/* Main Content with Sidebar */
.main-content {
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s;
}

/* Top Navbar for Dashboard */
.top-navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
}

/* Table Styles */
.table {
    background: white;
}

.table thead {
    background: var(--light-color);
}

/* Badge Styles */
.badge {
    padding: 5px 10px;
    font-weight: 500;
}

/* Step Wizard */
.step-wizard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #dee2e6;
    color: #6c757d;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-item.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step-item.completed .step-number {
    background: var(--success-color);
    color: white;
}

/* Seat Grid */
.seat-grid {
    display: grid;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.seat {
    aspect-ratio: 1;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
}

.seat:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.seat.available {
    border-color: #28a745;
    background: #d4edda;
}

.seat.occupied {
    border-color: #dc3545;
    background: #f8d7da;
    cursor: not-allowed;
}

.seat.selected {
    border-color: #007bff;
    background: #cfe2ff;
    border-width: 3px;
}

.seat.category-1 {
    background: #d1ecf1;
    border-color: #0dcaf0;
}

.seat.category-2 {
    background: #d1e7dd;
    border-color: #198754;
}

.seat.category-3 {
    background: #fff3cd;
    border-color: #ffc107;
}

.seat.category-4 {
    background: #f8d7da;
    border-color: #dc3545;
}

/* Image Preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    padding: 5px;
    background: white;
}

/* File Upload Button */
.file-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-btn input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

/* Countdown Timer */
.countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.countdown-item {
    display: inline-block;
    margin: 0 15px;
}

.countdown-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Loading Spinner */
.spinner-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: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .step-wizard {
        flex-direction: column;
    }
    
    .step-item:not(:last-child)::after {
        width: 2px;
        height: 100%;
        top: 40px;
        left: 20px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.box-shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
