:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #fff;
    --text-muted: #e0e0e0;
    --danger-color: #ff5f5f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f0c29;  /* Fallback */
    overflow: hidden; /* Prevent scrollbars from shapes */
}

/* Background Animation */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0f0c29, #302b63, #24243e);
}

.shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    animation: float 10s infinite alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #6a11cb;
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: #2575fc;
    bottom: -80px;
    right: -80px;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 50px) rotate(10deg); }
}

/* Glass Container */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 2rem;
    width: 400px;
    max-width: 90%;
    color: var(--text-color);
}

header {
    margin-bottom: 1.5rem;
}

header h1 {
    font-weight: 600;
    font-size: 2rem;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Input Section */
.input-group {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    border-radius: 10px;
    color: #fff;
    outline: none;
    font-size: 1rem;
    transition: 0.3s;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.input-group button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    width: 45px;
    height: 45px; /* Match input height roughly */
    margin-left: 10px;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--secondary-color);
}

/* List Items */
ul {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
ul::-webkit-scrollbar {
    width: 5px;
}
ul::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

li:hover {
    background: rgba(255, 255, 255, 0.15);
}

.task-text {
    flex: 1;
    margin-left: 10px;
    font-size: 1rem;
    transition: 0.3s;
}

li.completed .task-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
}

li.completed .check-icon {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.check-icon {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: 0.3s;
}

.delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    padding: 5px;
}

.delete-btn:hover {
    color: var(--danger-color);
}

/* Footer Info */
.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

#clear-all {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: 0.3s;
}

#clear-all:hover {
    background: rgba(255, 255, 255, 0.2);
}
