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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 25%),
                radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.18), transparent 18%),
                linear-gradient(135deg, #090b18 0%, #151a32 100%);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    padding: 24px;
    color: #e2e8f0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 30px 80px rgba(6, 182, 212, 0.1);
    }
    50% {
        box-shadow: 0 30px 80px rgba(6, 182, 212, 0.22);
    }
}

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

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

/* 🧱 centered app card */
.app-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(16, 24, 40, 0.96);
    padding: 44px 42px;
    border-radius: 28px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease both;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.app-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 36px 95px rgba(0, 0, 0, 0.55);
}

.app-container::before {
    content: '';
    position: absolute;
    top: -18%;
    right: -18%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 55%);
    filter: blur(18px);
}

.app-container::after {
    content: '';
    position: absolute;
    bottom: -12%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.14), transparent 55%);
    filter: blur(22px);
}

/* title */
.title {
    text-align: center;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 36%, #0284c7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 36px;
    margin-bottom: 10px;
    letter-spacing: -0.75px;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
    position: relative;
}

.title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(16, 185, 129, 0.95));
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
    animation: floatUp 4s ease-in-out infinite;
}

/* counter */
#taskCounter {
    text-align: center;
    color: #cbd5e1;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* input labels */
.input-label {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* inputs */
input, select {
    background: rgba(38, 42, 74, 0.95) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    transition: all 0.25s ease !important;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.22);
}

input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

select option {
    background: #1f2937;
    color: #e2e8f0;
}

input:hover, select:hover {
    border-color: rgba(56, 189, 248, 0.45) !important;
}

input:focus, select:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    background: rgba(38, 42, 74, 1) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18) !important;
}

/* button styling */
.btn {
    border-radius: 14px !important;
    font-weight: 700 !important;
    transition: all 0.22s ease !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    letter-spacing: 0.25px;
}

.btn-dark {
    background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 45%, #0f766e 100%) !important;
    background-size: 200% 200% !important;
    border: none !important;
    color: #f8fafc !important;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.25);
    animation: gradientShift 6s ease infinite !important;
}

.btn-dark:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 38px rgba(14, 165, 233, 0.32);
}

.btn-outline-danger {
    border: 2px solid #f87171 !important;
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
    backdrop-filter: blur(6px);
}

.btn-outline-danger:hover {
    background: rgba(248, 113, 113, 0.16) !important;
    transform: translateY(-2px) scale(1.01);
}

/* list items */
.list-group-item {
    background: rgba(27, 30, 53, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(71, 85, 105, 0.22);
    border-left: 6px solid rgba(56, 189, 248, 0.45);
    margin-top: 14px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 18px !important;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.35s ease forwards;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(27, 30, 53, 0.96), rgba(15, 23, 42, 0.96));
    border-left-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.list-group-item:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 18px 40px rgba(56, 189, 248, 0.16);
    background: rgba(49, 55, 97, 0.98);
}

.list-group-item.completed {
    background: rgba(15, 23, 42, 0.96);
    color: #94a3b8;
    border-color: rgba(71, 85, 105, 0.16);
    opacity: 0.65;
}

.list-group-item.completed .tag {
    opacity: 0.7;
}

.list-group-item.completed button {
    opacity: 0.7;
}

/* category tag */
.tag {
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    background: rgba(14, 165, 233, 0.12);
    color: #dbeafe;
    border: 1px solid rgba(14, 165, 233, 0.18);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.08);
}

.tag::before {
    content: '';
    margin-right: 8px;
}

.tag[data-category="School"]::before {
    content: "📚";
}

.tag[data-category="Work"]::before {
    content: "💼";
}

.tag[data-category="Personal"]::before {
    content: "✨";
}

.tag.school {
    background: rgba(56, 189, 248, 0.15);
    color: #81d8f7;
    border-color: rgba(56, 189, 248, 0.28);
}

.tag.work {
    background: rgba(252, 211, 77, 0.16);
    color: #fbbf24;
    border-color: rgba(252, 211, 77, 0.28);
}

.tag.personal {
    background: rgba(236, 72, 153, 0.16);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.28);
}

.list-group-item.school {
    border-left-color: #0d9488;
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.12);
}

.list-group-item.work {
    border-left-color: #d97706;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.12);
}

.list-group-item.personal {
    border-left-color: #db2777;
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.14);
}

/* completed */
.completed {
    text-decoration: line-through;
    opacity: 0.5;
    color: #6b7280;
}

/* responsive layout for smaller screens */
@media (max-width: 768px) {
    .app-container {
        padding: 28px 20px;
    }

    .title {
        font-size: 30px;
    }

    .input-label {
        font-size: 11px;
    }

    .btn {
        width: 100% !important;
    }

    .row {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .row > [class*="col-"] {
        width: 100% !important;
        min-width: 0;
    }

    .row .col-7,
    .row .col-3,
    .row .col-2 {
        flex: 1 1 100%;
    }

    .list-group-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .list-group-item button {
        width: 100%;
        justify-self: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .app-container {
        padding: 22px 16px;
        border-radius: 24px;
    }

    .title {
        font-size: 28px;
    }

    .app-container::before,
    .app-container::after {
        width: 160px;
        height: 160px;
    }

    .list-group-item {
        padding: 14px 14px !important;
    }

    .tag {
        font-size: 10px;
        padding: 5px 10px;
    }
}
