/**
 * 咯吱岛签到 · 前台样式
 *
 * 配色全部走中性半透明 + 主题色变量，浅色/深色主题都可用，
 * 不写死背景色，避免在深色模式下出现白块。
 */

.gezhi-ci-page {
    --gci-accent: var(--theme-color, #22b573);
    --gci-line: rgba(127, 127, 127, 0.16);
    --gci-soft: rgba(127, 127, 127, 0.07);
    --gci-soft-2: rgba(127, 127, 127, 0.12);
    --gci-radius: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 12px 40px;
}

/* ---------- 横幅 ---------- */
.gezhi-ci-banner {
    position: relative;
    border-radius: var(--gci-radius);
    overflow: hidden;
    padding: 34px 24px;
    margin-bottom: 16px;
    background: linear-gradient(120deg, #22b573, #12906a 60%, #0e7a5a);
    background-size: cover;
    background-position: center;
}
.gezhi-ci-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.28));
}
.gezhi-ci-banner-inner {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}
.gezhi-ci-banner-inner h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.gezhi-ci-banner-inner p {
    margin: 0;
    font-size: 14px;
    opacity: 0.92;
    color: #fff;
}

/* ---------- 提示条 ---------- */
.gezhi-ci-alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 14px;
    border-left: 3px solid #b25e09;
    background: rgba(255, 152, 0, 0.1);
}
.gezhi-ci-alert.is-error {
    border-left-color: #c62828;
    background: rgba(198, 40, 40, 0.1);
}

/* ---------- 布局 ---------- */
.gezhi-ci-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.gezhi-ci-main {
    flex: 1 1 auto;
    min-width: 0;
}
.gezhi-ci-side {
    flex: 0 0 300px;
    width: 300px;
}
.gezhi-ci-card {
    margin-bottom: 16px;
    border-radius: var(--gci-radius);
}
.gezhi-ci-card-head {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gci-line);
    font-size: 15px;
}
.gezhi-ci-card-head b {
    font-weight: 700;
}

/* ---------- 今日状态 ---------- */
.gezhi-ci-today-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.gezhi-ci-today-title b {
    font-size: 17px;
    margin-left: 4px;
}
.gezhi-ci-today-streak {
    font-size: 13px;
    opacity: 0.85;
}
.gezhi-ci-today-streak b {
    font-size: 20px;
    margin: 0 2px;
}
.gezhi-ci-today-reward {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--gci-soft);
    font-size: 13px;
}
.gezhi-ci-today-next {
    margin-top: 10px;
}
.gezhi-ci-today-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gezhi-ci-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 22px;
    border: 0;
    border-radius: 19px;
    background: var(--gci-accent);
    color: #fff !important;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.18s;
}
.gezhi-ci-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.gezhi-ci-btn[disabled],
.gezhi-ci-btn.is-loading {
    opacity: 0.6;
    cursor: default;
    transform: none;
}
.gezhi-ci-hint {
    font-size: 12px;
}

/* ---------- 日历 ---------- */
.gezhi-ci-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.gezhi-ci-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gci-soft);
    color: inherit;
    transition: background 0.18s;
}
.gezhi-ci-cal-nav:hover {
    background: var(--gci-soft-2);
}
.gezhi-ci-cal-nav.is-disabled {
    opacity: 0.3;
    cursor: default;
}
.gezhi-ci-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.gezhi-ci-cal-w {
    text-align: center;
    font-size: 12px;
    opacity: 0.55;
    padding-bottom: 2px;
}
.gezhi-ci-cal-blank {
    display: block;
    min-height: 34px;
}
.gezhi-ci-cal-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--gci-soft);
}
.gezhi-ci-cal-day.is-future {
    opacity: 0.4;
}
.gezhi-ci-cal-day.is-signed {
    background: rgba(34, 181, 115, 0.16);
    color: #12906a;
    font-weight: 600;
}
.gezhi-ci-cal-day.is-today {
    outline: 2px solid var(--gci-accent);
    outline-offset: -2px;
}

/* ---------- 阶梯 ---------- */
.gezhi-ci-task {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--gci-soft);
    margin-bottom: 10px;
}
.gezhi-ci-task:last-child {
    margin-bottom: 0;
}
.gezhi-ci-task-name {
    font-size: 14px;
}
.gezhi-ci-task-name b {
    font-size: 16px;
    margin: 0 2px;
}
.gezhi-ci-task-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--gci-soft-2);
    margin: 9px 0 6px;
    overflow: hidden;
}
.gezhi-ci-task-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--gci-accent);
    transition: width 0.4s ease;
}
.gezhi-ci-tag {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--gci-soft-2);
    white-space: nowrap;
}
.gezhi-ci-tag.is-done {
    background: rgba(34, 181, 115, 0.16);
    color: #12906a;
}
.gezhi-ci-tip {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.7;
}

/* ---------- 排行 ---------- */
.gezhi-ci-tabs a {
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 8px;
}
.gezhi-ci-tabs a.is-active {
    background: var(--gci-soft-2);
    color: inherit;
    font-weight: 600;
}
.gezhi-ci-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gci-line);
}
.gezhi-ci-rank-item:last-child {
    border-bottom: 0;
}
.gezhi-ci-rank-no {
    flex: 0 0 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.75;
}
.gezhi-ci-rank-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    min-width: 0;
}
.gezhi-ci-rank-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
.gezhi-ci-avatar {
    border-radius: 50%;
    flex: 0 0 auto;
}
.gezhi-ci-rank-val {
    font-size: 12px;
    white-space: nowrap;
}

/* ---------- 统计 ---------- */
.gezhi-ci-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    text-align: center;
}
.gezhi-ci-stat {
    padding: 12px 8px;
    border-radius: 10px;
    background: var(--gci-soft);
}
.gezhi-ci-stat-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}
.gezhi-ci-stat-num span {
    font-size: 12px;
    font-weight: 400;
    margin-left: 2px;
    opacity: 0.7;
}

/* ---------- 记录 ---------- */
.gezhi-ci-records {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gezhi-ci-records li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--gci-line);
    font-size: 13px;
}
.gezhi-ci-records li:last-child {
    border-bottom: 0;
}
.gezhi-ci-rec-date {
    min-width: 0;
}
.gezhi-ci-rec-bonus {
    white-space: nowrap;
}
.gezhi-ci-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 18px;
}
.gezhi-ci-badge.is-warn {
    background: rgba(255, 152, 0, 0.16);
    color: #b25e09;
}
.gezhi-ci-pager {
    margin-top: 12px;
}
.gezhi-ci-pager-btn {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--gci-soft);
    color: inherit;
}
.gezhi-ci-pager-btn:hover {
    background: var(--gci-soft-2);
}

/* ---------- 规则 ---------- */
.gezhi-ci-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.9;
    font-size: 12px;
}
.gezhi-ci-rules li {
    position: relative;
    padding-left: 14px;
}
.gezhi-ci-rules li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gci-accent);
}

/* ---------- 登录引导 ---------- */
.gezhi-ci-login {
    text-align: center;
    padding: 46px 20px;
    border-radius: var(--gci-radius);
}
.gezhi-login-icon {
    font-size: 40px;
    color: var(--gci-accent);
    margin-bottom: 10px;
}
.gezhi-ci-login h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

/* ---------- 轻提示 ---------- */
.gezhi-ci-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    transform: translateX(-50%) translateY(8px);
    z-index: 99999;
    display: none;
    max-width: 82vw;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 13px;
    color: #fff;
    background: rgba(0, 0, 0, 0.82);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}
.gezhi-ci-toast.is-show {
    display: block;
    transform: translateX(-50%) translateY(0);
}
.gezhi-ci-toast.is-ok {
    background: rgba(18, 144, 106, 0.94);
}
.gezhi-ci-toast.is-err {
    background: rgba(198, 40, 40, 0.94);
}

/* ---------- 导航图标 ---------- */
.gezhi-nav-checkin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .gezhi-ci-layout {
        flex-direction: column;
    }
    .gezhi-ci-side {
        flex: 1 1 auto;
        width: 100%;
    }
    .gezhi-ci-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .gezhi-ci-page {
        padding: 10px 8px 30px;
    }
    .gezhi-ci-banner {
        padding: 24px 16px;
        border-radius: 10px;
    }
    .gezhi-ci-banner-inner h2 {
        font-size: 21px;
    }
    .gezhi-ci-cal-grid {
        gap: 4px;
    }
    .gezhi-ci-cal-day,
    .gezhi-ci-cal-blank {
        min-height: 30px;
        font-size: 12px;
    }
    .gezhi-ci-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .gezhi-ci-today-head {
        align-items: flex-start;
    }
    .gezhi-ci-today-streak {
        font-size: 12px;
    }
    .gezhi-ci-btn {
        width: 100%;
    }
}

/* ---------- 每日签到奖励（原生 7 天循环） ---------- */
.gezhi-ci-cycle {
    padding: 4px 2px 0;
}
.gezhi-ci-cycle-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}
.gezhi-ci-cycle-cell {
    flex: 1 0 auto;
    min-width: 58px;
    padding: 10px 4px 8px;
    border: 1px solid var(--gci-line);
    border-radius: var(--gci-radius);
    background: var(--gci-soft);
    text-align: center;
    transition: border-color 0.18s, background 0.18s;
}
.gezhi-ci-cycle-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.25;
    margin-bottom: 6px;
}
.gezhi-ci-cycle-pt {
    font-size: 15px;
    font-weight: 700;
    color: var(--gci-accent);
}
.gezhi-ci-cycle-exp {
    font-size: 11px;
    color: #8e6bd8;
}
.gezhi-ci-cycle-none {
    font-size: 15px;
    color: #bbb;
}
.gezhi-ci-cycle-day {
    font-size: 11px;
    color: #999;
}
.gezhi-ci-cycle-cell.is-done {
    background: var(--gci-soft-2);
    opacity: 0.72;
}
.gezhi-ci-cycle-cell.is-done .gezhi-ci-cycle-day {
    color: var(--gci-accent);
}
.gezhi-ci-cycle-cell.is-today {
    border-color: var(--gci-accent);
    background: rgba(34, 181, 115, 0.08);
    box-shadow: 0 0 0 1px var(--gci-accent) inset;
    opacity: 1;
}
.gezhi-ci-cycle-cell.is-today .gezhi-ci-cycle-day {
    color: var(--gci-accent);
    font-weight: 600;
}
@media (max-width: 520px) {
    .gezhi-ci-cycle-cell {
        min-width: 52px;
        padding: 8px 2px 6px;
    }
    .gezhi-ci-cycle-pt {
        font-size: 13px;
    }
    .gezhi-ci-cycle-exp {
        font-size: 10px;
    }
}
