* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-wrapper {
    max-width: 1100px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 2rem;
    padding: 1.8rem 2rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 1rem;
}

h1 {
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(120deg, #fff, #c0e0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 i {
    background: none;
    color: #ffd966;
    font-size: 2rem;
}

.theme-toggle {
    background: rgba(255,255,240,0.2);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 3rem;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    color: white;
}

.theme-toggle:hover {
    background: rgba(255,215,0,0.4);
    transform: scale(1.02);
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    background: rgba(0,0,0,0.3);
    padding: 0.8rem 1.2rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
}

.stat-card {
    background: rgba(255,255,255,0.1);
    border-radius: 2rem;
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    color: #f0f0f0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stat-card i {
    font-size: 1.1rem;
}

.stat-number {
    font-weight: 800;
    font-size: 1.4rem;
    margin-left: 0.3rem;
    color: #ffec9f;
}

.add-task-section {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 2rem;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
}

.add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.input-group-custom {
    flex: 2;
    min-width: 180px;
}

.input-group-custom label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    color: #ddd;
    display: block;
    margin-bottom: 5px;
}

.add-form input, .add-form select {
    width: 100%;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 2rem;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
}

.add-form input:focus, .add-form select:focus {
    background: white;
    box-shadow: 0 0 0 2px #ffb347;
}

.btn-add {
    background: #ffb347;
    border: none;
    border-radius: 2.5rem;
    padding: 0.8rem 1.8rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    color: #1e2a32;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-add:hover {
    background: #ff9f1c;
    transform: scale(0.97);
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255,255,245,0.15);
    border: none;
    padding: 0.5rem 1.1rem;
    border-radius: 2rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(2px);
}

.filter-btn.active, .filter-btn:hover {
    background: #ffb347;
    color: #1e2a32;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 2rem;
    padding: 0.2rem 0.8rem;
}

.search-box i {
    color: #ffe0b5;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 0.6rem;
    color: white;
    outline: none;
    width: 180px;
}

.search-box input::placeholder {
    color: #ddd;
}

.clear-completed {
    background: #c44536c9;
    border: none;
    border-radius: 2rem;
    padding: 0.4rem 1.2rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.clear-completed:hover {
    background: #b13a2b;
}

.task-list-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.task-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    margin-bottom: 0.8rem;
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.task-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(4px);
}

.task-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 3;
    flex-wrap: wrap;
}

.task-text {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    word-break: break-word;
    max-width: 280px;
}

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

.task-date {
    font-size: 0.7rem;
    background: rgba(0,0,0,0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    color: #ffecb3;
}

.icons-group {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.15s;
    color: #f0f0f0;
}

.icon-btn:hover {
    transform: scale(1.2);
}

body.light-mode {
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    color: #1a2a32;
}

body.light-mode .app-wrapper {
    background: rgba(245, 245, 255, 0.7);
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

body.light-mode h1 {
    background: none;
    color: #1a2a32;
}

body.light-mode .task-text {
    color: #1a2a32;
}

body.light-mode .task-date {
    background: rgba(0,0,0,0.1);
    color: #333;
}

body.light-mode .task-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.1);
}

body.light-mode .icon-btn {
    color: #333;
}

body.light-mode .icon-btn:hover {
    color: #000;
}

body.light-mode .search-box {
    background: rgba(0,0,0,0.1);
}

body.light-mode .search-box input {
    color: #000;
}

body.light-mode .search-box input::placeholder {
    color: #666;
}

body.light-mode .add-form input {
    background: white;
    color: #000;
}

body.light-mode .stat-card {
    background: rgba(0,0,0,0.08);
    color: #222;
}

body.light-mode .filter-btn {
    background: rgba(0,0,0,0.1);
    color: #222;
}

body.light-mode .filter-btn.active {
    background: #ffb347;
    color: #fff;
}

@media (max-width: 650px) {
    .app-wrapper {
        padding: 1.2rem;
    }
    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .icons-group {
        align-self: flex-end;
    }
}