/* ---------- Tasks grid ---------- */

.tasks-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 36px;
}

.task-item{
    position: relative;
    overflow: hidden;

    min-height: 240px;
    padding: 34px;
    border-radius: 30px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition: 0.35s ease;
}

.task-item::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(135deg, rgba(56,189,248,0.10), transparent 45%);
    opacity: 0;
    transition: 0.35s;
}

.task-item > *{
    position: relative;
    z-index: 2;
}

.task-item:hover{
    transform: translateY(-8px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(56,189,248,0.18);
}

.task-item:hover::before{
    opacity: 1;
}

.task-item h2{
    margin: 0 0 22px;
    font-size: 34px;
    letter-spacing: -1px;
    color: white;
}

.open-task-btn{
    display: inline-block;
    position: relative;
    z-index: 5;
    margin-top: 18px;
    color: #020617;
    text-decoration: none;
}

/* ---------- Number cards ---------- */

.numbers-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

.number-card{
    position: relative;
    overflow: hidden;

    padding: 25px;
    border-radius: 28px;
    transition: 0.35s ease;
}

.number-card::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(135deg, rgba(56,189,248,0.12), transparent 40%);
    opacity: 0;
    transition: 0.4s;
}

.number-card::after{
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    z-index: 1;
    pointer-events: none;

    width: 220px;
    height: 220px;

    background: radial-gradient(circle, rgba(56,189,248,0.16), transparent 70%);
    opacity: 0;
    transition: 0.45s;
}

.number-card > *{
    position: relative;
    z-index: 2;
}

.number-card:hover{
    transform: translateY(-6px);
    border-color: rgba(56,189,248,0.7);
    box-shadow: 0 24px 55px rgba(56,189,248,0.16);
}

.number-card:hover::before,
.number-card:hover::after{
    opacity: 1;
}

.number-badge{
    display: inline-block;
    background: #38bdf8;
    color: #020617;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    margin-bottom: 15px;
}

.number-topic{
    color: #e5e7eb;
    font-size: 17px;
    min-height: 45px;
}

.open-number-btn{
    display: inline-block;
    position: relative;
    z-index: 5;

    margin-top: 15px;
    color: #020617;
    text-decoration: none;
}

/* ---------- Breadcrumbs / back buttons ---------- */

.breadcrumbs{
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 15px;
}

.breadcrumbs a{
    color: #38bdf8;
    text-decoration: none;
}

.breadcrumbs a:hover{
    color: white;
}

.breadcrumbs span{
    margin: 0 6px;
}

.back-btn,
.back-to-topic-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 25px;

    background: #0f172a;
    color: #38bdf8;

    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;

    border: 1px solid #334155;
    transition: 0.3s;
}

.back-btn:hover,
.back-to-topic-btn:hover{
    background: #1e293b;
    border-color: #38bdf8;
    color: white;
}

/* ---------- Filters / progress ---------- */

.progress-box{
    margin-bottom: 30px;
}

.progress-text{
    margin-bottom: 10px;
    color: #cbd5e1;
    font-weight: 600;
}

.progress-bar,
.number-progress-bar{
    width: 100%;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #334155;
}

.progress-bar{
    height: 14px;
}

.progress-fill,
.number-progress-fill{
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 999px;
    transition: 0.3s;
}

.filters-row{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 34px;
}

.filters-row a{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    border-radius: 999px;

    background: rgba(15,23,42,0.75);
    border: 1px solid rgba(255,255,255,0.08);

    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;

    transition: 0.3s;
}

.filters-row a:hover{
    border-color: #38bdf8;
    color: white;
    background: rgba(56,189,248,0.10);
    transform: translateY(-2px);
}

.filters-row a.active{
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(56,189,248,0.22);
}

/* ---------- Daily task ---------- */

.daily-task{
    margin: 40px 0;
}

.daily-task-card{
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #0f172a;
    border: 1px solid #334155;

    padding: 22px 26px;
    border-radius: 18px;
}

.daily-task-card strong{
    color: #38bdf8;
    font-size: 24px;
}

.daily-task-card p{
    color: #cbd5e1;
    margin-bottom: 0;
}

.daily-task-btn{
    color: #020617;
    text-decoration: none;
}

/* ---------- Search task row ---------- */

.search-task-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 18px;
}

.search-task-top h2{
    margin: 0 !important;
}

.search-task-id{
    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(148,163,184,0.12);
    border: 1px solid rgba(148,163,184,0.2);

    color: #cbd5e1;

    font-size: 13px;
    font-weight: 700;
}

/* ---------- Tasks list responsive ---------- */

@media (max-width: 768px) {
    .tasks-grid,
    .directions-grid,
    .stats-grid{
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .task-item{
        min-height: auto;
        padding: 24px;
        border-radius: 24px;
    }

    .task-item h2{
        font-size: 28px;
    }

    .daily-task-card{
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .number-card{
        min-height: 190px;
        padding: 24px;
        border-radius: 24px;

        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .number-badge{
        width: fit-content;
        margin-bottom: 14px;

        font-size: 15px;
        line-height: 1;
    }

    .number-topic{
        min-height: auto;
        font-size: 18px;
        line-height: 1.35;
        margin-bottom: 18px;
    }

    .open-number-btn{
        width: 100%;
        text-align: center;
        margin-top: auto;
    }
}

/* ---------- Training start button ---------- */

.training-start-box{
    width: 100%;

    margin: 0 0 32px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.training-start-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 58px;

    padding: 0 28px;

    border-radius: 18px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);

    border: 1px solid rgba(125, 211, 252, 0.55);

    color: #020617 !important;

    font-size: 17px;
    font-weight: 950;
    line-height: 1;

    text-decoration: none;

    box-shadow:
        0 18px 46px rgba(56, 189, 248, 0.28),
        0 0 0 6px rgba(56, 189, 248, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.training-start-btn:hover{
    transform: translateY(-2px);

    border-color: rgba(186, 230, 253, 0.9);

    box-shadow:
        0 24px 58px rgba(56, 189, 248, 0.36),
        0 0 0 8px rgba(56, 189, 248, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.training-start-btn:active{
    transform: translateY(0);
}
