/* Admin-specific styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Form styles */
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Media options */
.media-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f8f9ff;
}

/* Media upload */
.media-upload {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 2px dashed #667eea;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.media-preview {
    margin-top: 15px;
    text-align: center;
}

.media-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.media-preview audio {
    width: 100%;
    max-width: 400px;
}

/* Answer inputs */
#answersContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.answer-input-group:hover {
    border-color: #667eea;
}

.answer-input-group input[type="radio"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.answer-input-group input[type="text"] {
    flex: 1;
    border: none;
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 1rem;
}

.answer-input-group input[type="text"]:focus {
    outline: 2px solid #667eea;
}

.correct-indicator {
    color: #4caf50;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.answer-input-group:has(input[type="radio"]:checked) {
    border-color: #4caf50;
    background: #e8f5e9;
}

.answer-input-group:has(input[type="radio"]:checked) .correct-indicator {
    opacity: 1;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* Success message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #4caf50;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.list-header .btn {
    width: auto;
    padding: 10px 20px;
}

.questions-list {
    max-height: 600px;
    overflow-y: auto;
}

.question-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.question-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.question-id {
    font-size: 0.85rem;
    color: #999;
    font-family: monospace;
}

.question-media {
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.question-media img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
}

.question-answers {
    margin-top: 15px;
}

.question-answers h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.answer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-item {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 0.95rem;
}

.answer-item.correct {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    font-weight: 600;
}

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

.btn-delete {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #d32f2f;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .media-options {
        flex-direction: column;
    }
    
    .list-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .list-header .btn {
        width: 100%;
    }
}
