/*
Theme Name: Thanawya Results 2025
Description: قالب نتائج الثانوية العامة - نسخة احترافية متطورة
Version: 2.0
Author: Professional Theme
*/

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Theme Colors */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2b77e6;
    --accent-color: #e53e3e;
    --success-color: #38a169;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --light-color: #f7fafc;
    --dark-color: #1a202c;
    --text-color: #2d3748;
    --bg-color: #ffffff;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-heavy: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* New modern color palette */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-accent: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    --spacing-4xl: 4rem;
    --spacing-5xl: 5rem;
}

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

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.65;
    color: var(--text-color);
    background: var(--gradient-bg);
    direction: rtl;
    min-height: 100vh;
    font-size: var(--font-size-base);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Modern Hero Section */
.site-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--spacing-5xl) 0;
    text-align: center;
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200"><path d="M0,100 C150,200 350,0 500,100 C650,200 850,0 1000,100 L1000,200 L0,200 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover, cover, cover;
    background-position: top left, top right, bottom;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.site-header .container {
    position: relative;
    z-index: 2;
}

.site-title {
    font-size: var(--font-size-6xl);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    background: linear-gradient(45deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
    to { text-shadow: 0 4px 20px rgba(255, 255, 255, 0.3); }
}

.site-description {
    font-size: var(--font-size-2xl);
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
    margin-bottom: var(--spacing-2xl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Professional Header Stats */
.header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding: 0 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-item:hover::before {
    opacity: 1;
}

/* الأيقونات المميزة لكل نوع */
.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 1.4em;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.success-rate .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.average-score .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.top-score .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.total-students .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.system-status .stat-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.security-status .stat-icon {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.response-time .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.availability .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* محتوى الإحصائية */
.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Cairo', sans-serif;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9em;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* تأثيرات متقدمة للنجاح */
.success-rate .stat-number {
    color: #059669;
}

.average-score .stat-number {
    color: #1d4ed8;
}

.top-score .stat-number {
    color: #d97706;
}

.total-students .stat-number {
    color: #7c3aed;
}

/* تأثيرات للحالة الجاهزة */
.system-status .stat-number,
.security-status .stat-number,
.response-time .stat-number,
.availability .stat-number {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تأثيرات Animation للأرقام */
@keyframes countUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .stat-item {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .header-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 20px;
        padding: 0 5px;
    }
    
    .stat-item {
        padding: 14px 12px;
        gap: 10px;
        border-radius: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
    }
    
    .stat-number {
        font-size: 1.3em;
    }
    
    .stat-label {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .header-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px 10px;
        gap: 8px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .stat-number {
        font-size: 1.2em;
    }
    
    .stat-label {
        font-size: 0.75em;
        line-height: 1.3;
    }
}

/* Main Content */
.main-content {
    padding: var(--spacing-5xl) 0;
    position: relative;
    z-index: 1;
}

/* Modern Search Section */
.search-section {
    background: var(--white);
    padding: var(--spacing-4xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    margin-bottom: var(--spacing-4xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transform: translateY(-50px);
    margin-top: -50px;
    z-index: 10;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.search-section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-3xl);
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-align: center;
    position: relative;
}

.search-section h2::after {
    content: '';
    position: absolute;
    bottom: -var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

.form-group select,
.form-group input {
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
    background: var(--white);
    box-shadow: var(--shadow-light);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(43, 119, 230, 0.1);
    transform: translateY(-1px);
}

.form-group select:hover,
.form-group input:hover {
    border-color: var(--info-color);
    box-shadow: var(--shadow-medium);
}

.search-btn {
    padding: var(--spacing-lg) var(--spacing-2xl);
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 250px;
    position: relative;
    overflow: hidden;
}

.search-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 ease;
}

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

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.search-btn:active {
    transform: translateY(-1px);
}

.btn-text {
    margin-left: var(--spacing-sm);
}

.btn-icon {
    margin-right: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    margin-top: 5px;
}

.suggestion-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 600;
    display: block;
    color: var(--text-color);
    margin-bottom: 5px;
}

.suggestion-details {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Loading */
.loading {
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #ffeaa7;
    color: #d63031;
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    border: 1px solid #fab1a0;
    text-align: center;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

/* Student Information Section - Enhanced Design */
.student-info {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    border-radius: 20px;
}

.student-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0.5;
    z-index: 0;
}

.student-info > * {
    position: relative;
    z-index: 1;
}

.student-name {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 35px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.student-name::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 20px;
    z-index: -1;
    filter: blur(20px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    position: relative;
}

.info-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(15px);
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-item:hover::before {
    opacity: 1;
}

.info-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Enhanced animations for info items */
.info-item {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.info-item:nth-child(1) { animation-delay: 0.1s; }
.info-item:nth-child(2) { animation-delay: 0.2s; }
.info-item:nth-child(3) { animation-delay: 0.3s; }
.info-item:nth-child(4) { animation-delay: 0.4s; }
.info-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading animation for status badge */
.status-second {
    position: relative;
    overflow: hidden;
}

.status-second::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-status 2s infinite;
}

@keyframes shimmer-status {
    0% { left: -100%; }
    100% { left: 100%; }
}

.info-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    transition: all 0.4s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.info-item:hover::after {
    width: 200%;
    height: 200%;
}

.info-label {
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    gap: 10px;
    opacity: 0.8;
}

.info-label i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.info-item:hover .info-label i {
    transform: scale(1.1) rotate(5deg);
    color: var(--secondary-color);
    filter: drop-shadow(0 4px 8px rgba(118, 75, 162, 0.3));
}

/* Special icon styling for different fields */
.info-item:nth-child(1) .info-label i { color: #3498db; }
.info-item:nth-child(2) .info-label i { color: #e74c3c; }
.info-item:nth-child(3) .info-label i { color: #2ecc71; }
.info-item:nth-child(4) .info-label i { color: #f39c12; }
.info-item:nth-child(5) .info-label i { color: #9b59b6; }

.info-item:nth-child(1):hover .info-label i { color: #2980b9; }
.info-item:nth-child(2):hover .info-label i { color: #c0392b; }
.info-item:nth-child(3):hover .info-label i { color: #27ae60; }
.info-item:nth-child(4):hover .info-label i { color: #e67e22; }
.info-item:nth-child(5):hover .info-label i { color: #8e44ad; }

.info-value {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

/* Special styling for clickable filters */
.info-value.clickable-filter {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-value.clickable-filter::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.info-value.clickable-filter:hover::after {
    width: 100%;
}

.info-value.clickable-filter:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

/* Status Colors - Enhanced Design */
.status-success {
    color: var(--success-color) !important;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid rgba(46, 204, 113, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.status-success::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--success-color);
}

.status-second {
    color: var(--warning-color) !important;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.15));
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid rgba(255, 193, 7, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    animation: pulse-warning 2s infinite;
}

.status-second::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--warning-color);
    animation: warning-blink 1.5s infinite;
    filter: drop-shadow(0 0 4px rgba(255, 193, 7, 0.5));
}

.status-failed {
    color: var(--accent-color) !important;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.1));
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid rgba(231, 76, 60, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.status-failed::before {
    content: '\f057';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--accent-color);
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes warning-blink {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.1);
    }
}

/* Status Item Special Styling */
.info-item.status-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    border: 2px solid rgba(255, 193, 7, 0.2);
    box-shadow: 0 15px 50px rgba(255, 193, 7, 0.2);
    position: relative;
    overflow: hidden;
}

.info-item.status-item::before {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    opacity: 1;
}

.info-item.status-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 70px rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.4);
}

/* Special glow effect for second role status */
.info-item.status-item {
    animation: statusGlow 3s ease-in-out infinite alternate;
}

@keyframes statusGlow {
    0% { box-shadow: 0 15px 50px rgba(255, 193, 7, 0.2); }
    100% { box-shadow: 0 15px 50px rgba(255, 193, 7, 0.4); }
}

/* Enhanced clickable filters styling */
.info-value.clickable-filter {
    position: relative;
    overflow: hidden;
}

.info-value.clickable-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.info-value.clickable-filter:hover::before {
    left: 100%;
}

/* Total Score */
.total-score {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.score-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 2rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    min-width: 250px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.score-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.score-box h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.total-number {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.5rem 0;
    position: relative;
    z-index: 1;
}

.total-percentage {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.score-details {
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Subjects Section */
.subjects-section h4 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

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

.subject-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.subject-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.subject-score {
    margin-bottom: 15px;
}

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

.score-max {
    font-size: 1rem;
    color: #7f8c8d;
    margin-right: 5px;
}

.score-bar {
    height: 8px;
    background: var(--light-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.score-excellent { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.score-good { background: linear-gradient(90deg, #3498db, #5dade2); }
.score-average { background: linear-gradient(90deg, #f39c12, #f7dc6f); }
.score-poor { background: linear-gradient(90deg, #e74c3c, #ec7063); }

.score-percentage {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
    font-weight: 500;
}

/* Enhanced Colleges Section */
.enhanced-colleges-section {
    margin: 40px 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.colleges-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
    position: relative;
}

.colleges-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.colleges-header h4 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.colleges-disclaimer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.disclaimer-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: right;
}

.disclaimer-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.disclaimer-text strong {
    color: #fff;
    font-weight: 700;
}

.highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.colleges-filter-bar {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.colleges-stats {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
}

.colleges-stats span {
    color: #495057;
    font-weight: 700;
}

.enhanced-colleges-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.college-item {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.college-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: all 0.3s ease;
}

.college-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.college-item:hover::before {
    height: 8px;
}

.college-item.available {
    border-color: #28a745;
}

.college-item.available::before {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.college-item.not-available {
    border-color: #dc3545;
    opacity: 0.8;
}

.college-item.not-available::before {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
}

.college-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
}

.college-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.college-detail {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 600;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
}

.college-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.college-status.available {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.college-status.not-available {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 1.2rem;
}

.colleges-footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
}

.footer-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-note p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Legacy Colleges Section (for backwards compatibility) */
.colleges-section h4 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.colleges-section .college-item {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.colleges-section .college-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.colleges-section .college-item.available {
    border-right: 4px solid var(--success-color);
}

.colleges-section .college-item.not-available {
    border-right: 4px solid var(--accent-color);
    opacity: 0.7;
}

.colleges-section .college-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.college-score {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.min-percentage {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Responsive Design for Colleges */
@media (max-width: 768px) {
    .colleges-header {
        padding: 20px 15px;
    }
    
    .colleges-header h4 {
        font-size: 1.5rem;
    }
    
    .colleges-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-options {
        justify-content: center;
    }
    
    .colleges-stats {
        text-align: center;
    }
    
    .enhanced-colleges-grid {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 20px;
    }
    
    .college-item {
        padding: 20px;
    }
    
    .college-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .disclaimer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-note {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Advertisement Styles - ThemeForest Compatible */
.header-advertisement,
.content-advertisement,
.footer-advertisement {
    margin: 20px 0;
    padding: 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-advertisement {
    margin-bottom: 30px;
}

.content-advertisement {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.08);
}

.footer-advertisement {
    margin-top: 30px;
}

/* AdSense Responsive */
.adsbygoogle {
    display: block;
    text-align: center;
}

/* Advertisement Labels */
.header-advertisement::before,
.content-advertisement::before,
.footer-advertisement::before {
    content: "إعلان";
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hide ads in print */
@media print {
    .header-advertisement,
    .content-advertisement,
    .footer-advertisement {
        display: none !important;
    }
}

/* Responsive Advertisement */
@media (max-width: 768px) {
    .header-advertisement,
    .content-advertisement,
    .footer-advertisement {
        margin: 15px 0;
        padding: 10px;
    }
}

/* Navigation */
.navigation {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 12px 25px;
    margin: 0 10px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Instructions */
.instructions {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.instructions h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    margin-bottom: 12px;
    padding-right: 25px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.6;
}

.instructions li:last-child {
    margin-bottom: 0;
}

.instructions li:before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Advanced Statistics Section */
.advanced-statistics-section {
    background: var(--white);
    padding: var(--spacing-4xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    margin-bottom: var(--spacing-4xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.advanced-statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.advanced-statistics-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-3xl);
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-align: center;
    position: relative;
}

.advanced-statistics-section h3::after {
    content: '';
    position: absolute;
    bottom: -var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.statistics-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl);
}

/* Overall Stats */
.overall-stats h4,
.averages-stats h4,
.subject-averages h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-2xl);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    text-align: center;
    position: relative;
}

.overall-stats h4::after,
.averages-stats h4::after,
.subject-averages h4::after {
    content: '';
    position: absolute;
    bottom: -var(--spacing-xs);
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.stat-card {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.stat-card:hover::before {
    height: 8px;
}

.stat-card.success::before {
    background: var(--gradient-success);
}

.stat-card.second::before {
    background: var(--gradient-accent);
}

.stat-card.failed::before {
    background: linear-gradient(135deg, #e53e3e 0%, #ff6b6b 100%);
}

.stat-card .stat-number {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.stat-card .stat-label {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.stat-card .stat-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: var(--spacing-xs);
}

.stat-card .stat-percentage {
    font-size: var(--font-size-lg);
    color: var(--secondary-color);
    font-weight: 500;
    background: rgba(43, 119, 230, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    display: inline-block;
}

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

.stat-card.second .stat-number {
    color: var(--warning-color);
}

.stat-card.failed .stat-number {
    color: var(--accent-color);
}

/* Averages Section */
.averages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.average-card {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.average-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: var(--transition);
}

.average-card.total-average::before {
    background: var(--gradient-primary);
}

.average-card.success-average::before {
    background: var(--gradient-success);
}

.average-card.highest-score::before {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
}

.average-card.lowest-score::before {
    background: var(--gradient-accent);
}

.average-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.average-card:hover::before {
    height: 6px;
}

.average-icon {
    font-size: var(--font-size-4xl);
    opacity: 0.8;
}

.average-content {
    flex: 1;
    text-align: right;
}

.average-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.average-label {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.average-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    opacity: 0.7;
}

/* Subject Averages */
.subject-averages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.subject-average-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.subject-average-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: var(--transition);
}

.subject-average-card.excellent::before {
    background: var(--gradient-success);
}

.subject-average-card.good::before {
    background: var(--gradient-secondary);
}

.subject-average-card.average::before {
    background: var(--gradient-accent);
}

.subject-average-card.poor::before {
    background: linear-gradient(135deg, #e53e3e 0%, #ff6b6b 100%);
}

.subject-average-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.subject-average-card:hover::before {
    height: 5px;
}

.subject-icon {
    font-size: var(--font-size-3xl);
    opacity: 0.8;
}

.subject-content {
    flex: 1;
    text-align: right;
}

.subject-name {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.subject-avg-score {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.subject-max-score {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: var(--spacing-xs);
}

.subject-percentage {
    font-size: var(--font-size-base);
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.subject-progress {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.subject-progress .progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.subject-average-card.excellent .subject-progress .progress-bar {
    background: var(--gradient-success);
}

.subject-average-card.good .subject-progress .progress-bar {
    background: var(--gradient-secondary);
}

.subject-average-card.average .subject-progress .progress-bar {
    background: var(--gradient-accent);
}

.subject-average-card.poor .subject-progress .progress-bar {
    background: linear-gradient(135deg, #e53e3e 0%, #ff6b6b 100%);
}

.subject-student-count {
    text-align: center;
    margin-top: var(--spacing-xs);
}

.subject-student-count small {
    font-size: var(--font-size-xs);
    color: var(--text-color);
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.05);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    display: inline-block;
}

/* Debug and Info Messages */
.debug-info {
    background: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    color: #856404 !important;
    padding: var(--spacing-xl) !important;
    border-radius: var(--border-radius) !important;
    margin: var(--spacing-xl) 0 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.debug-info h5 {
    color: #856404 !important;
    margin-bottom: var(--spacing-lg) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: 600 !important;
}

.debug-info pre {
    background: #f8f9fa !important;
    padding: var(--spacing-md) !important;
    border-radius: 4px !important;
    font-size: var(--font-size-xs) !important;
    overflow-x: auto !important;
    border: 1px solid #e9ecef !important;
    direction: ltr;
    text-align: left;
}

.debug-info ul {
    margin: var(--spacing-md) 0 !important;
    padding-right: var(--spacing-xl) !important;
}

.debug-info li {
    margin-bottom: var(--spacing-xs) !important;
    font-size: var(--font-size-sm) !important;
}

.no-data-message {
    background: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    padding: var(--spacing-xl) !important;
    border-radius: var(--border-radius) !important;
    text-align: center !important;
    margin: var(--spacing-xl) 0 !important;
}

.no-data-message h5 {
    color: #721c24 !important;
    margin-bottom: var(--spacing-lg) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: 600 !important;
}

.no-data-message p {
    color: #721c24 !important;
    margin-bottom: var(--spacing-sm) !important;
    opacity: 0.9;
}

/* FAQ Section */
.faq-section {
    background: var(--white);
    padding: var(--spacing-4xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    margin-bottom: var(--spacing-4xl);
    border: 1px solid var(--border-color);
}

.faq-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-3xl);
    font-size: var(--font-size-4xl);
    font-weight: 700;
    text-align: center;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-lg);
    background: transparent;
    border: none;
    text-align: right;
    cursor: pointer;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light-color);
}

.faq-icon {
    font-size: var(--font-size-2xl);
    color: var(--secondary-color);
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    color: var(--text-color);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 200px;
}

.instructions-content {
    max-width: 1000px;
    margin: 0 auto;
}

.instruction-group {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid var(--secondary-color);
}

.instruction-group h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.instruction-group ul {
    list-style: none;
    padding: 0;
}

.instruction-group li {
    padding: var(--spacing-sm) 0;
    position: relative;
    color: var(--text-color);
    line-height: 1.6;
}

.instruction-group li:before {
    content: '✓';
    color: var(--success-color);
    font-weight: 700;
    margin-left: var(--spacing-sm);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
}

.action-btn {
    padding: var(--spacing-lg) var(--spacing-xl);
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.action-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Professional Footer */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: var(--white);
    margin-top: var(--spacing-5xl);
    position: relative;
    overflow: hidden;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-3xl);
    padding: var(--spacing-5xl) 0 var(--spacing-4xl);
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-xl);
    font-weight: 600;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-secondary);
    border-radius: 1px;
}

/* Company Info Section */
.company-info .footer-logo h3 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-base);
}

.footer-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.footer-stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.footer-stat strong {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.footer-stat span {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
}

/* Quick Links & Services */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-section a:hover {
    color: var(--white);
    transform: translateX(-5px);
}

.link-icon,
.service-icon {
    font-size: var(--font-size-base);
    opacity: 0.8;
}

/* Contact Info */
.contact-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.contact-icon {
    font-size: var(--font-size-lg);
    opacity: 0.8;
    margin-top: var(--spacing-xs);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.contact-details strong {
    color: var(--white);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.contact-details span,
.contact-details a {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--white);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xl) 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.copyright p,
.footer-credits p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-icon {
    font-size: var(--font-size-lg);
}

/* Back to Top Button - Fixed Left Positioned */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-to-top.show {
    display: flex !important;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.back-to-top:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.02);
}

.back-to-top i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
    animation: bounceArrow 1s ease infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-2px);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.back-to-top:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}



/* Responsive Footer */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    }
    
    .footer-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .footer-stat {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .contact-items {
        gap: var(--spacing-md);
    }
    
    .contact-item {
        align-items: center;
    }
    
    .company-info .footer-logo h3 {
        font-size: var(--font-size-2xl);
        text-align: center;
    }
    
    .footer-section h4 {
        text-align: center;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer-main {
        padding: var(--spacing-2xl) 0;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section a {
        justify-content: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
    
    .company-info .footer-logo h3 {
        font-size: var(--font-size-xl);
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .site-header {
        min-height: 60vh;
        padding: var(--spacing-4xl) 0;
    }
    
    .site-title {
        font-size: var(--font-size-4xl);
    }
    
    .site-description {
        font-size: var(--font-size-xl);
    }
    
    .header-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .stat-item {
        min-width: 200px;
    }
    
    .search-section {
        padding: var(--spacing-3xl);
        margin-top: -30px;
        transform: translateY(-30px);
    }
    
    .search-form {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .info-item {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .student-info {
        padding: 30px 0;
        border-radius: 15px;
    }
    
    .student-info::before {
        opacity: 0.3;
    }
    
    .info-label {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .info-value {
        font-size: 1.2rem;
    }
    
    .status-success,
    .status-second,
    .status-failed {
        padding: 6px 12px;
        font-size: 1rem;
    }
    
    .status-success::before,
    .status-second::before,
    .status-failed::before {
        font-size: 1.1rem;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .colleges-grid {
        grid-template-columns: 1fr;
    }
    
    .enhanced-colleges-grid {
        grid-template-columns: 1fr;
    }
    
    .total-number {
        font-size: var(--font-size-4xl);
    }
    
    .college-item {
        padding: var(--spacing-lg);
    }
    
    .nav-btn {
        display: block;
        margin: var(--spacing-sm) auto;
        width: 200px;
    }
    
    .statistics-section .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .statistics-section .stat-card {
        padding: var(--spacing-xl);
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .site-header {
        min-height: 50vh;
        padding: var(--spacing-3xl) 0;
    }
    
    .search-section,
    .results-section,
    .instructions,
    .statistics-section,
    .faq-section {
        padding: var(--spacing-2xl);
    }
    
    .site-title {
        font-size: var(--font-size-3xl);
    }
    
    .site-description {
        font-size: var(--font-size-lg);
    }
    
    .student-name {
        font-size: var(--font-size-3xl);
        margin-bottom: 25px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 25px;
    }
    
    .info-item {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .info-label {
        font-size: 0.95rem;
        margin-bottom: 10px;
        gap: 8px;
    }
    
    .info-label i {
        font-size: 1.1rem;
    }
    
    .info-value {
        font-size: 1.1rem;
    }
    
    .status-success,
    .status-second,
    .status-failed {
        padding: 5px 10px;
        font-size: 0.9rem;
        gap: 6px;
    }
    
    .status-success::before,
    .status-second::before,
    .status-failed::before {
        font-size: 1rem;
    }
    
    .info-item:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .student-info {
        padding: 25px 0;
        border-radius: 12px;
    }
    
    .student-info::before {
        opacity: 0.2;
    }
    
    .info-item.status-item {
        animation: none;
    }
    
    .status-second::before {
        animation: none;
    }
    
    .total-number {
        font-size: var(--font-size-3xl);
    }
    
    .search-section h2,
    .statistics-section h3,
    .faq-section h3 {
        font-size: var(--font-size-2xl);
    }
    
    .statistics-section .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .statistics-section .stat-card .stat-number {
        font-size: var(--font-size-4xl);
    }
    
    .header-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .stat-item {
        min-width: 150px;
        padding: var(--spacing-sm) var(--spacing-lg);
    }
    
    .stat-number {
        font-size: var(--font-size-2xl);
    }
    
    .search-btn {
        min-width: 200px;
    }
    
    .instruction-group {
        padding: var(--spacing-lg);
    }
    
    .faq-question {
        padding: var(--spacing-sm);
        font-size: var(--font-size-base);
    }
}

/* Modern Animation Classes */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { 
        transform: translateY(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from { 
        transform: translateX(-50px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from { 
        transform: translateX(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from { 
        transform: scale(0.8); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.rotate-in {
    animation: rotateIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes rotateIn {
    from { 
        transform: rotate(-10deg) scale(0.8); 
        opacity: 0; 
    }
    to { 
        transform: rotate(0deg) scale(1); 
        opacity: 1; 
    }
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { 
        transform: scale(0.3); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.05); 
    }
    70% { 
        transform: scale(0.9); 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.stagger-animation {
    animation-delay: var(--delay, 0s);
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Animations */
.form-group input:focus,
.form-group select:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    from { transform: scale(1); }
    to { transform: scale(1.02); }
}

/* Hover Animations */
.hover-lift:hover {
    animation: liftUp 0.3s ease-out forwards;
}

@keyframes liftUp {
    to { transform: translateY(-5px); }
}

.hover-glow:hover {
    animation: glowEffect 0.3s ease-out forwards;
}

@keyframes glowEffect {
    to { box-shadow: 0 0 20px rgba(43, 119, 230, 0.4); }
}

/* Staggered Animation Helper */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .navigation,
    .instructions,
    .site-footer {
        display: none;
    }
    
    .results-section {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .site-header {
        background: #fff;
        color: #000;
    }
}

/* Advanced Rankings Analytics Section */
.rankings-analytics-section {
    margin: 40px 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    position: relative;
}

.rankings-analytics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.analytics-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.analytics-title h4 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.analytics-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
}

.analytics-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.legend-color.republic {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.legend-color.local {
    background: linear-gradient(45deg, #4ecdc4, #2980b9);
}

.analytics-main-stats {
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.main-rank-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.main-rank-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.rank-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.rank-content h5 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.rank-number {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rank-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.performance-insights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.insight-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.insight-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.insight-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.insight-content h6 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.insight-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.achievement-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.achievement-badge {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(254, 202, 87, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 3px 10px rgba(254, 202, 87, 0.4); }
    to { box-shadow: 0 5px 20px rgba(254, 202, 87, 0.6); }
}

.achievement-badge.top-student {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.achievement-badge.high-achiever {
    background: linear-gradient(135deg, #4ecdc4, #2980b9);
}

.detailed-rankings {
    padding: 30px;
    background: #fff;
}

.section-title {
    color: #2c3e50;
    margin: 0 0 25px 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.rankings-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.comparison-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.group-title {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.rank-mini-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-mini-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.rank-mini-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.mini-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    flex-shrink: 0;
}

.mini-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.mini-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.mini-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.mini-total {
    font-size: 0.85rem;
    color: #6c757d;
}

.mini-progress {
    grid-column: 1 / -1;
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar.administration {
    background: linear-gradient(45deg, #feca57, #ff9ff3);
}

.progress-bar.school {
    background: linear-gradient(45deg, #48dbfb, #0abde3);
}

.progress-bar.section {
    background: linear-gradient(45deg, #4ecdc4, #2980b9);
}

.progress-bar.combined {
    background: linear-gradient(45deg, #5f27cd, #341f97);
}

.mini-percentage {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 5px;
}



/* Responsive Design */
@media (max-width: 768px) {
    .analytics-main-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rankings-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    

    
    .analytics-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mini-content {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .rank-details {
        flex-direction: column;
        gap: 10px;
    }
}

/* Students Modal */
.students-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-filters {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-stats {
    padding: 20px 30px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-body {
    padding: 20px 30px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

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

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.student-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.student-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.student-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.student-seat-no {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.student-score {
    text-align: center;
    margin: 15px 0;
}

.score-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.score-percentage {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

.student-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.student-status {
    text-align: center;
    margin-top: 15px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-second {
    background: #fff3cd;
    color: #856404;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#current-page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .students-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-filters,
    .modal-stats,
    .modal-body {
        padding: 15px 20px;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .students-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-buttons {
        flex-direction: column;
        gap: 10px;
    }
} 

/* Responsive Design for Back to Top Button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 16px;
    }
}

/* Filter Chips for Name Search Modal */
.filter-chip {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 8px 4px 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-chip:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filter-chip.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-chip.status-success {
    border-color: #28a745;
}

.filter-chip.status-success.active {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.filter-chip.status-second {
    border-color: #ffc107;
}

.filter-chip.status-second.active {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.filter-chip.status-failed {
    border-color: #dc3545;
}

.filter-chip.status-failed.active {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

/* Filter Containers */
#status-stats-container,
#sections-filters-container,
#admin-filters-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#status-stats-container h5,
#sections-filters-container h5,
#admin-filters-container h5 {
    margin: 0 0 12px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
}

/* Enhanced Modal Stats */
.modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.modal-stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.modal-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

/* Enhanced Students Grid for Name Search */
.students-grid.name-search .student-card {
    border-right: 4px solid transparent;
}

.students-grid.name-search .student-card:hover {
    border-right-color: #667eea;
}

.students-grid.name-search .student-card .student-name {
    color: #667eea;
    font-weight: 600;
}

/* Responsive Filter Chips */
@media (max-width: 768px) {
    .filter-chip {
        padding: 6px 12px;
        font-size: 13px;
        margin: 3px 6px 3px 0;
    }
    
    #status-stats-container,
    #sections-filters-container,
    #admin-filters-container {
        padding: 12px;
        margin: 15px 0;
    }
    
    .modal-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* Search Info Message */
.search-info {
    text-align: center;
    padding: 40px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    margin: 20px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 500;
    border: 2px dashed rgba(102, 126, 234, 0.3);
}

.search-info i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1); 
    }
}

/* Live Search Enhancements */
.filter-group {
    position: relative;
}

#student-search.searching {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.live-search-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 14px;
    z-index: 10;
}

/* Extended Stats Styling */
.extended-stats-container {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.extended-stats-container .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.extended-stats-container .stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.success-rate .stat-value {
    color: #28a745;
}

.common-score .stat-value {
    color: #fd7e14;
}

.median-score .stat-value {
    color: #6f42c1;
}

/* Stats Distribution */
.stats-distribution {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(13, 202, 240, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.stats-distribution h5 {
    margin: 0 0 15px 0;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.distribution-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    min-width: 80px;
    font-weight: 500;
    color: #555;
    font-size: 0.9em;
}

.bar-container {
    flex: 1;
    height: 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 12px;
    transition: width 1.5s ease-out;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.bar-fill.animated {
    animation: barGlow 2s ease-in-out infinite alternate;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes barGlow {
    0% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
    100% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.8); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.bar-count {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #28a745;
    font-size: 0.9em;
}

/* Enhanced Modal Stats Grid */
.modal-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.modal-stats .stat-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.modal-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

.modal-stats .stat-label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    font-weight: 500;
}

.modal-stats .stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* Filter Chips Enhancements */
.filter-chip {
    display: inline-block;
    padding: 8px 15px;
    margin: 4px;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    color: #495057;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    user-select: none;
}

.filter-chip:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-chip.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.filter-chip.status-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #c3e6cb;
}

.filter-chip.status-second {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffeaa7;
}

.filter-chip.status-failed {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .extended-stats-container,
    .stats-distribution {
        margin: 10px 0;
        padding: 12px;
    }
    
    .distribution-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .bar-label,
    .bar-count {
        min-width: auto;
        width: 100%;
    }
    
    .bar-container {
        width: 100%;
        height: 20px;
    }
    
    .modal-stats .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .modal-stats .stat-value {
        font-size: 1.5em;
    }
}

/* تحسين عنصر mark للتمييز */
mark.search-highlight {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(253, 203, 110, 0.5);
    box-shadow: 0 2px 4px rgba(253, 203, 110, 0.3);
    text-shadow: none;
    display: inline;
    word-break: keep-all;
    white-space: nowrap;
    position: relative;
}

/* تأثير تمييز أكثر وضوحاً للعنصر mark */
mark.search-highlight::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fdcb6e, #ffeaa7);
    border-radius: 6px;
    z-index: -1;
    opacity: 0.3;
}

/* تمييز mark في الأسماء */
.student-name mark.search-highlight {
    background: linear-gradient(135deg, #a8e6cf, #88d8a3);
    color: #2d5016;
    border-color: rgba(136, 216, 163, 0.7);
    box-shadow: 0 2px 6px rgba(136, 216, 163, 0.4);
}

/* تحسين الرؤية في الثيمات الداكنة للعنصر mark */
@media (prefers-color-scheme: dark) {
    mark.search-highlight {
        background: linear-gradient(135deg, #f39c12, #e67e22);
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    .student-name mark.search-highlight {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: #fff;
    }
}

/* Professional Search Form Redesign */
.professional-search {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.professional-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 24px 24px 0 0;
}

/* Search Method Group */
.search-method-group {
    margin-bottom: 32px;
}

.method-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Radio Group Styling */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.radio-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-label {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(102, 126, 234, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-label::before {
    opacity: 1;
}

.radio-label:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.radio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    font-size: 1.2em;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-label .radio-icon {
    background: linear-gradient(135deg, #5a67d8, #667eea);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.radio-desc {
    font-size: 0.9em;
    color: #718096;
    transition: color 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-label .radio-title {
    color: #667eea;
}

.radio-option input[type="radio"]:checked + .radio-label .radio-desc {
    color: #5a67d8;
}

/* Search Input Group */
.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-container {
    width: 100%;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.label-icon {
    color: #667eea;
    font-size: 1em;
}

.input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.search-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Cairo', sans-serif;
    color: #2c3e50;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.search-input:focus + .input-focus-border {
    width: 100%;
}

.input-help {
    font-size: 0.9em;
    color: #718096;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-help::before {
    content: '💡';
    font-size: 0.8em;
}

/* Professional Search Button */
.search-btn {
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2em;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-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.6s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

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

.search-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-icon {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.search-btn:hover .btn-icon {
    transform: scale(1.1);
}

.btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .professional-search {
        padding: 24px 20px;
        border-radius: 20px;
        margin: 0 10px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .radio-label {
        padding: 16px;
        gap: 12px;
    }
    
    .radio-icon {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .radio-title {
        font-size: 1em;
    }
    
    .radio-desc {
        font-size: 0.85em;
    }
    
    .search-input {
        padding: 16px 18px;
        font-size: 1em;
    }
    
    .search-btn {
        padding: 18px 24px;
        font-size: 1.1em;
    }
    
    .method-title {
        font-size: 1.2em;
        margin-bottom: 16px;
    }
    
    .search-input-group {
        gap: 20px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .professional-search {
        padding: 20px 16px;
        margin: 0 5px;
    }
    
    .radio-label {
        padding: 14px;
        gap: 10px;
    }
    
    .radio-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-btn {
        padding: 16px 20px;
        font-size: 1em;
    }
}

/* تحسين المسافة بين أيقونات Font Awesome والنص العربي */
.info-label i {
    margin-left: 8px; /* مسافة بين الأيقونة والنص العربي */
}

.status-badge i {
    margin-left: 6px; /* مسافة في حالة الطلاب */
}

.label-icon {
    margin-left: 6px; /* مسافة في labels */
}

.radio-icon i {
    margin-left: 0; /* لا مسافة في الأيقونات المتوسطة */
}

.btn-icon {
    margin-left: 8px; /* مسافة في الأزرار */
}

/* تحسين مسافة أيقونات المعلومات */
.detail-label {
    display: flex;
    align-items: center;
    gap: 6px; /* مسافة موحدة */
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 6px; /* مسافة في الإحصائيات */
}

.contact-icon {
    margin-left: 8px; /* مسافة في معلومات الاتصال */
}

/* مسافة خاصة للأيقونات في البحث */
.search-info i {
    margin-bottom: 8px; /* مسافة عمودية */
}

/* مسافة في أزرار التنقل */
.nav-btn i {
    margin: 0 6px; /* مسافة في جميع الاتجاهات */
}