/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Authentication styles */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-container {
    padding: 20px;
}

.form-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    min-height: 100px;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.switch-form {
    text-align: center;
    margin-top: 15px;
}

.switch-form a {
    color: #3498db;
    text-decoration: none;
}

.switch-form a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Exam styles */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
}

.exam-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

.question-nav {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.nav-button {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: #f0f0f0;
}

.nav-button.answered {
    background-color: #2ecc71;
    color: white;
}

.nav-button.marked {
    background-color: #f1c40f;
    color: white;
}

.nav-button.current {
    border: 2px solid #3498db;
}

.nav-legend {
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
}

.legend-color.answered {
    background-color: #2ecc71;
}

.legend-color.marked {
    background-color: #f1c40f;
}

.legend-color.current {
    border: 2px solid #3498db;
}

.question-area {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-container {
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.options-list {
    list-style: none;
}

.option-item {
    margin-bottom: 10px;
}

.option-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

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

.question-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* Admin styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.question-list, .user-list {
    margin-bottom: 20px;
}

.question-item, .user-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.question-item h3, .user-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.question-actions, .user-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Button styles */
.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-warning {
    background-color: #f1c40f;
    color: white;
}

.btn-warning:hover {
    background-color: #f39c12;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .exam-container, .admin-container {
        grid-template-columns: 1fr;
    }
    
    .question-nav {
        order: 2;
    }
    
    .question-area {
        order: 1;
    }
    
    .nav-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .exam-header, .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .nav-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}

/* True/False question styles */
.true-false-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.true-false-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.true-false-option:hover {
    background-color: #f0f0f0;
}

.true-false-option input[type="radio"] {
    margin: 0;
}

/* Exam settings styles */
.exam-settings {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.exam-settings h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.time-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.time-input input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* User results styles */
.user-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.user-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-header h3 {
    margin: 0;
    color: #2c3e50;
}

.attempt-count {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.attempts-list {
    padding: 20px;
}

.attempt-item {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
}

.attempt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.attempt-date {
    color: #666;
    font-size: 0.9em;
}

.attempt-score {
    font-weight: bold;
    color: #2c3e50;
}

.attempt-details {
    margin-bottom: 15px;
}

.attempt-details p {
    margin: 5px 0;
    color: #666;
}

.attempt-actions {
    display: flex;
    justify-content: flex-end;
} 