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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container.dark {
    background: #1e1e2e;
    color: #e0e0e0;
}

.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    transition: background 0.3s ease;
}

.app-container.dark .app-header {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
}

.app-container.dark .motivation-text {
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.app-title {
    font-size: 2em;
    margin-bottom: 0;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.app-date {
    font-size: 1em;
    opacity: 0.9;
}

.motivation-text {
    font-size: 1.1em;
    margin: 15px 0 0 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-tabs {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    justify-content: center;
    flex-wrap: wrap;
}

.app-container.dark .date-tabs {
    background: #2a2a3e;
    border-bottom-color: #444;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.app-container.dark .tab {
    background: #3a3a4e;
    border-color: #555;
    color: #b0b0b0;
}

.tab:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab-label {
    font-weight: 600;
}

.tab-count {
    font-size: 0.8em;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.tab.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

.selected-date-display {
    padding: 15px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    font-size: 1.1em;
    font-weight: 600;
    color: #667eea;
    border-bottom: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
}

.app-container.dark .selected-date-display {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #8a9eea;
    border-bottom-color: #444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-section {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.app-container.dark .input-section {
    background: #2a2a3e;
    border-bottom-color: #444;
}

.task-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
    color: #333;
}

.app-container.dark .task-input {
    background: #3a3a4e;
    color: #e0e0e0;
    border-color: #555;
}

.task-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.app-container.dark .task-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
}

.add-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.add-btn:active {
    transform: translateY(0);
}

.sections-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.app-container.dark .section {
    background: #2a2a3e;
    border-color: #444;
}

.section:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.app-container.dark .section:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.section-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    transition: color 0.3s ease;
}

.app-container.dark .section-title {
    color: #e0e0e0;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 30px 10px;
    font-style: italic;
    transition: color 0.3s ease;
}

.app-container.dark .empty-message {
    color: #888;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
}

.app-container.dark .task-item {
    background: #3a3a4e;
    color: #e0e0e0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.app-container.dark .task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    transition: all 0.2s;
}

.task-checkbox:hover {
    transform: scale(1.1);
}

.task-text {
    font-size: 1em;
    color: #333;
    transition: all 0.3s;
}

.app-container.dark .task-text {
    color: #e0e0e0;
}

.task-text.completed {
    text-decoration: line-through;
    color: #999;
    opacity: 0.7;
}

.app-container.dark .task-text.completed {
    color: #888;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .sections-container {
        grid-template-columns: 1fr;
    }

    .app-title {
        font-size: 1.5em;
    }

    .input-section {
        flex-direction: column;
    }

    .task-input {
        width: 100%;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    .date-tabs {
        padding: 15px 10px;
        gap: 8px;
    }

    .tab {
        flex: 1;
        min-width: 80px;
        padding: 10px 15px;
    }
}