/**
 * Frontend Styles for Student Exam Results Viewer
 * 
 * Modern, responsive styling with Bootstrap-inspired design
 * Color palette: Light gray backgrounds with blue accents
 */

/* ========================================
   Search Container
   ======================================== */

.serv-search-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.serv-search-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    transition: box-shadow 0.3s ease;
}

.serv-search-card:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.serv-search-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-align: center;
}

.serv-search-description {
    font-size: 16px;
    color: #7f8c8d;
    text-align: center;
    margin: 0 0 30px 0;
}

/* ========================================
   Form Styles
   ======================================== */

.serv-form {
    margin-bottom: 20px;
}

.serv-form-group {
    margin-bottom: 20px;
}

.serv-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
}

.serv-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.serv-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.serv-input::placeholder {
    color: #bdc3c7;
}

/* ========================================
   Button Styles
   ======================================== */

.serv-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.serv-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
}

.serv-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.serv-btn-primary:active {
    transform: translateY(0);
}

.serv-btn-loader {
    display: inline-block;
}

/* ========================================
   Result Display
   ======================================== */

#serv-result-container {
    margin-top: 30px;
}

.serv-result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

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

.serv-result-header {
    margin-bottom: 25px;
}

.serv-result-title {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
}

.serv-result-title::before {
    content: "✓";
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-size: 18px;
}

.serv-student-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.serv-student-info p {
    margin: 8px 0;
    font-size: 15px;
    color: #2c3e50;
}

.serv-student-info strong {
    color: #34495e;
    font-weight: 600;
}

/* ========================================
   Results Table
   ======================================== */

.serv-result-body {
    margin-top: 20px;
}

.serv-result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.serv-result-table thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.serv-result-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.serv-result-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.serv-result-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.serv-result-table tbody tr:hover {
    background-color: #e8f4f8;
}

.serv-result-table tbody tr:last-child {
    border-bottom: none;
}

.serv-result-table td {
    padding: 15px;
    font-size: 15px;
    color: #2c3e50;
}

.serv-grade-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* ========================================
   Error Message
   ======================================== */

.serv-error-message {
    background: #fff5f5;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #c0392b;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .serv-search-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .serv-search-card {
        padding: 25px;
    }
    
    .serv-search-title {
        font-size: 24px;
    }
    
    .serv-result-card {
        padding: 20px;
    }
    
    .serv-result-table {
        font-size: 14px;
    }
    
    .serv-result-table th,
    .serv-result-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .serv-search-title {
        font-size: 20px;
    }
    
    .serv-search-card {
        padding: 20px;
    }
    
    .serv-result-table {
        display: block;
        overflow-x: auto;
    }
    
    .serv-student-info p {
        font-size: 14px;
    }
}
