/* === Global === */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    min-height: 100vh;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.4s ease, color 0.3s ease;
    color: #2b2b2b;
}

.container {
    flex: 1;
}

/* Typography */
h1, h3, h4 {
    color: #2c2c2c;
}

h1 {
    background: linear-gradient(90deg, #ff416c, #c3260a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

h3.text-primary {
    background: linear-gradient(90deg, #3a3a3a 0%, #0d6efd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h4.text-secondary {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 20px 0 15px;
    border-bottom: 2px solid #6a11cb;
    display: inline-block;
    padding-bottom: 5px;
}

/* === Card === */
.card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    max-width: 600px;
    margin: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: inherit;
}

/* === Task Form === */
.task-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-form input {
    flex: 1;
    border-radius: 30px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #333;
}

.task-form input:focus {
    border-color: #2684FF;
    box-shadow: 0 0 0 4px rgba(38, 132, 255, 0.2);
    outline: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.task-form button {
    width: 50px;
    height: 50px;
    background-color: #0d6efd;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.task-form button:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    animation: bounce 0.4s;
}

.plus-icon {
    color: #ffd700;
    font-size: 1.8rem;
    transition: transform 0.5s ease;
}

.task-form button:hover .plus-icon {
    transform: rotate(360deg);
}

/* === Delete Button === */
.delete-btn {
    background-color: #dc3545;
    border: none;
    color: white;
    padding: 5px 10px;
    font-size: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* === Task List === */
#task-list li {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px;
    transition: background-color 0.3s ease;
}

#task-list li:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* === Animations === */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.fade-out {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.3s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* === Toggle Button === */
.toggle-mode-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-color: white;
    color: #f0b400;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-mode-btn:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
}

/* === Dark Mode === */
.dark-mode {
    background: linear-gradient(135deg, #1f1c2c 0%, #928dab 100%);
    color: #ffffff;
}

.dark-mode .card,
.dark-mode input,
.dark-mode button,
.dark-mode .list-group-item,
.dark-mode #task-list li {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

.dark-mode input::placeholder {
    color: #ccc;
}

.dark-mode #task-list li:hover {
    background-color: #444;
}

.dark-mode footer a {
    color: #ffc107 !important;
}
body.dark-mode h3.text-primary {
    color: #b3d4ff;
    -webkit-text-fill-color: initial;
    background: none;
}

/* === Footer === */
footer {
    color: inherit;
    background: none !important;
    border-top: none;
    font-size: 0.875rem;
}
