* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(30, 30, 46, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3a3a5a;
}

header h1 {
    color: #5dade2;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: #a0a0c0;
    font-size: 1.1em;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Botones */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
}

/* Sección de reemplazo */
.replace-section {
    background: rgba(40, 40, 60, 0.5);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.replace-label {
    font-weight: bold;
    color: #5dade2;
}

.replace-text {
    color: #a0a0c0;
    font-size: 14px;
}

.input-field {
    padding: 10px 15px;
    border: 2px solid #3a3a5a;
    border-radius: 6px;
    background: rgba(20, 20, 30, 0.8);
    color: #e0e0e0;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #5dade2;
}

.input-field::placeholder {
    color: #666;
}

/* Área de texto */
.text-area-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drop-zone {
    position: relative;
}

.drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(102, 126, 234, 0.85);
    border: 3px dashed #fff;
    border-radius: 10px;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.drop-zone.dragging .drop-overlay {
    display: flex;
}

.text-label {
    font-weight: bold;
    color: #5dade2;
    font-size: 1.1em;
}

.text-area {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #3a3a5a;
    border-radius: 10px;
    background: rgba(20, 20, 30, 0.8);
    color: #e0e0e0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.text-area:focus {
    outline: none;
    border-color: #5dade2;
}

/* Barra de estado */
.status-bar {
    background: rgba(40, 40, 60, 0.5);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    color: #2ecc71;
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #3a3a5a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #5dade2;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
}

.modal-instructions {
    color: #a0a0c0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.modal-textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 2px solid #3a3a5a;
    border-radius: 10px;
    background: rgba(20, 20, 30, 0.8);
    color: #e0e0e0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 20px;
}

.modal-textarea:focus {
    outline: none;
    border-color: #5dade2;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Modal de Biblia - Estilos específicos */
.modal-biblia {
    max-width: 700px;
}

.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    font-size: 16px;
    padding: 12px 15px;
}

.libros-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(15, 15, 25, 0.6);
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Scrollbar personalizado */
.libros-container::-webkit-scrollbar {
    width: 10px;
}

.libros-container::-webkit-scrollbar-track {
    background: rgba(30, 30, 40, 0.5);
    border-radius: 10px;
}

.libros-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.libros-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.seccion-libros {
    margin-bottom: 25px;
}

.seccion-titulo {
    color: #5dade2;
    font-size: 1.3em;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(93, 173, 226, 0.1);
    border-left: 4px solid #5dade2;
    border-radius: 5px;
}

.libro-item {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(93, 173, 226, 0.15) 0%, rgba(93, 173, 226, 0.05) 100%);
    border: 2px solid rgba(93, 173, 226, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.libro-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.libro-item:active {
    transform: translateX(5px) scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .button-group,
    .replace-section,
    .modal-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .input-field {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-biblia {
        width: 95%;
        max-width: none;
    }

    .libros-container {
        max-height: 350px;
    }

    .seccion-titulo {
        font-size: 1.1em;
    }

    .libro-item {
        font-size: 14px;
        padding: 10px 12px;
    }
}
