@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-blue: #4A9FD8;
    --light-blue: #E7F5FD;
    --soft-peach: #FCEBE0;
    --white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border-light: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--soft-peach) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-wrapper {
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    max-width: 1000px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

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

/* Header */
.header {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-sm);
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
}

.stats-grid {
    display: flex;
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, var(--light-blue) 0%, rgba(231, 245, 253, 0.5) 100%);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
    border: 1px solid rgba(74, 159, 216, 0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

/* Input Section */
.input-section {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    letter-spacing: 0.2px;
}

.field-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    background: var(--white);
    transition: all 0.2s ease;
}

.field-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.field-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 159, 216, 0.1);
}

.field-input:hover:not(:focus) {
    border-color: #D1D5DB;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #3B8EC4;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

/* Tasks Section */
.tasks-section {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    background: var(--light-blue);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.tasks-list-container {
    min-height: 300px;
}

.tasks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: linear-gradient(135deg, rgba(231, 245, 253, 0.3) 0%, rgba(252, 235, 224, 0.2) 100%);
    border: 2px solid var(--border-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease-out;
}

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

.task-item:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-item.completed {
    opacity: 0.6;
    background: rgba(229, 231, 235, 0.3);
}

.task-item.completed:hover {
    opacity: 0.8;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    flex-shrink: 0;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.5;
    word-wrap: break-word;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-gray);
}

.task-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
}

.task-date svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.delete-btn {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.delete-btn:hover {
    background: #EF4444;
    color: var(--white);
    border-color: #EF4444;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-illustration {
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
    color: var(--text-gray);
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-wrapper {
        padding: 20px 16px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .stats-grid {
        width: 100%;
        justify-content: flex-start;
    }

    .stat-card {
        flex: 1;
        min-width: 0;
    }

    .input-section,
    .tasks-section {
        padding: 24px;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .filter-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
    }

    .task-item {
        flex-wrap: wrap;
    }

    .delete-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 20px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 12px 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .input-section,
    .tasks-section {
        padding: 20px;
    }

    .section-title {
        font-size: 16px;
    }
}