/* glulando — Member Rewards Styles v1.2 */
/* v1.2: Light+Dark Mode, bessere Karten, Mini-Progress, Deficit-Info */

/* ─── Hero Card ─────────────────────────────────── */
.rw-hero {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 50%, #1a1a3e 100%);
    border-radius: 16px;
    padding: 20px 16px 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.rw-hero-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(139,92,246,.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.rw-hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; position: relative; z-index: 1; }
.rw-level-label { font-size: 12px; color: #c4b5fd; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 2px; }
.rw-balance { font-size: 38px; font-weight: 800; line-height: 1; color: #fff; }
.rw-bal-label { font-size: 13px; color: #c4b5fd; margin-top: 2px; }
.rw-streak-box { text-align: center; position: relative; z-index: 1; }
.rw-streak-num { font-size: 20px; font-weight: 800; color: #fbbf24; }
.rw-streak-label { font-size: 11px; color: #c4b5fd; }
.rw-progress-track { background: rgba(255,255,255,.15); border-radius: 6px; height: 7px; overflow: hidden; position: relative; z-index: 1; }
.rw-progress-bar { height: 100%; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); border-radius: 6px; transition: width .5s; min-width: 4px; }
.rw-progress-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: rgba(255,255,255,.55); position: relative; z-index: 1; }

/* ─── Tabs ──────────────────────────────────────── */
.rw-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Scroll-Hinweis via Gradient */
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.rw-tabs::-webkit-scrollbar { display: none; }
.rw-tab {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted, #888);
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.rw-tab.active {
    background: var(--primary, #6366f1);
    color: #fff;
    font-weight: 700;
}

/* ─── Hints + Cat Labels ────────────────────────── */
.rw-hint { font-size: 13px; color: var(--text-muted, #888); margin-bottom: 12px; }
.rw-cat-label { font-size: 11px; font-weight: 700; color: var(--primary, #6366f1); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .8px; }

/* ─── Reward Cards ──────────────────────────────── */
.rw-card {
    background: var(--card-bg, #fff);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: border-color .2s;
}
.rw-card.rw-affordable { border-color: var(--primary, #6366f1); }
.rw-card.rw-done { opacity: .6; border-color: var(--success, #22c55e); }
.rw-card-inner { display: flex; align-items: center; gap: 12px; }
.rw-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--bg-secondary, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.rw-card-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.rw-card-info { flex: 1; min-width: 0; }
.rw-card-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; color: var(--text-primary, #111); }
.rw-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rw-coin { font-size: 13px; font-weight: 700; color: #d97706; }
.rw-unlocked { font-size: 12px; color: var(--success, #22c55e); font-weight: 600; }

/* Einlösen Button */
.rw-redeem-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: var(--primary, #6366f1);
    color: #fff;
    flex-shrink: 0;
    transition: opacity .2s, transform .1s;
}
.rw-redeem-btn:active { transform: scale(.96); }

/* Deficit-Info (statt hässlichem "-100") */
.rw-deficit-info {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #888);
    background: var(--bg-secondary, #f3f4f6);
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mini-Progress unter gesperrten Karten */
.rw-progress-mini {
    margin-top: 10px;
    height: 4px;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 4px;
    overflow: hidden;
}
.rw-progress-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
    border-radius: 4px;
    transition: width .5s;
    min-width: 2px;
}

/* ─── Earn Rules ────────────────────────────────── */
.rw-earn-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    margin-bottom: 5px;
    border: 1px solid var(--border, #e5e7eb);
}
.rw-earn-icon { font-size: 18px; margin-right: 10px; width: 26px; text-align: center; }
.rw-earn-label { flex: 1; font-size: 14px; color: var(--text-primary, #111); }
.rw-earn-pts { font-weight: 800; font-size: 14px; color: var(--success, #22c55e); }
.rw-streak-done { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); }

/* ─── History ───────────────────────────────────── */
.rw-hist-row {
    display: flex;
    align-items: center;
    padding: 11px 12px;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    margin-bottom: 5px;
    border: 1px solid var(--border, #e5e7eb);
}
.rw-hist-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-right: 10px;
    flex-shrink: 0;
}
.rw-hist-icon.earn { background: rgba(34,197,94,.1); }
.rw-hist-icon.spend { background: rgba(239,68,68,.1); }
.rw-hist-info { flex: 1; min-width: 0; }
.rw-hist-reason { font-size: 14px; font-weight: 500; color: var(--text-primary, #111); }
.rw-hist-pts { font-weight: 800; font-size: 15px; }
.rw-hist-pts.earn { color: var(--success, #22c55e); }
.rw-hist-pts.spend { color: #ef4444; }

/* ─── Leaderboard ───────────────────────────────── */
.rw-board-row {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    margin-bottom: 7px;
    border: 1px solid var(--border, #e5e7eb);
}
.rw-board-row.rw-you { border: 2px solid var(--primary, #6366f1); background: rgba(99,102,241,.05); }
.rw-board-rank { width: 30px; text-align: center; font-size: 18px; font-weight: 800; color: var(--text-muted, #888); margin-right: 10px; }
.rw-board-name { font-size: 14px; font-weight: 500; color: var(--text-primary, #111); }
.rw-you .rw-board-name { font-weight: 700; color: var(--primary, #6366f1); }
.rw-board-pts { font-weight: 800; font-size: 16px; color: #d97706; }
.rw-you .rw-board-pts { color: var(--primary, #6366f1); }

/* ─── Badges ────────────────────────────────────── */
.rw-badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rw-badge {
    background: var(--card-bg, #fff);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    border: 1px solid var(--border, #e5e7eb);
}
.rw-badge-icon { font-size: 30px; margin-bottom: 5px; }
.rw-badge-title { font-size: 13px; font-weight: 600; color: var(--text-primary, #111); }
.rw-badge-date { font-size: 11px; color: var(--success, #22c55e); margin-top: 4px; font-weight: 600; }

/* ─── Dark Mode Overrides ───────────────────────── */
body.dark .rw-card { background: #1e293b; border-color: #334155; box-shadow: none; }
body.dark .rw-card.rw-affordable { border-color: #8b5cf6; }
body.dark .rw-card-title,
body.dark .rw-earn-label,
body.dark .rw-hist-reason,
body.dark .rw-board-name,
body.dark .rw-badge-title { color: #e2e8f0; }
body.dark .rw-card-icon { background: #334155; }
body.dark .rw-deficit-info { background: #334155; color: #94a3b8; }
body.dark .rw-earn-row,
body.dark .rw-hist-row,
body.dark .rw-board-row,
body.dark .rw-badge { background: #1e293b; border-color: #334155; }
body.dark .rw-tab { color: #94a3b8; }
body.dark .rw-progress-mini { background: #334155; }
