:root {
    /* 🌤 Light Theme Colors */
    --bg-color: #f4f7fb;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --input-bg: #ffffff;
    --border-color: #e5e7eb;
    --primary: #2563eb;
}

/* 🌙 Dark Theme */
body.dark {
    --bg-color: #0f172a;
    --card-bg: #020617;
    --text-color: #e5e7eb;
    --input-bg: #020617;
    --border-color: #1e293b;
    --primary: #3b82f6;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.4s ease;
}

/* Card */
.todo-container {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: background 0.4s;
}

/* Title */
.todo-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 🌙 Toggle Button */
.theme-toggle {
    margin: 0 auto 15px;
    display: block;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.2) rotate(15deg);
}

/* Input */
.input-box {
    display: flex;
    gap: 10px;
}

.input-box input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    outline: none;
    background: var(--input-bg);
    color: var(--text-color);
}

.input-box input:focus {
    border-color: var(--primary);
}

/* Add Button */
.input-box button {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.input-box button:hover {
    transform: translateY(-2px);
}

/* Result */
.result {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Todo Card */
.singleTodo {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.singleTodo:hover {
    transform: translateY(-3px);
}

/* Text */
.singleTodo p {
    flex: 1;
    color: var(--text-color);
}

/* Buttons */
.singleTodo button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
}

/* Delete */
.singleTodo button:first-of-type {
    background: #ef4444;
    color: white;
}

/* Edit */
.singleTodo button:last-of-type {
    background: #22c55e;
    color: white;
}

/* Mobile */
@media (max-width: 480px) {
    .singleTodo {
        flex-direction: column;
        align-items: stretch;
    }

    .singleTodo button {
        width: 100%;
    }
}
/* Heading style */
h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Emoji Animation */
.emoji {
    display: inline-block;
    margin-right: 8px;
    animation: bounce 1.2s infinite alternate;
}

/* Bounce / float animation */
@keyframes bounce {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-10deg);
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}
