/* assets/css/style.css */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #0091F4;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-header {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.main-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #27ae60;
}

.btn-back {
    color: white;
    background-color: transparent;
    border: 1px solid white;
}

.btn-back:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-nav {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-nav:hover {
    background-color: #d5dbdb;
}

.btn-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-generate {
    background-color: var(--warning-color);
    color: white;
    width: 100%;
}

.btn-generate:hover {
    background-color: #e67e22;
}

.btn-copy {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-download {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.upload-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.book-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.book-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.book-card .no-cover {
    width: 100%;
    height: 250px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.book-card h3 {
    padding: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.book-card .page-count {
    text-align: center;
    padding: 0 15px 15px;
    font-size: 0.9rem;
    color: #666;
}

.no-books {
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    color: #666;
}

.book-viewer-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.book-meta {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-indicator {
    font-weight: bold;
}

.book-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .book-content {
        grid-template-columns: 1fr;
    }
}

.page-viewer {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.page-image {
    max-width: 100%;
    max-height: 600px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.no-page {
    padding: 50px;
    text-align: center;
    color: #777;
}

.page-activities {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.activity-generator {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.activity-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-control {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
}

.activity-card:hover {
    border-color: var(--primary-color);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.activity-date {
    font-size: 0.8rem;
    color: #777;
}

.activity-content {
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.activity-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.activity-prompt {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 0.9rem;
    color: #666;
}

.no-activities {
    text-align: center;
    padding: 30px;
    color: #777;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-form {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-text {
    font-size: 0.8rem;
    color: #666;
}
/* Añade estos estilos al archivo existente */

.upload-options-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.upload-options-tabs a {
    padding: 10px 15px;
    margin-right: 5px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    text-decoration: none;
    color: #333;
    border-radius: 5px 5px 0 0;
}

.upload-options-tabs a.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    font-weight: bold;
}

.upload-options-tabs a:hover {
    background: #e9e9e9;
}

.directory-help {
    margin-top: 30px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: var(--border-radius);
}

.directory-help ul {
    list-style-type: none;
    font-family: monospace;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
}

.directory-help li {
    margin-bottom: 5px;
}

.image-container {
    position: sticky;
    top: 20px;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 10;
}

.page-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.text-extraction-panel {
    background: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: var(--box-shadow);
}

#extraction-status {
    margin: 10px 0;
    font-style: italic;
    color: #666;
    min-height: 20px;
}

.activity-card {
    transition: all 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos para el drag and drop */
.upload-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
}

.upload-drop-zone.active {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.upload-drop-zone p {
    margin: 0;
    font-size: 1.2em;
    color: #666;
}

.upload-drop-zone i {
    font-size: 3em;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.upload-drop-zone.active i {
    color: #3498db;
}