/* Willow International School - Entrance Exam System Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #102347 0%, #193366 100%);
    color: white;
    padding: 1.5rem 2rem 1.2rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.logo-container {
    text-align: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #fff;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
    color: #e0e7ef;
}

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

.welcome {
    font-size: 0.9rem;
    opacity: 0.9;
}

.exam-timer {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.25rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.lang-btn {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    opacity: 0.7;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255,255,255,0.2);
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 2.5rem;
    color: #1e40af;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Login Options */
.login-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #1e40af;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.login-card h3 {
    color: #1e40af;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.login-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #102347 0%, #193366 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 35, 71, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a1830 0%, #102347 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 35, 71, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.btn-full {
    width: 100%;
}

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

/* Form Styles */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    border: 2px solid transparent;
    position: relative;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
    border-radius: 1rem 1rem 0 0;
}

.form-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    display: block;
}

.login-form h2 {
    color: #102347;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-form p {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border-left-color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    color: #059669;
    border-left-color: #059669;
}

.alert-info {
    background: #eff6ff;
    color: #102347;
    border-left-color: #102347;
}

/* Dashboard Styles */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard h2 {
    color: #102347;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

.student-info {
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #102347;
}

.info-card h3 {
    color: #102347;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-card p {
    margin-bottom: 0.5rem;
}

.status-completed {
    color: #059669;
    font-weight: 600;
}

.status-pending {
    color: #ea580c;
    font-weight: 600;
}

.status-locked {
    color: #6b7280;
    font-weight: 600;
}

/* Completion Message */
.completion-message {
    margin-bottom: 2rem;
}

.completion-message h3 {
    margin-bottom: 1rem;
}

.final-results {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 1rem;
    border-left: 4px solid #059669;
}

.final-results h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.results-grid {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 4px solid #1e40af;
    transition: all 0.2s;
}

.result-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.result-total {
    background: linear-gradient(135deg, #102347 0%, #193366 100%);
    color: white;
    border-left: 4px solid #059669;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-label {
    font-weight: 500;
}

.result-score {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Exams Section */
.exams-section h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-weight: 600;
}

.exams-section p {
    color: #64748b;
    margin-bottom: 2rem;
}

.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.exam-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.exam-card.available:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #1e40af;
}

.exam-card.completed {
    border-left: 4px solid #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.exam-card.locked {
    opacity: 0.6;
    border-left: 4px solid #6b7280;
    background: #f8fafc;
}

.exam-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.exam-card h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.exam-card p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.exam-status {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.exam-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Exam Container */
.exam-container {
    max-width: 800px;
    margin: 0 auto;
}

.exam-header {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #1e40af;
}

.exam-header h2 {
    color: #102347;
    margin-bottom: 1rem;
    font-weight: 600;
}

.exam-header p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Questions */
.questions-container {
    display: grid;
    gap: 2rem;
}

.question-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #1e40af;
    transition: all 0.2s;
}

.question-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.question-header h3 {
    color: #102347;
    margin-bottom: 1rem;
    font-weight: 600;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #374151;
}

.question-image {
    margin: 1rem 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.question-options {
    display: grid;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.option-label:hover {
    background: #e5e7eb;
    border-color: #102347;
}

.option-label input[type="radio"]:checked + .option-text {
    font-weight: 600;
    color: #102347;
}

.option-label input[type="radio"] {
    margin-top: 0.125rem;
    accent-color: #102347;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* Exam Actions */
.exam-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.login-footer .link {
    color: #102347;
    text-decoration: none;
    font-weight: 500;
}

.login-footer .link:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border-left: 4px solid #102347;
}

.demo-credentials ul {
    list-style: none;
    margin-top: 0.5rem;
}

.demo-credentials li {
    margin-bottom: 0.25rem;
}

.demo-credentials code {
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.help-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #102347 0%, #193366 100%);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .login-options {
        grid-template-columns: 1fr;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .exams-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-actions {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .language-switcher {
        order: -1;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .exam-header {
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2rem;
    }
}

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

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

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #1e40af;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-secondary {
        background: #000;
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Homepage Banner Section */
.banner-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 2.5rem 0;
}
.homepage-banner {
    width: 100%;
    max-width: 900px;
    height: auto;
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.12), 0 1.5px 8px rgba(0,0,0,0.08);
    object-fit: cover;
    background: #fff;
}

.banner-section.center-banner {
    margin: 0.3rem auto 1.5rem auto;
}

/* Login Card UI (centered, modern) */
.login-card-ui {
    background: #fff;
    max-width: 540px;
    margin: 1.2rem auto 2.5rem auto;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.13), 0 1.5px 8px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem 2.2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    z-index: 2;
}
.login-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 0;
    background: #f3f4f6;
    border-radius: 1.5rem;
    border: 1.5px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(30,40,90,0.04);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.tab-btn {
    flex: 1 1 0;
    min-width: 120px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.7rem 2.5rem;
    font-size: 1.15rem;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, font-weight 0.2s;
    outline: none;
    text-align: center;
    box-shadow: none;
}
.tab-btn:first-child {
    border-top-left-radius: 1.5rem;
    border-bottom-left-radius: 1.5rem;
}
.tab-btn:last-child {
    border-top-right-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
}
.tab-btn.active {
    background: #e5e7eb;
    color: #102347;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30,40,90,0.06);
    z-index: 1;
}
.tab-btn:not(.active):hover {
    background: #f1f1f1;
    color: #193366;
}
.login-form-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.login-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #222;
    text-transform: lowercase;
}
.login-desc {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.3rem;
}
.login-input {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: 1.1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.7rem;
    font-size: 1rem;
    background: #f9fafb;
    transition: border 0.2s;
    outline: none;
}
.login-input:focus {
    border-color: #2563eb;
    background: #fff;
}
.login-btn {
    width: 100%;
    background: #4f46e5;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 2rem;
    padding: 0.9rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(79,70,229,0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.login-btn:hover {
    background: #2563eb;
    box-shadow: 0 4px 16px rgba(37,99,235,0.13);
}
@media (max-width: 600px) {
    .login-card-ui {
        max-width: 98vw;
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    }
    .homepage-banner {
        max-width: 99vw;
    }
}

/* Modern Admin Sidebar Styles */
.modern-admin-sidebar {
    min-height: 100vh;
    background: linear-gradient(135deg, #17496a 0%, #2563eb 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    z-index: 30;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
}
.modern-admin-sidebar .sidebar-header {
    margin-bottom: 1.5rem;
}
.modern-admin-sidebar .sidebar-menu {
    list-style: none;
    padding: 0 0.5rem;
    margin: 0;
    flex: 1;
}
.modern-admin-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.9em;
    padding: 0.85em 1.2em;
    color: #e0e7ef;
    text-decoration: none;
    font-size: 1.08em;
    border-radius: 8px;
    margin-bottom: 0.3em;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}
.modern-admin-sidebar .sidebar-link i {
    font-size: 1.15em;
    min-width: 1.5em;
    text-align: center;
}
.modern-admin-sidebar .sidebar-link.active,
.modern-admin-sidebar .sidebar-link:hover {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 2px 8px #0001;
}
.modern-admin-sidebar .sidebar-link.active i,
.modern-admin-sidebar .sidebar-link:hover i {
    color: #2563eb;
}
@media (max-width: 900px) {
    .modern-admin-sidebar {
        width: 60px;
        min-width: 60px;
        padding-top: 0.5rem;
    }
    .modern-admin-sidebar .sidebar-link span {
        display: none;
    }
    .main-content {
        margin-left: 60px !important;
    }
}
@media (max-width: 600px) {
    .modern-admin-sidebar {
        position: static;
        width: 100vw;
        height: auto;
        flex-direction: row;
        box-shadow: none;
        min-height: unset;
        padding: 0.5rem 0;
    }
    .modern-admin-sidebar .sidebar-menu {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    .modern-admin-sidebar .sidebar-link {
        margin-bottom: 0;
        padding: 0.7em 0.5em;
        font-size: 1em;
        border-radius: 6px;
    }
    .main-content {
        margin-left: 0 !important;
    }
}