/* Estilos generales - Mobile First */
* {
    box-sizing: border-box;
}

/* Anular tema oscuro del navegador */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light only !important;
    }
    
    html, body {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }
}

:root {
  color-scheme: light only;
}

html {
    background-color: #f8f9fa !important;
    color-scheme: light only;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
    color: #212529 !important;
    color-scheme: light only;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header h2 {
    margin: 0.5rem 0 0 0;
    font-weight: 400;
    font-size: 1rem;
    color: #666;
}

main {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #666;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Formulario de reserva - Mobile First */
#reservation-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#reservation-form-container h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

#reservation-form {
    display: grid;
    gap: 1rem;
}

#reservation-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

#reservation-form input, 
#reservation-form select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

#reservation-form input:focus, 
#reservation-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
}

#reservation-form button {
    width: 100%;
    padding: 1rem;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#reservation-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#reservation-form button:active {
    transform: translateY(0);
}

#form-message {
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 8px;
}

/* Visualizador de Reservas - Mobile First */
#reservations-viewer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#reservations-viewer h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

#timeline-container {
    display: grid;
    gap: 1rem;
}

/* Estilos para las reservas - Cards modernas */
.material-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.material-section h3 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin: 0;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.reservations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reservation-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: block;
    transition: all 0.3s ease;
}

.reservation-item:last-child {
    border-bottom: none;
}

.reservation-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.reservation-info {
    margin-bottom: 1rem;
}

.reservation-info strong {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.reservation-info p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.reservation-info br + strong {
    display: inline-block;
    margin-top: 0.5rem;
}

.delete-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    width: 100%;
    margin-top: 0.5rem;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.delete-btn:active {
    transform: translateY(0);
}

/* Diseño Responsivo - Tablet y Desktop */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    main {
        flex-direction: row;
        align-items: flex-start;
    }
    
    #reservation-form-container {
        flex: 0 0 400px;
        padding: 2rem;
    }
    
    #reservations-viewer {
        flex: 1;
        padding: 2rem;
    }
    
    .reservation-item {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .reservation-info {
        flex: 1;
        margin-bottom: 0;
    }
    
    .delete-btn {
        width: auto;
        margin-top: 0;
        padding: 0.5rem 1rem;
        border-radius: 12px;
        flex-shrink: 0;
    }
}

@media (min-width: 1024px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    #reservation-form-container {
        flex: 0 0 450px;
    }
    
    .container {
        padding: 0 3rem;
    }
}

/* Animaciones y efectos adicionales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.material-section {
    animation: fadeIn 0.5s ease-out;
}

.reservation-item {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de mensajes */
#form-message {
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Mejoras para accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Colores mejorados para mejor legibilidad */
.reservation-info strong {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95rem;
}

.reservation-info p {
    margin: 0.5rem 0;
    color: #4a5568;
    font-size: 0.9rem;
}

#reservation-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

#reservation-form-container h2,
#reservations-viewer h2 {
    color: #2d3748;
}

/* Modo oscuro mejorado con mejor contraste */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    header, footer {
        background: rgba(26, 32, 44, 0.95);
        color: #f7fafc;
    }
    
    header h2 {
        color: #cbd5e0;
    }
    
    header h1 {
        background: linear-gradient(135deg, #90cdf4, #a78bfa);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    #reservation-form-container,
    #reservations-viewer {
        background: rgba(26, 32, 44, 0.95);
        color: #f7fafc;
    }
    
    #reservation-form-container h2,
    #reservations-viewer h2 {
        color: #f7fafc;
    }
    
    .material-section {
        background: rgba(26, 32, 44, 0.9);
        color: #f7fafc;
    }
    
    .reservation-info strong {
        color: #f7fafc;
        font-weight: 600;
    }
    
    .reservation-info p {
        color: #cbd5e0;
    }
    
    #reservation-form label {
        color: #f7fafc;
    }
    
    #reservation-form input,
    #reservation-form select {
        background: rgba(26, 32, 44, 0.9);
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    #reservation-form input:focus,
    #reservation-form select:focus {
        background: rgba(26, 32, 44, 1);
        border-color: #90cdf4;
        color: #f7fafc;
    }
    
    #reservation-form input::placeholder,
    #reservation-form select::placeholder {
        color: #a0aec0;
    }
}
