/* Natega System - Main Styles */

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-start: var(--primary-color);
    --gradient-end: #00c6ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-logo {
    max-height: 50px;
    width: auto;
}

/* Main Container */
.main-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

/* Search Card */
.search-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-card h1 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.search-card .subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    text-align: right;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

.form-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    font-family: inherit;
    direction: rtl;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Result Card */
.result-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease-out;
}

.result-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.student-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 15px 0;
}

.student-school {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: var(--light-color);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.info-item .label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.info-item .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Grades Table */
.grades-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.grades-table th,
.grades-table td {
    padding: 16px 20px;
    text-align: center;
}

.grades-table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.grades-table thead th:first-child {
    border-radius: 0 14px 0 0;
}

.grades-table thead th:last-child {
    border-radius: 14px 0 0 0;
}

.grades-table tbody tr {
    transition: all 0.3s ease;
}

.grades-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.grades-table tbody tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
}

.grades-table tbody td {
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 20px;
}

.status-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-fail {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

/* Total Score */
.total-score {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    border-radius: 20px;
    margin-top: 30px;
}

.total-score .label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.total-score .value {
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

/* Alert Messages */
.alert {
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.alert-danger {
    background: #ffe6e6;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Button */
.btn-print {
    background: var(--secondary-color);
    color: white;
    margin-top: 20px;
}

.btn-print:hover {
    background: var(--dark-color);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        margin: 20px;
        padding: 10px;
    }
    
    .search-card, .result-card {
        padding: 30px 20px;
    }
    
    .search-card h1 {
        font-size: 1.6rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .grades-table th, .grades-table td {
        padding: 12px 10px;
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .site-header, .btn-print, .btn-primary {
        display: none !important;
    }
    
    .result-card {
        box-shadow: none;
        padding: 20px;
    }
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.site-footer a {
    color: white;
    text-decoration: none;
}
