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

body {
    background-color: #f8f9fa;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 0.75rem; /* Reduced by 50% */
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem; /* Adjust font size */
}

.header p {
    font-size: 0.875rem; /* Adjust font size */
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.student-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 800px;
}

.student-card {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #2c3e50;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-left-color: #3498db;
}

.student-card h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    flex: 2;
}

.student-card .student-info {
    display: flex;
    gap: 2rem;
    flex: 3;
    justify-content: space-between;
}

.student-card .student-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

.student-card .student-action {
    color: #3498db;
    font-size: 0.9rem;
    font-weight: 500;
}

.marksheet {
    background: white;
    border-radius: 8px;
    padding: 1.6rem; /* Reduced by 20% */
    margin-top: 0.8rem; /* Reduced by 20% */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

th, td {
    padding: 9.6px; /* Reduced by 20% */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: white;
}

.back-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px; /* Reduced by 20% */
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 0.8rem; /* Reduced by 20% */
}

.highlight {
    background-color: #f1f8ff;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.search-box {
    margin-bottom: 1rem;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
}

.highlight-box {
    background-color: #f1f8ff;
    font-weight: bold;
    padding: 12px; /* Reduced by 20% */
    border-radius: 8px;
    margin-top: 16px; /* Reduced by 20% */
    display: flex;
    justify-content: space-between;
}

.highlight-item {
    flex: 1;
    margin: 0 8px; /* Reduced by 20% */
    text-align: center;
}

.highlight-item p {
    margin: 4px 0; /* Reduced by 20% */
}

.data-count {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 800px;
}

.data-count strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.data-count small {
    color: #6c757d;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 0 8px; /* Reduced by 20% */
    }

    .student-card {
        padding: 0.8rem; /* Reduced by 20% */
    }

    .marksheet {
        padding: 1.2rem; /* Reduced by 20% */
    }

    th, td {
        padding: 6.4px; /* Reduced by 20% */
    }

    .back-btn {
        padding: 6.4px 12.8px; /* Reduced by 20% */
    }

    .highlight {
        padding: 8px; /* Reduced by 20% */
    }

    .highlight-box {
        flex-direction: column;
        align-items: center;
    }

    .highlight-item {
        margin: 8px 0; /* Reduced by 20% */
    }

    .data-count {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .data-count strong {
        font-size: 1rem;
    }
    
    .data-count small {
        font-size: 0.8rem;
    }
}

/* Mobile responsive styles for student list */
@media (max-width: 768px) {
    .student-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .student-card h3 {
        margin-bottom: 0.5rem;
        flex: none;
    }
    
    .student-card .student-info {
        width: 100%;
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
        flex: none;
    }
    
    .student-card .student-action {
        align-self: flex-end;
        color: #3498db;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .student-list {
        max-width: 100%;
    }
    
    .student-card {
        border-radius: 6px;
        padding: 0.75rem;
    }
    
    .student-card h3 {
        font-size: 1rem;
    }
    
    .student-card .student-info p {
        font-size: 0.8rem;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    #marksheet, #marksheet * {
        visibility: visible;
    }
    #marksheet {
        position: absolute;
        left: 0;
        top: 0px;
        width: 100%;
        padding: 0px;
        margin: 0px;
        box-sizing: border-box;
    }
    /* Removed pseudo-element that duplicated pad.png; pad image now handled via inline #padHeader shown only during print/PDF */
}

.report-title {
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

/* reCAPTCHA styles */
.g-recaptcha {
    margin: 1rem auto;
    display: flex;
    justify-content: center;
}
