* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}
.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 20px;
    font-size: 16px;
}
.nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.nav-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.nav-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.page {
    display: none;
}
.page.active {
    display: block;
}
.page-title {
    margin-bottom: 15px;
    color: #333;
}
.task-list {
    list-style: none;
}
.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.task-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}
.task-item.completed {
    background: #d4edda;
    opacity: 0.7;
}
.task-item.completed .task-text {
    text-decoration: line-through;
    color: #888;
}
.checkbox {
    width: 28px;
    height: 28px;
    border: 3px solid #667eea;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.task-item.completed .checkbox {
    background: #28a745;
    border-color: #28a745;
}
.checkbox::after {
    content: '✓';
    color: white;
    font-size: 18px;
    font-weight: bold;
    display: none;
}
.task-item.completed .checkbox::after {
    display: block;
}
.task-text {
    font-size: 18px;
    color: #333;
    flex-grow: 1;
}
.progress {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}
.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.5s ease;
}
.progress-text {
    text-align: center;
    color: #888;
    font-size: 16px;
}
.hint {
    color: #888;
    margin-bottom: 15px;
}
.init-btn {
    width: 100%;
    padding: 15px;
    border: none;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}
.edit-day-selector {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.edit-day-btn {
    padding: 8px 12px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    transition: all 0.3s;
}
.edit-day-btn.active {
    background: #667eea;
    color: white;
}
#editDayTitle {
    margin-bottom: 15px;
    color: #333;
}
.edit-task-list {
    list-style: none;
}
.edit-task-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}
.edit-task-item input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-right: 10px;
}
.edit-task-item .delete-btn {
    padding: 8px 12px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.add-task-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.add-task-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 16px;
}
.add-task-container button {
    padding: 12px 20px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}
.init-success {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
    margin-top: 20px;
}
.history-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}
.history-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}
.history-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}
.history-date {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}
.history-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #888;
}
.history-stats .completed {
    color: #28a745;
}
.detail-box {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}
.detail-task {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.detail-task:last-child {
    border-bottom: none;
}
.detail-task.done {
    color: #28a745;
}
.detail-task.not-done {
    color: #dc3545;
}
.detail-task::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}
.detail-task.done::before {
    background: #28a745;
}
.detail-task.not-done::before {
    border: 2px solid #dc3545;
}
.back-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}
.empty-state {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 10px;
}
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f00;
    animation: fall 3s linear forwards;
    pointer-events: none;
}
@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
