* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

h1#taskList {
    color: #fff;
    margin-bottom: 20px;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h2#tasks {
    color: #fff;
    margin: 25px 0 10px 0;
    font-size: 1.4rem;
    align-self: flex-start;
    max-width: 450px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    max-width: 450px;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

button {
    width: 100%;
    max-width: 450px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

#btnAdd {
    background-color: #48bb78;
    color: white;
}

#btnAdd:hover {
    background-color: #38a169;
}

#btnClear {
    background-color: #f56565;
    color: white;
    margin-top: 15px;
}

#btnClear:hover {
    background-color: #e53e3e;
}

button:active {
    transform: scale(0.98);
}

ul#itemsTasks {
    list-style: none;
    width: 100%;
    max-width: 450px;
    margin-top: 5px;
}

ul#itemsTasks li {
    background: #fff;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
}

ul#itemsTasks li button {
    background-color: #fed7d7;
    color: #c53030;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    width: auto;
    max-width: none;
    margin-bottom: 0;
    box-shadow: none;
    transition: background 0.2s;
}

ul#itemsTasks li button:hover {
    background-color: #feb2b2;
}

#errorMsg {
    color: #fff;
    background-color: rgba(229, 62, 62, 0.8);
    width: 100%;
    max-width: 450px;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 5px;
    min-height: 20px;
}
.active {
    background: #d4edda !important;  /* أخضر فاتح */
}
.waiting {
    background: #f0f0f0 !important; /* رمادي فاتح */
}
.completed {
    background: #cce5ff !important; /* أزرق فاتح */
    text-decoration: line-through;
}