/* ===== Yarışlar (Contest) public səhifə — reytinq dizaynına yaxın ===== */
.ct-page {
    padding: 18px 0 60px;
}

.ct-shell {
    max-width: 1040px;
    margin: 0 auto;
}

/* Kampaniya bloku */
.ct-block {
    margin-bottom: 40px;
}

/* Afişa */
.ct-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: 20px;
    overflow: hidden;
    background: #0b1f3a;
    box-shadow: 0 18px 50px rgba(11, 31, 58, .18);
}

.ct-banner__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(26px) brightness(.55);
    transform: scale(1.18);
}

.ct-banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ct-banner__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 24px;
    background: linear-gradient(to top, rgba(6, 18, 38, .85), rgba(6, 18, 38, 0));
    color: #fff;
}

.ct-banner__title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.ct-banner__subtitle {
    font-size: 14px;
    opacity: .9;
    margin-top: 4px;
}

.ct-banner__status {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
}

/* Heç afişa yoxdursa sadə başlıq */
.ct-head-plain {
    background: linear-gradient(135deg, #0b1f3a, #13315c);
    color: #fff;
    border-radius: 20px;
    padding: 26px 24px;
}

.ct-head-plain h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

/* "Mənim nəticəm" */
.ct-me {
    margin-top: 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.ct-me__item {
    display: flex;
    flex-direction: column;
}

.ct-me__label {
    font-size: 12px;
    color: #047857;
    font-weight: 600;
}

.ct-me__value {
    font-size: 20px;
    font-weight: 800;
    color: #065f46;
}

.ct-me__next {
    font-size: 13px;
    color: #065f46;
    margin-left: auto;
}

/* Pillələr */
.ct-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.ct-tier {
    flex: 1 1 130px;
    background: #fff;
    border: 1px solid #e6eefc;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(11, 31, 58, .06);
}

.ct-tier__count {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.ct-tier__bonus {
    font-size: 20px;
    font-weight: 800;
    color: #d4a017;
    margin-top: 2px;
}

.ct-tier.is-reached {
    border-color: #16a34a;
    background: #f0fdf4;
}

.ct-tier.is-reached .ct-tier__bonus {
    color: #16a34a;
}

/* Reytinq sətirləri */
.ct-board {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ct-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.ct-row.is-me {
    border-color: #16a34a;
    background: #f6fffb;
}

.ct-rank {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #0b1f3a;
    background: #f1f5f9;
    flex-shrink: 0;
}

.ct-row-first .ct-rank {
    background: linear-gradient(135deg, #ffd700, #daa520);
    color: #5b4500;
}

.ct-row-second .ct-rank {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.ct-row-third .ct-rank {
    background: linear-gradient(135deg, #fcd9b6, #e6a157);
    color: #5b3a14;
}

.ct-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ct-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #13315c, #2563eb);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

.ct-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-user-info {
    min-width: 0;
}

.ct-login {
    font-size: 16px;
    font-weight: 700;
    color: #0b1f3a;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ct-position {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ct-invite {
    text-align: right;
    flex-shrink: 0;
}

.ct-invite__num {
    font-size: 24px;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}

.ct-invite__label {
    font-size: 12px;
    color: #94a3b8;
}

.ct-invite__bonus {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    margin-top: 3px;
}

.ct-empty {
    text-align: center;
    color: #94a3b8;
    padding: 30px;
}

@media (max-width: 600px) {
    .ct-banner {
        aspect-ratio: 4/3;
    }

    .ct-banner__title {
        font-size: 19px;
    }

    .ct-avatar {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .ct-login {
        font-size: 14px;
    }

    .ct-invite__num {
        font-size: 20px;
    }
}

/* ── Səhifə başlığı + keçidlər (aktiv/keçmiş) ── */
.ct-pagebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ct-pagebar__title {
    font-size: 22px;
    font-weight: 800;
    color: #0b1f3a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-pagebar__title i {
    color: #f59e0b;
}

.ct-pagebar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f0f7ff;
    transition: .15s;
}

.ct-pagebar__link:hover {
    background: #e0efff;
    text-decoration: none;
}

/* ── Keçmiş səhifə ── */
.ct-past-dates {
    font-size: 13px;
    color: #64748b;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ct-paid-label {
    color: #16a34a;
    font-weight: 700;
}

.ct-me-past {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.ct-me-past .ct-me__label {
    color: #64748b;
}

.ct-me-past .ct-me__value {
    color: #0b1f3a;
}

.ct-block-past .ct-banner {
    filter: saturate(.92);
}
