/* Reset and Base Styles */
* {
    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: #f8f9fa;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    touch-action: manipulation; /* Improve touch experience */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

#current-date {
    font-size: 1.2rem;
    font-weight: 300;
}

/* Day Selector */
.day-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.day-selector h2 {
    margin: 0 20px;
    font-size: 1.5rem;
}

.day-selector button {
    background-color: #4a6bff;
    color: white;
    border: none;
    width: 50px; /* Increased from 40px */
    height: 50px; /* Increased from 40px */
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    /* Remove outline */
    outline: none;
}

.day-selector button:hover {
    background-color: #3755d8;
}

.day-selector button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Routine Section Styles */
.routine-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.routine-section h3 {
    font-size: 1.4rem;
    color: #4a6bff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.routine-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.routine-item {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.routine-item:hover {
    background-color: #f0f0f0;
}

.time {
    font-weight: bold;
    color: #555;
}

.activity {
    padding: 0 10px;
}

.checkbox {
    text-align: center;
}

.checkbox input {
    display: none;
}

.checkbox label {
    display: inline-block;
    width: 30px; /* Increased from 25px */
    height: 30px; /* Increased from 25px */
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    /* Add touch target padding */
    padding: 5px;
    margin: -5px;
}

.checkbox label i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox input:checked + label {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.checkbox input:checked + label i {
    opacity: 1;
}

/* Progress Section */
.progress-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.progress-section h3 {
    font-size: 1.4rem;
    color: #4a6bff;
    margin-bottom: 20px;
}

.progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.progress-day {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    background-color: #f0f0f0;
    transition: all 0.2s;
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
}

.progress-day.current {
    border: 2px solid #4a6bff;
}

.progress-day.completed {
    background-color: #4CAF50;
    color: white;
}

.progress-day:hover {
    transform: scale(1.05);
}

/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .routine-item {
        grid-template-columns: 70px 1fr 40px;
    }
    
    .time {
        font-size: 0.9rem;
    }
    
    .activity {
        font-size: 0.95rem;
    }
    
    /* Enhanced touch targets for day navigation */
    .day-selector button {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .routine-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 8px; /* Increased from 5px */
        padding: 15px; /* Increased from 10px */
    }
    
    .time {
        font-weight: bold;
        color: #4a6bff;
        font-size: 1rem; /* Ensure readable text size */
    }
    
    .activity {
        font-size: 1rem; /* Ensure readable text size */
    }
    
    .checkbox {
        text-align: left;
        margin-top: 8px; /* Increased from 5px */
    }
    
    /* Larger checkbox for better touch */
    .checkbox label {
        width: 35px; /* Even larger on mobile */
        height: 35px; /* Even larger on mobile */
    }
    
    .checkbox label i {
        font-size: 18px; /* Increased icon size */
    }
    
    /* Adjust progress days for better touch */
    .progress-container {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 12px; /* Increased from 10px */
    }
    
    .progress-day {
        width: 55px; /* Increased from 50px */
        height: 55px; /* Increased from 50px */
        font-size: 0.95rem;
    }
    
    /* Fix navigation buttons */
    .day-selector h2 {
        font-size: 1.3rem;
        margin: 0 15px;
    }
    
    /* Increase spacing between routine items */
    .routine-items {
        gap: 20px;
    }
    
    /* Make routine items stand out more */
    .routine-item {
        border: 1px solid #e0e0e0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    
    /* Adjust the position of checkboxes */
    .checkbox {
        margin-top: 10px;
        display: flex;
        align-items: center;
    }
    
    /* Make touch-friendly highlight when clicking */
    .routine-item:active {
        background-color: #eef2ff;
    }
    
    /* Prevent content from being too close to edges */
    .container {
        width: 95%;
        padding: 0 10px;
    }
}

/* Offline Notification */
.offline-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ff9800;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 1000;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none;
} 