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

:root {
    --cream: #FAF6F1;
    --magenta: #E91E8C;
    --black: #1A1A1A;
    --gray: #6B6B6B;
    --light-pink: #FFE5F1;
    --success: #4CAF50;
    --warning: #FF9800;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, #FFE5F1 100%);
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Flores de fondo decorativas */
.bg-flower {
    position: fixed;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.bg-flower:nth-child(1) {
    top: 10%;
    left: 5%;
    font-size: 100px;
    animation: float 6s ease-in-out infinite;
}

.bg-flower:nth-child(2) {
    top: 60%;
    right: 10%;
    font-size: 120px;
    animation: float 8s ease-in-out infinite;
    animation-delay: 1s;
}

.bg-flower:nth-child(3) {
    bottom: 10%;
    left: 15%;
    font-size: 80px;
    animation: float 7s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Contenedor principal */
.container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--black);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--magenta);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Input section */
.input-section {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--cream);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.task-input:focus {
    border-color: var(--magenta);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.add-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--magenta), #ff4db8);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(233, 30, 140, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 140, 0.4);
}

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

/* Priority selector */
.priority-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.priority-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--cream);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.priority-btn:hover {
    border-color: var(--magenta);
}

.priority-btn.active {
    background: var(--magenta);
    color: white;
    border-color: var(--magenta);
}

/* Filters */
.filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    background: white;
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--gray);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    border-color: var(--magenta);
    color: var(--magenta);
}

.filter-btn.active {
    background: var(--magenta);
    color: white;
    border-color: var(--magenta);
}

/* Tasks list */
.tasks-container {
    animation: fadeInUp 0.8s ease;
    animation-delay: 0.6s;
    animation-fill-mode: backwards;
}

.task-item {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.task-item.completed {
    opacity: 0.6;
}

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

/* Checkbox custom */
.task-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--magenta);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.task-checkbox:hover {
    background: rgba(233, 30, 140, 0.1);
}

.task-item.completed .task-checkbox {
    background: var(--magenta);
}

.task-item.completed .task-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

/* Priority badge */
.priority-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-badge.high {
    background: #FFE5E5;
    color: #D32F2F;
}

.priority-badge.medium {
    background: #FFF3E0;
    color: var(--warning);
}

.priority-badge.low {
    background: #E8F5E9;
    color: var(--success);
}

/* Task content */
.task-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-text {
    flex: 1;
    font-size: 1.05rem;
    color: var(--black);
    word-break: break-word;
}

/* Task actions */
.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.edit-btn {
    background: #E3F2FD;
    color: #1976D2;
}

.edit-btn:hover {
    background: #1976D2;
    color: white;
    transform: scale(1.1);
}

.delete-btn {
    background: #FFEBEE;
    color: #D32F2F;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.8s ease;
}

.empty-state img {
    width: 150px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Clear all button */
.clear-completed {
    text-align: center;
    margin-top: 1rem;
}

.clear-btn {
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--gray);
    border: 2px solid var(--gray);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.clear-btn:hover {
    background: var(--magenta);
    color: white;
    border-color: var(--magenta);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

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

    .filters {
        flex-wrap: wrap;
    }

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

    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
}