* {
    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: 1200px;
    margin: 0 auto;
}

.login-card, .dashboard-header, .subjects-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-card {
    max-width: 400px;
    margin: 100px auto;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    width: auto;
    padding: 8px 16px;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.error-message {
    color: #dc3545;
    margin-top: 15px;
    text-align: center;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.subject-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.subject-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.subject-card p {
    color: #666;
    font-size: 14px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.exam-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    color: #dc3545;
}

.exam-progress {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    background: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s;
}

.question-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.option:hover {
    background: #f5f5f5;
}

.option input {
    width: auto;
    margin-right: 10px;
}

.option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.exam-actions {
    text-align: center;
    margin-top: 20px;
}

.results-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
}

.score-card {
    text-align: center;
    margin-bottom: 30px;
}

.score {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
}

.result-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px;
}

.result-correct {
    color: #28a745;
    font-weight: bold;
}

.result-wrong {
    color: #dc3545;
    font-weight: bold;
}

@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 10px;
    }
}