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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

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

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Quiz Widget */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.quiz-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quiz-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.quiz-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quiz-info-item {
    background: #f7fafc;
    padding: 10px 15px;
    border-radius: 5px;
}

.quiz-info-item strong {
    color: #667eea;
}

/* Question Card */
.question-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.question-number {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.question-text {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.question-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Answer Choices */
.choices-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.choice-item:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.choice-item.selected {
    border-color: #667eea;
    background: #ebf4ff;
}

.choice-item input[type="radio"],
.choice-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.choice-content {
    flex: 1;
}

.choice-text {
    color: #333;
    font-size: 16px;
}

.choice-image {
    max-width: 200px;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

/* Navigation Buttons */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

/* Timer */
.timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    z-index: 1000;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Results Page */
.results-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.results-container h2 {
    color: #333;
    margin-bottom: 20px;
}

.score-display {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.stat-box .label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-box .value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

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

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

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #5568d3;
}

.btn-primary {
    background: #667eea;
    width: 100%;
}

.btn-secondary {
    background: #718096;
}

.btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

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

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .quiz-container {
        padding: 10px;
    }
    
    .quiz-header,
    .question-card,
    .results-container {
        padding: 20px;
    }
    
    .timer {
        position: static;
        margin-bottom: 20px;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
}
