* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

/* Login Form Styles */
.login-section {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.login-button:hover {
    background: #764ba2;
}

.login-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Header Bar */
.header-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.fetch-button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.fetch-button:hover {
    background: #764ba2;
}

.fetch-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.logout-button {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.logout-button:hover {
    background: #c82333;
}

.exams-list {
    margin-top: 20px;
}

.exam-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    transition: background 0.3s;
}

.exam-item:hover {
    background: #f0f0f0;
}

.exam-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exam-subject {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.exam-info {
    color: #666;
    font-size: 14px;
    display: flex;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-wrapper label {
    cursor: pointer;
    font-weight: 500;
    color: #333;
    user-select: none;
}

.status-message {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.loading {
    text-align: center;
    display: none;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.no-exams {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 16px;
}

.notes-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

.notes-section label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.exam-notes {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

.exam-notes:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.exam-notes::placeholder {
    color: #999;
}

@media (max-width: 768px) {
    .exam-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkbox-group {
        width: 100%;
        justify-content: flex-start;
    }
    
    .exam-notes {
        min-height: 80px;
    }
}
