* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.search-container {
    padding: 40px 30px;
    text-align: center;
}

.search-form {
    max-width: 450px;
    margin: 0 auto 30px;
    position: relative;
}

.search-label {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.search-input {
    width: 100%;
    padding: 16px 25px;
    font-size: 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.4s ease;
    background-color: #f9f9f9;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #2a5298;
    background-color: white;
    box-shadow: 0 5px 20px rgba(42, 82, 152, 0.15);
    transform: translateY(-2px);
}

.search-button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 16px 45px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

.search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.4);
}

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

.results-container {
    padding: 0 30px 40px;
}

/* ===== INFORMASI SISWA YANG RAPI ===== */
.student-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 0 auto 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: relative;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.student-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
}

.student-info h3 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.student-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2a5298, transparent);
}

/* INFO SISWA DALAM SATU BARIS */
.student-details {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.detail-item {
    text-align: center;
    min-width: 200px;
    flex: 1;
}

.detail-icon {
    font-size: 2.2rem;
    color: #2a5298;
    margin-bottom: 12px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    word-break: break-word;
}

/* ===== NILAI MATA PELAJARAN 2 PER BARIS ===== */
.grades-container {
    margin-bottom: 40px;
}

.grades-container h3 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.grades-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 40%;
    width: 20%;
    height: 3px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    border-radius: 2px;
}

/* Grid untuk 2 kolom (2 nilai per baris) */
.grades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grade-box {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grade-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grade-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.grade-box:hover::before {
    opacity: 1;
}

.subject {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.score {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    position: relative;
    display: inline-block;
}

.score::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2a5298, transparent);
    opacity: 0.5;
}

/* Kotak rata-rata khusus */
.average-box {
    grid-column: span 2; /* Rata-rata memenuhi 2 kolom */
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 2px solid #c7d2fe;
}

.average-box .subject {
    color: #4338ca;
    font-size: 1.4rem;
}

.average-box .score {
    color: #4338ca;
    font-size: 2.8rem;
}

/* ===== STATUS KELULUSAN ===== */
.status-container {
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.status-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
}

.status-label {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #555;
    letter-spacing: 1px;
}

.status-value {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    padding: 10px 40px;
    border-radius: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-value::after {
    
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

.status-lulus {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
    border: 3px solid rgba(40, 167, 69, 0.2);
}

.status-tidak-lulus {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
    border: 3px solid rgba(220, 53, 69, 0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .search-input {
        padding: 14px 20px;
        font-size: 1.1rem;
    }
    
    .search-button {
        padding: 14px 35px;
        font-size: 1.1rem;
    }
    
    .student-info {
        padding: 25px 20px;
        margin-bottom: 30px;
    }
    
    /* INFO SISWA VERTIKAL DI MOBILE */
    .student-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .detail-item {
        min-width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .detail-item:last-child {
        border-bottom: none;
    }
    
    /* NILAI 1 KOLOM DI MOBILE */
    .grades-grid {
        grid-template-columns: 1fr;
    }
    
    .average-box {
        grid-column: span 1;
    }
    
    .grade-box {
        min-height: 160px;
        padding: 20px 15px;
    }
    
    .subject {
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    .score {
        font-size: 2.2rem;
    }
    
    .average-box .subject {
        font-size: 1.3rem;
    }
    
    .average-box .score {
        font-size: 2.5rem;
    }
    
    .status-container {
        padding: 30px 20px;
    }
    
    .status-value {
        font-size: 3rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    .header {
        padding: 25px 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 30px 20px;
    }
    
    .results-container {
        padding: 0 20px 30px;
    }
    
    .student-info h3,
    .grades-container h3 {
        font-size: 1.5rem;
    }
    
    .detail-label {
        font-size: 0.85rem;
    }
    
    .detail-value {
        font-size: 1.2rem;
    }
    
    .status-value {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
}

/* ===== ELEMEN LAINNYA ===== */
.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    border-left: 5px solid #dc3545;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    color: #2a5298;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 50px;
    background-color: rgba(42, 82, 152, 0.05);
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: rgba(42, 82, 152, 0.1);
    text-decoration: none;
    transform: translateY(-2px);
}

.footer {
    text-align: center;
    padding: 25px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

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

.student-info, .grades-container, .status-container {
    animation: fadeIn 0.6s ease-out forwards;
}

.student-info {
    animation-delay: 0.1s;
}

.grades-container {
    animation-delay: 0.2s;
}

.status-container {
    animation-delay: 0.3s;
}



/* Tambahkan style ini di bagian akhir styles.css */

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 35px 30px;
    text-align: center;
    border-radius: 15px 15px 0 0;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.footer {
    text-align: center;
    padding: 25px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 0 0 15px 15px;
}

/* Responsive container */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .header {
        padding: 25px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
}