/* Reset dan base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7f9;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
.header-tools {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 0;
    border-bottom: 2px solid #e1e4e8;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-tools h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

/* Button styles */
.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Warna khusus untuk tombol sesuai permintaan */
.btn-soal {
    background-color: #3498db;
    color: white;
}

.btn-soal:hover {
    background-color: #2980b9;
}

.btn-preview {
    background-color: #f39c12;
    color: white;
}

.btn-preview:hover {
    background-color: #e67e22;
}

.btn-download {
    background-color: #2ecc71;
    color: white;
}

.btn-download:hover {
    background-color: #27ae60;
}

.btn-new {
    background-color: #e74c3c;
    color: white;
}

.btn-new:hover {
    background-color: #c0392b;
}

/* Form styles */
.content {
    padding: 20px 0;
}

.quiz-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quiz-info label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
}

.quiz-info input[type="text"],
.quiz-info textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    font-family: inherit;
}

.quiz-info textarea {
    min-height: 80px;
    resize: vertical;
}

.soal-container {
    margin: 20px 0;
}

.soal {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.soal:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hapus {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.hapus:hover {
    background-color: #c0392b;
}

.soal label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.soal input[type="text"],
.soal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    font-family: inherit;
}

.soal textarea {
    min-height: 120px;
    resize: vertical;
}

/* Opsi container styles */
.opsi-container {
    margin-top: 15px;
}

.opsi-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.opsi-item input[type="text"] {
    flex-grow: 1;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
}

.radio-option input {
    margin-right: 5px;
}

/* Info box */
.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* Preview section */
.preview-section {
    margin-top: 30px;
}

.preview-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.preview-frame {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #7f8c8d;
    border-top: 1px solid #eaecee;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-tools h1 {
        font-size: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin: 5px 0;
    }
    
    .soal {
        padding: 15px;
    }
    
    .opsi-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .opsi-item input[type="text"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-tools {
        padding: 10px 0;
    }
    
    .preview-frame {
        height: 300px;
    }

/* Tambahkan ke file style.css */
    .soal textarea {
        min-height: 120px;
        resize: vertical;
        white-space: pre-wrap; /* Pertahankan line breaks */
        word-wrap: break-word;
    }

    .quiz-info textarea {
        min-height: 80px;
        resize: vertical;
        white-space: pre-wrap; /* Pertahankan line breaks */
        word-wrap: break-word;
    }
}