/* Online Quiz System - Frontend Styles */

.oqs-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

/* Login Box */
.oqs-login-box,
.oqs-welcome-box,
.oqs-quiz-box,
.oqs-results-box,
.oqs-history-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 40px;
}

.oqs-login-box h2,
.oqs-welcome-box h2,
.oqs-quiz-box h2,
.oqs-results-box h2,
.oqs-history-box h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

/* Steps */
.oqs-step {
    display: none;
}

.oqs-step.active {
    display: block;
}

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

.oqs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.oqs-form-group input[type="email"],
.oqs-form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.oqs-form-group input[type="email"]:focus,
.oqs-form-group input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Buttons */
.oqs-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.oqs-btn-primary {
    background: #4CAF50;
    color: white;
}

.oqs-btn-primary:hover {
    background: #45a049;
}

.oqs-btn-secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.oqs-btn-secondary:hover {
    background: #5a6268;
}

.oqs-btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.oqs-btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Messages */
.oqs-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

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

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

/* Header */
.oqs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.oqs-user-info {
    font-size: 14px;
    color: #666;
}

/* Quiz Info */
.oqs-quiz-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.oqs-quiz-info h3 {
    margin-top: 0;
    color: #333;
}

.oqs-quiz-info ul {
    margin: 0;
    padding-left: 20px;
}

.oqs-quiz-info li {
    margin-bottom: 10px;
    color: #555;
}

/* Start Section */
.oqs-start-section {
    text-align: center;
    margin-top: 30px;
}

/* Quiz Header */
.oqs-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.oqs-progress-info {
    font-size: 14px;
    color: #666;
}

.oqs-progress-info span {
    margin-right: 20px;
}

.oqs-timer {
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
}

.oqs-timer.warning {
    color: #ff9800;
}

.oqs-timer.danger {
    color: #f44336;
}

/* Progress Bar */
.oqs-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.oqs-progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
}

/* Question */
.oqs-question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.oqs-question-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

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

/* Options */
.oqs-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oqs-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.oqs-option:hover {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.oqs-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
}

.oqs-option-text {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.oqs-option input[type="radio"]:checked + .oqs-option-text {
    font-weight: 600;
}

/* Form Actions */
.oqs-form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Results */
.oqs-score-circle {
    text-align: center;
    margin: 40px 0;
}

.oqs-score-value {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 10px;
}

.oqs-score-value.pass {
    color: #4CAF50;
}

.oqs-score-value.fail {
    color: #f44336;
}

.oqs-score-label {
    font-size: 24px;
    font-weight: 600;
    color: #666;
}

.oqs-results-details {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.oqs-result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.oqs-result-item:last-child {
    border-bottom: none;
}

.oqs-result-label {
    font-weight: 600;
    color: #555;
}

.oqs-result-value {
    color: #333;
    font-weight: 500;
}

.oqs-results-actions {
    text-align: center;
}

/* History Table */
.oqs-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.oqs-history-table th,
.oqs-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.oqs-history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.oqs-history-table tr:hover {
    background: #f8f9fa;
}

.oqs-score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.oqs-score-badge.pass {
    background: #d4edda;
    color: #155724;
}

.oqs-score-badge.fail {
    background: #f8d7da;
    color: #721c24;
}

.oqs-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.oqs-status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.oqs-status-badge.in_progress {
    background: #fff3cd;
    color: #856404;
}

.oqs-no-data {
    text-align: center;
    color: #666;
    padding: 40px;
}

.oqs-history-actions {
    text-align: center;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .oqs-container {
        padding: 10px;
    }
    
    .oqs-login-box,
    .oqs-welcome-box,
    .oqs-quiz-box,
    .oqs-results-box,
    .oqs-history-box {
        padding: 20px;
    }
    
    .oqs-quiz-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .oqs-timer {
        margin-top: 10px;
    }
    
    .oqs-history-table {
        font-size: 14px;
    }
    
    .oqs-history-table th,
    .oqs-history-table td {
        padding: 8px;
    }
}
