/* Responsive Styles Module
   Purpose: Breakpoints and responsive adjustments across modules.
   Scope: Tablet and mobile overrides for calendar, layout, modals, timer, todo. */
/* 平板适配 */
@media (max-width: 960px) {
    .calendar-grid { grid-template-columns: 60px repeat(7, 1fr); }
    .container { margin: 20px auto; padding: 14px; }
}

/* 手机端适配 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 12px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .top-actions {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .top-actions button {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1;
        min-width: 80px;
    }
    
    .calendar-grid {
        grid-template-columns: 50px repeat(7, 1fr);
        gap: 4px;
    }
    
    .time-slot {
        height: 40px;
        font-size: 10px;
    }
    .time-end { font-size: 10px; }
    .day-body {
        height: 640px;
        min-height: 640px;
        background-size: 100% 40px;
    }
    
    .day-header {
        padding: 6px 2px;
        font-size: 11px;
        font-weight: 500;
    }
    
    .time-col {
        /* margin-top将通过JavaScript动态设置 */
    }
    
    .event {
        left: 2px;
        right: 2px;
        padding: 4px;
        font-size: 10px;
        border-radius: 4px;
    }
    
    .event .title {
        font-size: 10px;
        font-weight: 600;
        margin-bottom: 2px;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .event .meta {
        font-size: 9px;
        line-height: 1;
    }
    
    .split {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .todo-section h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .todo-input {
        flex-direction: column;
        gap: 8px;
    }
    
    #taskInput {
        padding: 8px;
        font-size: 14px;
    }
    
    #addTask {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .task-item {
        padding: 8px;
        font-size: 14px;
    }
    
    .delete-btn, .focus-btn {
        padding: 4px 8px;
        font-size: 12px;
        margin-left: 4px;
    }
    
    .modal-content {
        width: 95vw;
        margin: 10px;
    }
    
    .modal-wide {
        width: 95vw;
        height: 90vh;
    }
    
    .timer-panel {
        width: 95vw;
        margin: 10px;
    }
    
    .countdown-setup {
        font-size: 28px;
    }
    
    .running-time {
        font-size: 32px;
    }
    
    .timer-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .timer-actions button {
        flex: 1;
        min-width: 80px;
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 8px;
    }
    
    .calendar-grid {
        grid-template-columns: 40px repeat(7, 1fr);
        gap: 2px;
    }
    
    .time-slot {
        height: 35px;
        font-size: 9px;
    }
    .time-end { font-size: 9px; }
    .day-body {
        height: 560px; /* 35px * 16 = 560px */
        min-height: 560px;
        background-size: 100% 35px;
    }
    
    .day-header {
        padding: 4px 1px;
        font-size: 10px;
    }
    
    .time-col {
        /* margin-top将通过JavaScript动态设置 */
    }
    
    .event {
        left: 1px;
        right: 1px;
        padding: 2px;
        font-size: 9px;
    }
    
    .event .title {
        font-size: 9px;
        margin-bottom: 1px;
    }
    
    .event .meta {
        font-size: 8px;
    }
    
    .top-actions button {
        padding: 4px 6px;
        font-size: 11px;
    }
}