/* static/style.css */

/* Estilos generales y variables de color */
:root {
    --primary-color: #3b82f6; /* Azul */
    --background-color: #f8f9fa; /* Gris muy claro */
    --surface-color: #ffffff; /* Blanco */
    --text-color: #212529; /* Negro suave */
    --text-secondary-color: #6c757d; /* Gris secundario */
    --border-color: #dee2e6; /* Gris para bordes */
    --shadow-color: rgba(0, 0, 0, 0.05);
    --success-color: #198754;
    --danger-color: #dc3545;
    --font-primary: 'Inter', sans-serif;
}

body.dark-mode {
    --primary-color: #3b82f6;
    --background-color: #111827; /* Gris oscuro azulado */
    --surface-color: #1f2937; /* Gris azulado más claro */
    --text-color: #f9fafb; /* Blanco grisáceo */
    --text-secondary-color: #9ca3af; /* Gris medio */
    --border-color: #374151; /* Gris para bordes */
    --shadow-color: rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column; /* Changed to column to stack top-music-player and app-container */
    justify-content: flex-start; /* Align items to the start */
    align-items: center; /* Center content horizontally */
    min-height: 100vh;
    padding: 0; /* Remove body padding as top-music-player and app-container will have their own */
    transition: background-color 0.3s, color 0.3s;
}

/* Ocultar el reproductor de audio de YouTube que ya no se usa */
#youtube-player {
    display: none;
}

/* New Top Music Player Container */
#top-music-player-container {
    width: 100%;
    background-color: var(--surface-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

#top-music-player-container .music-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap */
    padding: 0.4rem; /* Reduced padding */
    border: 1px solid var(--border-color);
    border-radius: 30px; /* More rounded */
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: center; /* Center controls */
    max-width: 100%;
    overflow: hidden; /* Hide overflow */
}

/* Grouping main controls */
.main-controls-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Adjustments for elements inside music-controls */
.station-selector select {
    padding: 0.4rem 0.6rem;
    border: none; /* Remove border */
    border-radius: 20px; /* Make it pill-shaped */
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 120px;
    transition: background-color 0.2s;
}

.station-selector select:hover {
    background-color: var(--border-color);
}

#custom-station-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-grow: 1;
}

#custom-station-input-container input {
    flex-grow: 1;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    background-color: var(--background-color);
    color: var(--text-color);
}

#custom-station-input-container button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: background-color 0.2s;
}

#custom-station-input-container button:hover {
    background-color: #2563eb; /* Darker blue on hover */
}

.radio-status-display {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Align to the left */
    padding: 0 0.75rem; /* Add some padding */
    font-size: 0.85rem;
    color: var(--text-secondary-color);
    min-width: 100px; /* Minimum width */
    max-width: 300px; /* Max width to prevent it from taking too much space */
}

/* Style for the play/pause button */
#music-toggle-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#music-toggle-btn:hover {
    background-color: #2563eb; /* Darker blue on hover */
    transform: scale(1.05);
}

/* Volume slider container */
.volume-container {
    display: flex;
    align-items: center;
    width: 100px; /* Give it a fixed width */
}


.app-container {
    width: 100%;
    max-width: 600px; /* Ancho máximo para móviles por defecto */
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Padding general para el contenedor principal */
}

/* Estilos para las áreas del grid en móvil (apiladas por defecto) */
.grid-area {
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 1rem;
    margin-bottom: 1rem; /* Espacio entre secciones apiladas */
}

.grid-area:last-child {
    margin-bottom: 0;
}

.task-columns-tablet-group,
.misc-widgets-tablet-group {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* To maintain spacing between children */
}

/* Header dentro de grid-pomodoro-tasks */
#grid-pomodoro-tasks header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; /* Ya hay padding en .grid-area */
    border-bottom: none;
    margin-bottom: 1rem;
}

#grid-pomodoro-tasks header .logo h1 {
    font-size: 1.25rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary-color);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
    background-color: var(--background-color);
    color: var(--text-color);
}

.icon-btn svg {
    display: block;
}

.timer-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

#pomodoro-animation-container {
    margin: 0 auto 1rem;
    max-width: 100px;
}

#pomodoro-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}

#mode-display {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary-color);
    margin-bottom: 0.5rem;
}

#timer-display {
    font-size: 4rem; /* Tamaño para móvil */
    font-weight: 700;
    line-height: 1;
}

.timer-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

button {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#start-pause-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#start-pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-secondary-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
}

.secondary-btn:hover {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: var(--text-color);
}

#task-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

#task-input {
    flex-grow: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#task-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    line-height: 1;
}

/* Task Board Columns */
.task-column h3 {
    font-size: 1rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.task-list-column {
    min-height: 100px;
    border-radius: 8px;
    padding: 0.5rem;
    background-color: rgba(128, 128, 128, 0.05);
}

.task-card {
    background-color: var(--surface-color);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 3px var(--shadow-color);
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-card:active {
    cursor: grabbing;
}

.task-card .task-text {
    flex-grow: 1;
    font-size: 0.9rem;
}

.task-card .delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary-color);
    padding: 0.2rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.task-card:hover .delete-btn {
    opacity: 1;
}

.task-card .delete-btn:hover {
    background-color: var(--danger-color);
    color: white;
}

#done-column .task-text {
    text-decoration: line-through;
    color: var(--text-secondary-color);
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--primary-color);
    border: 1px dashed var(--primary-color);
}

.task-indicators {
    display: flex;
    gap: 0.2rem;
}

.indicator {
    font-size: 0.7rem;
    color: var(--text-secondary-color);
}

/* Radio and Weather Widgets */
/* Removed #grid-radio styles as it's moved */
#grid-weather {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.75rem; /* Más compacto */
}

/* Removed #grid-radio .music-controls styles as it's moved */

.volume-container {
    width: 80px; /* Fixed width for visibility */
    flex-shrink: 0; /* Prevent it from shrinking */
}

#volume-slider {
    height: 3px;
}

#volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
}

/* Removed #radio-status styles as it's moved */

#grid-weather .weather-widget {
    display: flex;
    flex-direction: column; /* Apilar elementos en móvil */
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

#grid-weather .weather-icon {
    width: 24px;
    height: 24px;
}

#grid-weather .temperature {
    font-size: 1.1rem;
}

#grid-weather .description, #grid-weather .location {
    font-size: 0.8rem;
}

#current-task-display {
    text-align: center;
    padding: 0.75rem;
    background-color: var(--background-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#current-task-display p {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
}

#current-task-display span {
    font-weight: 500;
    font-size: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px; /* Aumentar un poco el tamaño máximo para modales */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.25rem;
}

#close-modal-btn, #close-stats-modal-btn, #close-feedback-modal-btn, #close-task-details-modal-btn {
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"], input[type="number"], input[type="date"], textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.save-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    margin-top: 1rem;
    border-radius: 8px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Weather Widget */
.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 24px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.weather-widget .weather-icon {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.weather-widget .temperature {
    font-weight: 500;
}

.weather-widget .description {
    text-transform: capitalize;
    color: var(--text-secondary-color);
}

.weather-widget .location {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
}

/* Feedback Section specific styles (now in modal) */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

.feedback-form-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow-color);
    margin-bottom: 1.5rem;
}

.reviews-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reviews-container h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.review-card {
    background-color: var(--background-color);
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.review-card .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.review-card .review-name,
.review-card .review-rating {
    font-weight: 700;
    font-size: 0.9rem;
}

.review-card .review-message {
    color: var(--text-secondary-color);
    font-size: 0.85rem;
}

/* Stats Section specific styles (now in modal) */
.stats-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    background-color: var(--background-color);
    padding: 0.8rem;
    border-radius: 8px;
    flex: 1;
}

.stat-box h3 {
    font-size: 1rem;
    color: var(--text-secondary-color);
    margin-bottom: 0.4rem;
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 700;
}

.chart-container {
    position: relative;
    height: 200px; /* Altura fija para el gráfico en móvil */
    width: 100%;
}

/* Ocultar el contenedor secundario que contenía las pestañas */
.app-container-secondary {
    display: none; 
}

/* --- Responsive Styles --- */

/* Tablet devices (768px and up) */
@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
        padding: 1.5rem;
    }

    .grid-area {
        padding: 1.2rem;
    }

    #grid-pomodoro-tasks header {
        margin-bottom: 1.5rem;
    }

    #timer-display {
        font-size: 5rem;
    }

    .timer-controls {
        gap: 1rem;
    }

    button {
        font-family: var(--font-primary);
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    #task-form input {
        font-size: 1rem;
        padding: 0.75rem;
    }

    #task-form button {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .task-column h3 {
        font-size: 1.1rem;
    }

    .task-card {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }

    .task-card .task-text {
        font-size: 1rem;
    }

    .indicator {
        font-size: 0.8rem;
    }

    .volume-container {
        width: 80px; /* Volver al tamaño original en tablet */
    }

    #volume-slider {
        height: 4px;
    }
    
    #volume-slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }
    
    #volume-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }

    #radio-status {
        font-size: 0.95rem;
    }

    #grid-weather .weather-widget {
        display: flex;
        flex-direction: column; /* Apilar elementos en móvil */
        align-items: center;
        gap: 0.25rem;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
    }

    #grid-weather .weather-icon {
        width: 24px;
        height: 24px;
    }

    #grid-weather .temperature {
        font-size: 1.2rem;
    }

    #grid-weather .description, #grid-weather .location {
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    #close-modal-btn, #close-stats-modal-btn, #close-feedback-modal-btn, #close-task-details-modal-btn {
        font-size: 2rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    input[type="text"], input[type="number"], input[type="date"], textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .save-btn {
        padding: 1rem 2rem;
    }

    .feedback-form-card {
        margin-bottom: 2rem;
    }

    .reviews-container {
        gap: 1rem;
    }

    .reviews-container h3 {
        font-size: 1.25rem;
    }

    .review-card {
        padding: 1rem;
    }

    .review-card .review-name,
    .review-card .review-rating {
        font-size: 1rem;
    }

    .review-card .review-message {
    font-size: 0.9rem;
}

/* Stats Section specific styles (now in modal) */
.stats-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    text-align: center;
    background-color: var(--background-color);
    padding: 0.8rem;
    border-radius: 8px;
    flex: 1;
}

.stat-box h3 {
    font-size: 1rem;
    color: var(--text-secondary-color);
    margin-bottom: 0.4rem;
}

.stat-box p {
    font-size: 1.2rem;
    font-weight: 700;
}

.chart-container {
    position: relative;
    height: 200px; /* Altura fija para el gráfico en móvil */
    width: 100%;
}

/* Ocultar el contenedor secundario que contenía las pestañas */
.app-container-secondary {
    display: none; 
}

/* --- Responsive Styles --- */

/* Tablet devices (768px and up) */
@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
        padding: 1.5rem;
    }

    .grid-area {
        padding: 1.2rem;
    }

    #grid-pomodoro-tasks header {
        margin-bottom: 1.5rem;
    }

    #timer-display {
        font-size: 5rem;
    }

    .timer-controls {
        gap: 1rem;
    }

    button {
        font-family: var(--font-primary);
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    #task-form input {
        font-size: 1rem;
        padding: 0.75rem;
    }

    #task-form button {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .task-column h3 {
        font-size: 1.1rem;
    }

    .task-card {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }

    .task-card .task-text {
        font-size: 1rem;
    }

    .indicator {
        font-size: 0.8rem;
    }

    .volume-container {
        width: 80px; /* Volver al tamaño original en tablet */
    }

    #volume-slider {
        height: 4px;
    }
    
    #volume-slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }
    
    #volume-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }

    #radio-status {
        font-size: 0.95rem;
    }

    #grid-weather .weather-widget {
        display: flex;
        flex-direction: column; /* Apilar elementos en móvil */
        align-items: center;
        gap: 0.25rem;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
    }

    #grid-weather .weather-icon {
        width: 24px;
        height: 24px;
    }

    #grid-weather .temperature {
        font-size: 1.2rem;
    }

    #grid-weather .description, #grid-weather .location {
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    #close-modal-btn, #close-stats-modal-btn, #close-feedback-modal-btn, #close-task-details-modal-btn {
        font-size: 2rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    input[type="text"], input[type="number"], input[type="date"], textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .save-btn {
        padding: 1rem 2rem;
    }

    .feedback-form-card {
        margin-bottom: 2rem;
    }

    .reviews-container {
        gap: 1rem;
    }

    .reviews-container h3 {
        font-size: 1.25rem;
    }

    .review-card {
        padding: 1rem;
    }

    .review-card .review-name,
    .review-card .review-rating {
        font-size: 1rem;
    }

    .review-card .review-message {
        font-size: 0.9rem;
    }

    .stat-box h3 {
        font-size: 1.1rem;
    }

    .stat-box p {
        font-size: 1.3rem;
    }

    .chart-container {
        height: 250px; /* Aumentar altura del gráfico en tablet */
    }

    /* Layout para tablets: 2 columnas para tareas */
    .app-container {
        display: flex; /* Volver a flexbox para control manual */
        flex-direction: column;
        gap: 1.5rem; /* Espacio entre secciones principales */
    }

    #grid-pomodoro-tasks {
        order: 1; /* Primero el pomodoro */
    }

    #grid-todo-column {
        order: 2;
    }

    #grid-inprogress-column {
        order: 3;
    }

    #grid-done-column {
        order: 4;
    }

    #grid-radio {
        order: 5;
    }

    #grid-weather {
        order: 6;
    }

    /* Agrupar columnas de tareas en una fila para tablets */
    .task-columns-tablet-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Mover las columnas de tareas a este grupo */
    #grid-todo-column, #grid-inprogress-column, #grid-done-column {
        margin-bottom: 0; /* Eliminar margen inferior si están en un grid */
    }

    /* Ajuste para que las columnas de tareas se vean bien en 2 columnas */
    #grid-todo-column, #grid-inprogress-column {
        grid-column: span 1;
    }

    #grid-done-column {
        grid-column: 1 / span 2; /* Ocupa ambas columnas en la segunda fila */
    }

    /* Agrupar radio y clima en una fila para tablets */
    .misc-widgets-tablet-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    #grid-radio, #grid-weather {
        margin-bottom: 0;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    body {
        padding: 2rem;
    }

    .app-container {
        max-width: 1400px; /* Aumentar el ancho máximo para acomodar el grid de 5 columnas */
        height: calc(100vh - 4rem);
        display: grid; /* Activar el grid de 5 columnas */
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(5, 1fr);
        grid-column-gap: 1rem;
        grid-row-gap: 1rem;
        overflow: hidden; /* Para manejar el scroll interno de las áreas */
        padding: 0; /* El padding ya lo manejan las grid-area */
    }

    .grid-area {
        background-color: var(--surface-color);
        border-radius: 16px;
        box-shadow: 0 4px 12px var(--shadow-color);
        padding: 1.5rem; /* Padding para las áreas del grid en escritorio */
        margin-bottom: 0; /* Eliminar margen inferior en grid */
    }

    #grid-pomodoro-tasks {
        grid-area: 1 / 1 / 6 / 4;
        display: flex;
        flex-direction: column;
    }

    #grid-pomodoro-tasks header {
        border-bottom: none;
        padding: 0;
        margin-bottom: 1rem;
    }

    #grid-pomodoro-tasks .timer-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #grid-pomodoro-tasks #task-board-container {
        margin-top: auto; /* Empuja el formulario de tareas hacia abajo */
    }

    #grid-todo-column {
        grid-area: 1 / 4 / 2 / 6;
    }

    #grid-inprogress-column {
        grid-area: 2 / 4 / 3 / 6;
    }

    #grid-done-column {
        grid-area: 3 / 4 / 4 / 6;
    }

    #grid-radio {
        grid-area: 4 / 4 / 5 / 5;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #grid-radio .music-controls {
        margin-bottom: 0.5rem;
    }

    #grid-weather {
        grid-area: 4 / 5 / 5 / 6;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #grid-weather .weather-widget {
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    /* Ajustes para las columnas de tareas dentro del grid */
    .task-column {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .task-column h3 {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .task-list-column {
        flex-grow: 1;
        min-height: 0; /* Permite que el flex-grow funcione correctamente */
    }

    #timer-display {
        font-size: 6rem;
    }

    /* Las pestañas y su contenido se gestionan fuera del grid principal */
    .app-container-secondary {
        display: none; 
    }

    /* Desactivar los grupos de tablet en escritorio */
    .task-columns-tablet-group,
    .misc-widgets-tablet-group {
        display: contents; /* Make children participate in parent's grid */
    }
}