/* ==========================================
   GLOBAL STYLES
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #000430;
    --card: #171c48;
    --text: #ffffff;
    --purple: #828dff;
    --teal: #24feefab;
}

body {
    background: var(--bg);
    color: var(--text);
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* ==========================================
   CONTAINER
========================================== */

.container {
    width: 100%;
    max-width: 96%;
    margin: 5px auto;
    height: calc(100dvh - 50px);
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
        margin: 0;
        height: 100dvh;
        padding: 5px;
    }
}

/* ==========================================
   HEADER / STATS CONTAINER
========================================== */

.stats-container {
    width: 50%;
    margin: auto;
    background: linear-gradient(135deg, #11163f, #0a0f2f, #29104a);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    flex-shrink: 0;
    position: relative;
}

/* moving light effects */
.stats-container::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(36, 254, 238, .22) 0%,
            rgba(36, 254, 238, .10) 25%,
            transparent 70%);
    filter: blur(20px);
    top: -60px;
    left: -60px;
    animation: moveLight 8s linear infinite;
    z-index: -1;
}

.stats-container::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(130, 140, 255, .31) 0%,
            transparent 70%);
    filter: blur(22px);
    bottom: -50px;
    right: -40px;
    animation: moveLight2 10s linear infinite;
    z-index: -1;
}

@keyframes moveLight {
    0% { transform: translate(0, 0); }
    25% { transform: translate(260px, 30px); }
    50% { transform: translate(180px, 110px); }
    75% { transform: translate(40px, 70px); }
    100% { transform: translate(0, 0); }
}

@keyframes moveLight2 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-120px, -20px); }
    50% { transform: translate(-220px, -90px); }
    75% { transform: translate(-80px, -40px); }
    100% { transform: translate(0, 0); }
}

/* ==========================================
   DETAILS SECTION
========================================== */

.details {
    width: 100%;
}

.details h1 {
    font-size: 34px;
    margin-bottom: 6px;
}

.details h5 {
    opacity: .9;
    margin-bottom: 10px;
}

.details p {
    opacity: .75;
    font-size: 15px;
}

/* ==========================================
   PROGRESS CIRCLE
========================================== */

#numbers {
    width: 110px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background: conic-gradient(#24feee 0deg, rgba(255, 255, 255, .08) 0deg);
}

#numbers::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #11163f;
}

#numbers span {
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* ==========================================
   FORM / INPUT SECTION
========================================== */

form {
    width: 50%;
    margin: auto;
    margin-top: 25px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    form {
        width: 100%;
        margin: 20px auto;
        padding: 0 5px;
    }
}

#taskInput {
    flex: 1;
    padding: 14px;
    border: none;
    outline: none;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--purple);
    color: #fff;
}
@media (max-width: 850px) {

    .stats-container{
        width: 100%;
    }
    form{
        width: 100%;
    }
    .task-list{
        width: 100%;
    }
}

#taskInput::placeholder {
    color: rgba(255, 255, 255, .5);
}

button {
    width: 52px;
    border: none;
    border-radius: 12px;
    background: var(--purple);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

button:active {
    transform: scale(.95);
}

/* ==========================================
   TASK LIST
========================================== */

.task-list {
    width: 50%;
    margin: auto;
    margin-top: 20px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

@media (max-width: 480px) {
    .task-list {
        width: 100%;
        margin: 10px auto;
        padding: 5px;
    }
}

/* scrollbar styling */
.task-list::-webkit-scrollbar {
    width: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: #828dff;
    border-radius: 20px;
}

/* ==========================================
   TASK ITEMS
========================================== */

.taskItem {
    background: var(--card);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

@media (max-width: 480px) {
    .taskItem {
        padding: 10px;
        gap: 8px;
    }
}

.left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* ==========================================
   CHECKBOX
========================================== */

.checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    min-width: 25px;
    min-height: 25px;
    flex-shrink: 0;
    border: 2px solid #828dff;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: .25s ease;
}

.checkbox::before {
    content: "✔";
    color: #000;
    font-weight: 900;
    transform: scale(0);
    transition: .2s ease;
}

.checkbox:checked {
    background: #24feefc6;
    border-color: #24feee;
    box-shadow: 0 0 10px rgba(36, 254, 239, .62);
}

.checkbox:checked::before {
    transform: scale(1);
}

.checkbox:hover {
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .checkbox {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
    }
}

/* ==========================================
   TASK TEXT & EDITING
========================================== */

.taskText {
    word-break: break-word;
}

.completed .taskText {
    text-decoration: line-through;
    color: var(--teal);
}

.textWrap {
    width: 100%;
}

.editInput {
    width: 100%;
    background: transparent;
    color: #fff;
    padding: 7px 10px;
    border-radius: 8px;
    outline: none;
    border: none;
}

/* ==========================================
   ICONS (EDIT & DELETE)
========================================== */

.icons {
    display: flex;
    gap: 8px;
}

.icons i {
    font-size: 22px;
    cursor: pointer;
}

.ri-edit-box-line {
    color: var(--purple);
}

.ri-delete-bin-6-line {
    color: #ff4d4d;
}

/* ==========================================
   MOBILE RESPONSIVE (480px & below)
========================================== */

@media (max-width: 480px) {
    .stats-container {
        width: 100%;
        padding: 15px;
        margin: 5px auto;
    }

    .details h1 {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .details h5 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .details p {
        font-size: 13px;
    }

    #numbers {
        width: 70px;
    }

    #numbers span {
        font-size: 16px;
    }

    #taskInput {
        padding: 12px;
        font-size: 16px;
    }

    button {
        width: 48px;
        font-size: 26px;
        margin: 0;
    }

    .taskText {
        font-size: 14px;
    }

    .icons .ri-edit-box-line,
    .icons .ri-delete-bin-6-line {
        font-size: 20px;
        width: 36px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        background: #0d10297c;
    }
}
