:root {
    --ar-panel: rgba(18, 20, 29, 0.68);
    --ar-panel-soft: rgba(255, 255, 255, 0.03);
    --ar-border: rgba(255, 255, 255, 0.08);
    --ar-border-strong: rgba(255, 255, 255, 0.14);
    --ar-text: #ffffff;
    --ar-text-muted: #aeb6d2;
    --ar-text-dim: #707893;
    --ar-accent: #4fea9f;
    --ar-accent-hover: #22b877;
    --ar-amber: #ffd15f;
    --ar-radius: 20px;
    --ar-tracking: 0.18em;
    --ar-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    --ar-blur-main: blur(20px) saturate(180%);
    --ar-blur-sub: blur(12px);
}

/* ====================================================================
   Страница наград за активность (Glassmorphic Activity Rewards)
   ==================================================================== */

.ar-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

/* ---- Герой-блок (Hero Card) ---- */
.ar-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 32px 28px;
    background: var(--ar-panel);
    backdrop-filter: var(--ar-blur-main);
    -webkit-backdrop-filter: var(--ar-blur-main);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
    isolation: isolate;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ar-hero:hover {
    border-color: rgba(79, 234, 159, 0.25);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 22px rgba(79, 234, 159, 0.08);
}

.ar-hero__number {
    position: absolute;
    z-index: 0;
    bottom: -22px;
    right: -8px;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 150px;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(79, 234, 159, 0.06);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.ar-hero__top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ar-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: var(--ar-tracking);
    text-transform: uppercase;
    color: var(--ar-text-muted);
}

.ar-hero__eyebrow-rule {
    width: 22px;
    height: 1px;
    background: var(--ar-border-strong);
    flex-shrink: 0;
}

/* Чип серии входов */
.ar-hero__streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(79, 234, 159, 0.12);
    backdrop-filter: var(--ar-blur-sub);
    -webkit-backdrop-filter: var(--ar-blur-sub);
    border: 1px solid rgba(79, 234, 159, 0.35);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--ar-accent);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 15px rgba(79, 234, 159, 0.18);
}

.ar-hero__streak-chip i { 
    font-size: 15px; 
    filter: drop-shadow(0 0 6px rgba(79, 234, 159, 0.6));
}

.ar-hero__title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ar-text);
    letter-spacing: -0.5px;
}

.ar-hero__title em { 
    font-style: normal; 
    color: var(--ar-accent); 
    text-shadow: 0 0 15px rgba(79, 234, 159, 0.35);
}

.ar-hero__desc {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ar-text-muted);
    font-weight: 600;
    max-width: 560px;
}

/* ---- Карточка текущей цели (Goal Section) ---- */
.ar-goal {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(160px, 0.35fr) 1fr;
    gap: 12px;
}

.ar-goal__status,
.ar-goal__card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--ar-blur-sub);
    -webkit-backdrop-filter: var(--ar-blur-sub);
    border: 1px solid var(--ar-border);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ar-goal__status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: var(--ar-accent);
    font-size: 12.5px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(79, 234, 159, 0.3);
}

.ar-goal__status i { font-size: 18px; }

.ar-goal__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    min-width: 0;
    transition: all 0.2s ease;
}

.ar-goal__card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 209, 95, 0.35);
}

.ar-goal__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 209, 95, 0.12);
    border: 1px solid rgba(255, 209, 95, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 0 0 12px rgba(255, 209, 95, 0.2);
}

.ar-goal__icon img,
.ar-goal__icon video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.ar-goal__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.ar-goal__lead {
    font-size: 10px;
    font-weight: 900;
    color: var(--ar-amber);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ar-goal__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-goal__sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--ar-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-goal__day {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 209, 95, 0.12);
    border: 1px solid rgba(255, 209, 95, 0.3);
    color: var(--ar-amber);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 0 10px rgba(255, 209, 95, 0.18);
}

/* ---- Прогресс-бар ---- */
.ar-progress {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--ar-border);
}

.ar-progress__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.ar-progress__current {
    font-size: 17px;
    font-weight: 800;
    color: var(--ar-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
}

.ar-progress__current strong { 
    color: var(--ar-accent); 
    font-weight: 900; 
    text-shadow: 0 0 10px rgba(79, 234, 159, 0.35);
}

.ar-progress__current-suffix {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--ar-text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ar-progress__percent {
    font-size: 12px;
    font-weight: 800;
    color: var(--ar-text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.ar-progress__bar {
    position: relative;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ar-progress__fill {
    position: relative;
    height: 100%;
    background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(79, 234, 159, 0.6);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .ar-hero { padding: 22px 20px; gap: 14px; border-radius: 18px; }
    .ar-hero__title { font-size: 22px; }
    .ar-hero__desc { font-size: 13px; }
    .ar-hero__number { font-size: 100px; bottom: -16px; right: -6px; }
    .ar-goal { grid-template-columns: 1fr; }
    .ar-goal__card { align-items: flex-start; }
    .ar-goal__day { margin-left: auto; }
}

/* ---- Блок уведомления (Notice) ---- */
.ar-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255, 209, 95, 0.08);
    backdrop-filter: var(--ar-blur-sub);
    -webkit-backdrop-filter: var(--ar-blur-sub);
    border: 1px solid rgba(255, 209, 95, 0.32);
    border-radius: var(--ar-radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ar-notice__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 209, 95, 0.25), rgba(255, 209, 95, 0.1));
    border: 1px solid rgba(255, 209, 95, 0.35);
    color: var(--ar-amber);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 10px rgba(255, 209, 95, 0.25);
}

.ar-notice__title {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 800;
    color: var(--ar-amber);
    letter-spacing: -0.2px;
}

.ar-notice__desc {
    margin: 0;
    font-size: 13px;
    color: var(--ar-text-muted);
    line-height: 1.55;
    font-weight: 600;
}

.ar-notice__desc a {
    color: var(--ar-amber);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 209, 95, 0.5);
    transition: all 0.18s ease;
}

.ar-notice__desc a:hover { 
    color: var(--ar-accent); 
    border-color: rgba(79, 234, 159, 0.6); 
}

/* ---- Заголовок секций ---- */
.ar-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
    margin-top: 12px;
}

.ar-section-header__rule {
    width: 22px;
    height: 1px;
    background: var(--ar-border-strong);
    flex-shrink: 0;
}

.ar-section-header__title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: var(--ar-tracking);
    text-transform: uppercase;
    color: var(--ar-text-muted);
    flex: 1;
}

.ar-section-header__hint {
    font-size: 11px;
    color: var(--ar-text-dim);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---- Сетка карточек наград ---- */
.ar-grid,
#activity-rewards.ar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
    flex-wrap: initial;
}

@media (max-width: 768px) {
    .ar-grid,
    #activity-rewards.ar-grid { grid-template-columns: 1fr; }
}

/* ---- Карточка награды ---- */
.ar-reward {
    position: relative;
    padding: 18px;
    background: var(--ar-panel);
    backdrop-filter: var(--ar-blur-main);
    -webkit-backdrop-filter: var(--ar-blur-main);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 110px;
}

.ar-reward:hover {
    border-color: rgba(79, 234, 159, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 18px rgba(79, 234, 159, 0.1);
}

.ar-reward__day {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--ar-blur-sub);
    -webkit-backdrop-filter: var(--ar-blur-sub);
    border: 1px solid var(--ar-border-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.22s ease;
}

.ar-reward__day-num {
    font-size: 22px;
    font-weight: 900;
    color: var(--ar-text);
    line-height: 1;
    letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}

.ar-reward__day-label {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--ar-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ar-reward__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--ar-border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    transition: all 0.22s ease;
}

.ar-reward__icon img,
.ar-reward__icon video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.ar-reward__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ar-reward__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ar-text);
    line-height: 1.25;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-reward__sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--ar-text-dim);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-reward__status {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--ar-blur-sub);
    -webkit-backdrop-filter: var(--ar-blur-sub);
    border: 1px solid var(--ar-border-strong);
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ar-text-dim);
}

.ar-reward__status i { font-size: 12px; }

/* === Состояния карточек (States) === */

/* ---- Получено (Received) ---- */
.ar-reward--received .ar-reward__day {
    background: rgba(79, 234, 159, 0.12);
    border-color: rgba(79, 234, 159, 0.45);
}

.ar-reward--received .ar-reward__day-num { color: var(--ar-accent); }
.ar-reward--received .ar-reward__day-label { color: rgba(79, 234, 159, 0.85); }

.ar-reward--received .ar-reward__status {
    background: rgba(79, 234, 159, 0.12);
    border-color: rgba(79, 234, 159, 0.35);
    color: var(--ar-accent);
    box-shadow: 0 0 10px rgba(79, 234, 159, 0.2);
}

.ar-reward--received .ar-reward__icon {
    background: rgba(79, 234, 159, 0.08);
    border-color: rgba(79, 234, 159, 0.3);
}

/* ---- Доступно сейчас (Current) ---- */
.ar-reward--current {
    border-color: rgba(255, 209, 95, 0.5);
    background: linear-gradient(180deg, rgba(255, 209, 95, 0.08), transparent 60%), var(--ar-panel);
    box-shadow: var(--ar-shadow), 0 0 20px rgba(255, 209, 95, 0.15);
}

.ar-reward--current .ar-reward__day {
    background: rgba(255, 209, 95, 0.14);
    border-color: rgba(255, 209, 95, 0.45);
}

.ar-reward--current .ar-reward__day-num { color: var(--ar-amber); }
.ar-reward--current .ar-reward__day-label { color: rgba(255, 209, 95, 0.85); }

.ar-reward--current .ar-reward__status {
    background: rgba(255, 209, 95, 0.14);
    border-color: rgba(255, 209, 95, 0.35);
    color: var(--ar-amber);
    box-shadow: 0 0 10px rgba(255, 209, 95, 0.2);
}

.ar-reward--current .ar-reward__icon {
    background: rgba(255, 209, 95, 0.08);
    border-color: rgba(255, 209, 95, 0.3);
}

/* ---- Заблокировано (Locked) ---- */
.ar-reward--locked .ar-reward__title { color: var(--ar-text-muted); }
.ar-reward--locked .ar-reward__icon { opacity: 0.5; }
.ar-reward--locked .ar-reward__day-num { color: var(--ar-text-dim); }

/* ---- Загрузка (Skeleton) ---- */
.ar-skeleton {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
    grid-column: 1 / -1;
}

@media (max-width: 768px) { .ar-skeleton { grid-template-columns: 1fr; } }

.ar-skeleton__card {
    background: var(--ar-panel);
    backdrop-filter: var(--ar-blur-main);
    -webkit-backdrop-filter: var(--ar-blur-main);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    height: 110px;
    overflow: hidden;
    position: relative;
}

.ar-skeleton__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: ar-shimmer 1.6s ease-in-out infinite;
}

@keyframes ar-shimmer { to { transform: translateX(100%); } }

/* ---- Пустой блок (Empty State) ---- */
.ar-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 110px;
    padding: 18px;
    background: var(--ar-panel);
    backdrop-filter: var(--ar-blur-main);
    -webkit-backdrop-filter: var(--ar-blur-main);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow);
}

.ar-empty__icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ar-border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.ar-empty__icon img,
.ar-empty__icon video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.ar-empty__title,
.ar-empty__sub {
    display: block;
}

.ar-empty__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ar-text);
    margin-bottom: 4px;
}

.ar-empty__sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--ar-text-muted);
    line-height: 1.45;
}

/* ---- Наследуемый баннер (Legacy Banner) ---- */
.activity-rewards-banner {
    position: relative;
    width: 100%;
    background-color: var(--ar-panel);
    backdrop-filter: var(--ar-blur-main);
    -webkit-backdrop-filter: var(--ar-blur-main);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    margin-bottom: 20px;
    box-shadow: var(--ar-shadow);
}

.activity-rewards-banner a {
    padding: 24px;
    display: block;
    width: 100%;
    height: 100%;
    white-space: normal;
    color: var(--ar-text);
    text-decoration: none !important;
}

.activity-rewards-banner h3 {
    font-weight: 800;
    font-size: 14px;
    text-align: center;
    margin-bottom: 14px;
    color: var(--ar-text);
    letter-spacing: -0.2px;
}

.activity-rewards-banner p {
    color: var(--ar-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.55;
    margin-bottom: 0;
}

.activity-rewards-banner img {
    width: 100%;
    max-width: 220px;
    display: block;
    margin: 0 auto 16px;
}

.day-in-a-row {
    color: var(--ar-accent) !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(79, 234, 159, 0.35);
}