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

body {
    background: #1a1a2e;
    color: #fff;
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stars::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 
        100px 200px #fff, 300px 100px #fff, 500px 300px #fff,
        700px 150px #fff, 200px 400px #fff, 600px 50px #fff,
        800px 250px #fff, 150px 350px #fff, 450px 200px #fff,
        750px 400px #fff, 50px 150px #fff, 350px 450px #fff,
        550px 100px #fff, 250px 300px #fff, 650px 200px #fff,
        850px 350px #fff, 400px 50px #fff, 100px 450px #fff,
        900px 100px #fff, 50px 300px #fff;
    animation: blink 2s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.3; transform: translateY(0px); }
    50% { opacity: 1; transform: translateY(-10px); }
    100% { opacity: 0.3; transform: translateY(0px); }
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 40px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glitter 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    position: relative;
}

h1::before {
    content: '✨';
    position: absolute;
    left: -50px;
    animation: bounce 2s infinite;
}

h1::after {
    content: '✨';
    position: absolute;
    right: -50px;
    animation: bounce 2s infinite 0.5s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes glitter {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 200px;
    padding: 18px 25px;
    border: 2px solid transparent;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: #fff;
    font-size: 16px;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

input:focus {
    outline: none;
    border: 2px solid #4ecdc4;
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.4), 0 0 60px rgba(78, 205, 196, 0.1);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 255, 255, 0.05));
}

input::placeholder {
    color: #aaa;
}

button {
    padding: 18px 35px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 200% 200%;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.4), 0 5px 15px rgba(255, 107, 107, 0.2);
    animation-duration: 1s;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#todoList {
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.todo-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(78, 205, 196, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.todo-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(78, 205, 196, 0.25), 0 10px 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
}

.todo-text {
    flex: 1;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.complete-btn {
    background: linear-gradient(135deg, #96ceb4, #feca57, #ff9ff3);
    background-size: 200% 200%;
    color: #fff;
    animation: gradientMove 4s ease infinite;
}

.delete-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52, #ff4757);
    background-size: 200% 200%;
    color: #fff;
    animation: gradientMove 4s ease infinite reverse;
}

.btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
}

.glitter-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    animation: float 2s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.5; }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
        padding: 30px 20px;
        width: 100%;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 25px;
    }
    
    h1::before, h1::after {
        display: none;
    }
    
    .input-section {
        flex-direction: column;
        gap: 15px;
    }
    
    input {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        min-width: unset;
    }
    
    button {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .stats {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .todo-item {
        flex-direction: column;
        gap: 15px;
        text-align: left;
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .todo-text {
        font-size: 16px;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .todo-actions {
        justify-content: center;
        gap: 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    #todoList {
        padding: 15px;
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    input, button {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .todo-item {
        padding: 15px 12px;
    }
    
    .todo-text {
        font-size: 15px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
    }
    
    #todoList {
        padding: 12px;
    }
}
