:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -6px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
    color: #1e293b;
}

.app-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 32px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.6s ease-out;
}

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

header {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #0f172a;
    margin-bottom: 10px;
}

h1 .highlight {
    background: linear-gradient(to right, var(--primary), #8b5cf6);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Form Styles */
.input-section {
    margin-bottom: 50px;
    background: #f8fafc;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
}

#taskForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-full {
    grid-column: span 2;
}

input, textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
    color: #1e293b;
}

textarea {
    resize: none;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.btn-add {
    grid-column: span 2;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

/* Filter Styles */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 18px;
}

.filters button {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.filters button.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Task List Styles */
#taskList {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

li {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

li:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

.task-info {
    flex: 1;
    margin-right: 25px;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.task-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0f172a;
}

.task-time {
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
}

.completed {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.completed .task-title {
    text-decoration: line-through;
    color: #94a3b8;
}

.completed .task-desc {
    color: #cbd5e1;
}

/* Actions */
.actions {
    display: flex;
    gap: 12px;
}

.actions button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-edit { background: #f0f9ff; color: #0ea5e9; }
.btn-edit:hover { background: #0ea5e9; color: white; transform: rotate(15deg); }

.btn-toggle { background: #f0fdf4; color: var(--success); }
.btn-toggle:hover { background: var(--success); color: white; transform: rotate(-15deg); }

.btn-delete { background: #fef2f2; color: var(--danger); }
.btn-delete:hover { background: var(--danger); color: white; transform: scale(1.1); }

/* SweetAlert Custom UI Styling */
.swal2-popup {
    border-radius: 24px !important;
    padding: 30px !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-title {
    font-weight: 800 !important;
    color: #0f172a !important;
}

.swal2-input, .swal2-textarea {
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    transition: var(--transition) !important;
}

.swal2-input:focus, .swal2-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.swal2-confirm {
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 30px !important;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .app-container {
        padding: 30px 20px;
        border-radius: 0;
    }
    #taskForm {
        grid-template-columns: 1fr;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .btn-add {
        grid-column: span 1;
    }
    h1 {
        font-size: 2.2rem;
    }
    li {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    #taskList {
        grid-template-columns: 1fr;
    }
}
