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

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    direction: rtl;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #054239 0%, #076b5a 50%, #054239 100%);
    padding: 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(5, 66, 57, 0.15);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(184, 158, 108, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.logo-section {
    text-align: center;
    position: relative;
    padding: 20px;
    transition: all 0.4s ease;
}

.logo-section:hover {
    transform: translateY(-5px);
}

.logo {
    width: 220px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3)) brightness(1.1);
    transition: all 0.4s ease;
    border-radius: 10px;
}

.logo:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)) brightness(1.2);
}

/* Main Content */
.main-content {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.page-title-section {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #054239;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 3px;
    background: linear-gradient(90deg, #b89e6c, #d4b876);
    border-radius: 2px;
}

.academic-year {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

/* Search Form */
.search-form-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 15px 50px rgba(5, 66, 57, 0.12), 
                0 5px 20px rgba(184, 158, 108, 0.08);
    border: 2px solid rgba(184, 158, 108, 0.2);
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.search-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #054239, #b89e6c, #d4b876, #054239);
    background-size: 200% 100%;
    animation: gradientMove 4s ease-in-out infinite;
}

.search-form-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(184, 158, 108, 0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #054239;
    font-size: 1.1rem;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b89e6c, #d4b876);
    transition: width 0.3s ease;
}

.form-group:focus-within .form-label::after {
    width: 100%;
}

.form-select,
.form-input {
    padding: 18px 25px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1.05rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #b89e6c;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 0 0 4px rgba(184, 158, 108, 0.15),
                0 8px 25px rgba(5, 66, 57, 0.1);
    transform: translateY(-3px);
}

.form-select:hover,
.form-input:hover {
    border-color: #054239;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(5, 66, 57, 0.08);
}

.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.search-btn,
.reset-btn {
    flex: 1;
    padding: 18px 30px;
    border: none;
    border-radius: 15px;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn::before,
.reset-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;
}

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

.search-btn {
    background: linear-gradient(135deg, #054239 0%, #076b5a 50%, #054239 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(5, 66, 57, 0.3);
}

.search-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(5, 66, 57, 0.4);
}

.search-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.reset-btn {
    background: linear-gradient(135deg, #b89e6c 0%, #d4b876 50%, #b89e6c 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(184, 158, 108, 0.3);
}

.reset-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(184, 158, 108, 0.4);
}

.reset-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Results Section */
.results-section {
    margin-top: 40px;
    animation: fadeInUp 0.6s ease;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(5, 66, 57, 0.1);
    border: 1px solid rgba(184, 158, 108, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #054239;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.results-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #b89e6c, #d4b876);
    border-radius: 2px;
}

.result-card {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, #054239 0%, #076b5a 100%);
    color: white;
    padding: 15px 20px;
}

.result-content {
    padding: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.result-label {
    font-weight: 600;
    color: #054239;
}

.result-value {
    font-weight: 500;
    color: #333;
}

.result-value.success {
    color: #28a745;
    font-weight: 700;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #054239 0%, #076b5a 100%);
    color: white;
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #b89e6c;
}

.footer-year {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .logo-section {
        padding: 15px;
    }
    
    .logo {
        width: 180px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .search-form-container {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-btn,
    .reset-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

/* Result Status Styles */
.result-value.success {
    color: #28a745;
    font-weight: 700;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #28a745;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.result-value.success::before {
    content: '✓';
    margin-left: 8px;
    font-weight: bold;
}

.result-value.failed {
    color: #dc3545;
    font-weight: 700;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #dc3545;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.result-value.failed::before {
    content: '✗';
    margin-left: 8px;
    font-weight: bold;
}

.result-value.not-found {
    color: #6c757d;
    font-weight: 600;
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #6c757d;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.result-value.not-found::before {
    content: '?';
    margin-left: 8px;
    font-weight: bold;
}

/* Animation for result status */
.result-value.success,
.result-value.failed,
.result-value.not-found {
    animation: resultPulse 0.6s ease-out;
    transform-origin: center;
}

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

/* Enhanced result card styling */
.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #054239, #076b5a, #b89e6c);
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.result-header h4 {
    color: #054239;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

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

.result-item:hover {
    background: rgba(5, 66, 57, 0.02);
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 10px;
}

.result-label {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.result-value {
    font-weight: 500;
    color: #212529;
    font-size: 1.1rem;
    text-align: left;
}

