@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

body {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e130c, #9a8478);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
}

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

/* Main Container (Glassmorphism) */
.container {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    width: 600px;
    max-width: 90%;
    height: 80vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    background: -webkit-linear-gradient(#fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 15px;
    width: 100%;
}

.input {
    flex-grow: 1;
    border-radius: 12px;
    height: 3.5rem;
    border: none;
    padding: 0 1.5rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.input:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
}

/* Buttons */
.btn {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    height: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn:active {
    transform: scale(0.95);
}

.btn-add {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.4);
}
.btn-add:hover {
    box-shadow: 0 6px 20px rgba(0, 176, 155, 0.6);
    transform: translateY(-2px);
}

/* Action Buttons (Ghost style with Glass) */
.todos-filter {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* List Area */
.todos-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.2s, background 0.2s;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.todo-item p {
    font-size: 1.1rem;
    word-break: break-all;
    flex-grow: 1;
    margin-right: 15px;
}

.todo-item strike {
    opacity: 0.6;
    color: #ffd700;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.todo-actions .btn {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
    border-radius: 8px;
}

.btn-success {
    background: #28a745;
    color: white;
}
.btn-success:hover {
    background: #218838;
}

.btn-error {
    background: #dc3545;
    color: white;
}
.btn-error:hover {
    background: #c82333;
}

.di, .ci {
    pointer-events: none;
}

/* Bottom Filters & Stats */
.filters {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 10;
    overflow: hidden;
    margin-bottom: 5px;
}

.dropdown-content a {
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background: rgba(255, 255, 255, 0.2);
}

.completed-task, .remaining-task {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
}
span#c-count, span#r-count {
    font-weight: bold;
    color: #00f2fe;
}
