/* Estilos generales */
body, html {
    font-family: 'Poppins', Arial, sans-serif;
    background: linear-gradient(135deg, #8CD9FF, #5EAEFD);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: auto;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Estilos del calendario */
main {
    flex-grow: 1;
    padding: 40px 20px;
    overflow-y: auto;
}

.calendar-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.calendar-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-header h2 {
    font-size: 28px;
    margin: 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-button {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-button:hover {
    background-color: #E60000;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.calendar-day:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.calendar-day.has-routes {
    background-color: #FFEB3B;
    color: #333;
}

.calendar-day.today {
    border: 2px solid #FF0000;
    color: #FF0000;
}

/* Estilos para las rutas del día */
.day-details {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.day-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.day-details h3 {
    color: #FF0000;
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.routes-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.route-item {
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.route-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.route-item.completed {
    background-color: #e8f5e9;
}

.route-item button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.route-item button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 40px;
    border: none;
    width: 80%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.modal-content h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-content button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#complete-route {
    background-color: #4CAF50;
    color: white;
}

#complete-route:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#close-modal {
    background-color: #f44336;
    color: white;
}

#close-modal:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.add-route-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.add-route-btn:hover {
    background-color: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#add-route-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#add-route-form input {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#add-route-form input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#add-route-form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#add-route-form button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#close-add-modal {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#close-add-modal:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0; 
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.3s ease-out;
}

/* Huellas de perro animadas */
.paw-prints {
    position: fixed;
    bottom: 20px;
    left: -100px;
    font-size: 30px;
    color: rgba(255, 255, 255, 0.3);
    animation: pawWalk 15s linear infinite;
}

@keyframes pawWalk {
    to { transform: translateX(calc(100vw + 100px)); }
}

.paw-prints::before,
.paw-prints::after {
    content: '🐾';
    position: absolute;
    animation: pawPrint 0.5s infinite alternate;
}

.paw-prints::after {
    top: 20px;
    left: 20px;
    animation-delay: 0.25s;
}

@keyframes pawPrint {
    to { transform: translateY(-10px); }
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-container {
        padding: 20px;
    }

    .calendar-header h2 {
        font-size: 24px;
    }

    .nav-button {
        padding: 10px 15px;
        font-size: 16px;
    }

    .calendar-weekdays div {
        font-size: 12px;
    }

    .calendar-day {
        padding: 10px;
        font-size: 14px;
    }

    .day-details h3 {
        font-size: 20px;
    }

    .route-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .route-item button {
        margin-top: 10px;
    }

    .modal-content {
        width: 90%;
        padding: 30px;
    }

    .add-route-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Efectos de hover mejorados */
.calendar-day:hover::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    z-index: -1;
    animation: pulseEffect 1s infinite;
}

@keyframes pulseEffect {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.route-item:hover::before {
    content: '🚶‍♂️';
    position: absolute;
    left: -30px;
    font-size: 24px;
    animation: walkEffect 1s infinite alternate;
}

@keyframes walkEffect {
    to { transform: translateX(10px); }
}

/* Mejoras en la accesibilidad */
.calendar-day:focus,
.nav-button:focus,
.add-route-btn:focus,
#add-route-form input:focus,
#add-route-form button:focus,
#close-add-modal:focus,
#complete-route:focus,
#close-modal:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* Transiciones suaves */
.calendar-container,
.day-details,
.route-item,
.modal-content,
.add-route-btn,
#add-route-form input,
#add-route-form button,
#close-add-modal,
#complete-route,
#close-modal {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Efecto de profundidad */
.calendar-container,
.day-details,
.route-item,
.modal-content {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.calendar-container:hover,
.day-details:hover,
.route-item:hover,
.modal-content:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

/* Efecto de carga */
.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

#add-route-form select {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    background-color: white;
}

#add-route-form select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}