/* ========================================
   WP Gamify — Clean White Theme v1.1-mobile
   ======================================== */

/* ==================== DESIGN TOKENS ==================== */
:root {
    /* Primary Colors */
    --g-primary: #6366f1;
    --g-primary-light: #818cf8;
    --g-primary-dark: #4f46e5;
    --g-accent: #8b5cf6;
    --g-success: #22c55e;
    --g-warning: #f59e0b;
    --g-danger: #ef4444;

    /* Background */
    --g-bg: #ffffff;
    --g-bg-page: #fafbfc;
    --g-bg-subtle: #f8fafc;
    --g-bg-muted: #f1f5f9;

    /* Card */
    --g-card-bg: #ffffff;
    --g-card-border: #e2e8f0;
    --g-card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --g-card-shadow-hover: 0 4px 12px rgba(99,102,241,0.08);

    /* Spacing */
    --g-space-xs: 4px;
    --g-space-sm: 8px;
    --g-space-md: 16px;
    --g-space-lg: 24px;
    --g-space-xl: 32px;
    --g-space-2xl: 48px;

    /* Radius */
    --g-radius-sm: 10px;
    --g-radius-md: 14px;
    --g-radius-lg: 16px;
    --g-radius-xl: 24px;

    /* Typography */
    --g-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --g-font-size-xs: 11px;
    --g-font-size-sm: 13px;
    --g-font-size-md: 15px;
    --g-font-size-lg: 18px;
    --g-font-size-xl: 22px;
    --g-font-size-2xl: 28px;
    --g-font-size-3xl: 36px;

    /* Text Colors */
    --g-text: #0f172a;
    --g-text-secondary: #64748b;
    --g-text-muted: #94a3b8;

    /* Transition */
    --g-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --g-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --g-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Aliases (for components that reference these) */
    --g-border: #e2e8f0;
    --g-bg-secondary: #f1f5f9;
    --g-font-size-base: 14px;

    /* Rarity Colors */
    --g-rarity-common: #f1f5f9;
    --g-rarity-common-border: #cbd5e1;
    --g-rarity-uncommon: #f0fdf4;
    --g-rarity-uncommon-border: #86efac;
    --g-rarity-rare: #eff6ff;
    --g-rarity-rare-border: #93c5fd;
    --g-rarity-epic: #faf5ff;
    --g-rarity-epic-border: #c084fc;
    --g-rarity-legendary: #fffbeb;
    --g-rarity-legendary-border: #fbbf24;
}

/* ==================== BASE DASHBOARD ==================== */
.gamify-dashboard {
    width: 100%;
    padding: var(--g-space-lg);
    font-family: var(--g-font);
    color: var(--g-text);
    background: transparent;
    position: relative;
    min-height: 400px;
}
.gamify-dashboard *,
.gamify-dashboard *::before,
.gamify-dashboard *::after {
    box-sizing: border-box;
}

/* ==================== GLASS CARD (now Clean Card) ==================== */
.gamify-glass-card {
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-lg);
    padding: var(--g-space-lg);
    transition: all var(--g-transition);
}
.gamify-glass-card:hover {
    border-color: #c7d2fe;
    box-shadow: var(--g-card-shadow-hover);
}

/* ==================== TABS ==================== */
.gamify-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: var(--g-space-lg);
    background: var(--g-bg-subtle);
    border: 1px solid var(--g-card-border);
    border-radius: 14px;
    padding: 5px;
    align-items: center;
    position: relative;
}

/* Bell Notification Icon */
/* Bell Notifications */
.gamify-bell-wrap { margin-left: auto; position: relative; }
.gamify-bell-btn {
    background: transparent; border: none; cursor: pointer; position: relative;
    padding: 8px 12px; color: var(--g-text-muted); display: flex; align-items: center;
    transition: color var(--g-transition);
}
.gamify-bell-btn:hover { color: var(--g-primary); }
.gamify-bell-badge {
    position: absolute; top: 2px; right: 4px;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
    animation: gamify-bell-pulse 2s ease-in-out infinite;
}
@keyframes gamify-bell-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.gamify-bell-dropdown {
    position: absolute; right: 0; top: 100%; margin-top: 6px;
    width: 380px; max-height: 460px;
    background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-lg); box-shadow: 0 12px 48px rgba(0,0,0,0.14);
    z-index: 9999; display: flex; flex-direction: column;
    animation: gamify-bell-slide-in 0.15s ease-out;
    isolation: isolate;
}
@keyframes gamify-bell-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.gamify-bell-handle { display: none; }
.gamify-bell-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--g-card-border);
    flex-shrink: 0;
}
.gamify-bell-header strong {
    font-size: 14px; color: var(--g-text); letter-spacing: -0.01em;
}
.gamify-bell-mark-read {
    background: none; border: none; color: var(--g-primary);
    font-size: 12px; cursor: pointer; font-weight: 600;
    padding: 4px 10px; border-radius: 6px;
    transition: background 0.15s;
}
.gamify-bell-mark-read:hover { background: rgba(99,102,241,0.08); }
.gamify-bell-list {
    padding: 4px 0; overflow-y: auto; overflow-x: hidden;
    max-height: 380px;
    scrollbar-width: thin; scrollbar-color: var(--g-card-border) transparent;
    border-radius: 0 0 var(--g-radius-lg) var(--g-radius-lg);
}
.gamify-bell-item {
    display: flex; gap: 12px; padding: 12px 16px;
    font-size: 13px; line-height: 1.45; cursor: default;
    transition: background 0.15s; position: relative;
    border-left: 3px solid transparent;
}
.gamify-bell-item:not(:last-child) {
    border-bottom: 1px solid var(--g-bg-muted);
}
.gamify-bell-item:hover { background: var(--g-bg-subtle); }
.gamify-bell-item.unread {
    background: rgba(99,102,241,0.08);
    border-left-color: var(--g-primary);
}
.gamify-bell-item.unread:hover { background: rgba(99,102,241,0.12); }
.gamify-bell-item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.gamify-bell-item-icon svg { display: block; }
.gamify-bell-item-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--g-primary);
    flex-shrink: 0; align-self: center;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}
.gamify-bell-item-body { flex: 1; min-width: 0; }
.gamify-bell-item-title {
    font-weight: 600; color: var(--g-text); margin-bottom: 2px;
}
.gamify-bell-item.unread .gamify-bell-item-title {
    color: var(--g-primary-dark);
}
.gamify-bell-item-msg {
    color: var(--g-text-muted); font-size: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.gamify-bell-item-time {
    font-size: 11px; color: var(--g-text-muted); margin-top: 3px; opacity: 0.7;
}
.gamify-bell-empty {
    padding: 40px 16px; text-align: center; color: var(--g-text-muted);
    font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.gamify-bell-loading-spinner {
    width: 24px; height: 24px; border: 2.5px solid var(--g-bg-muted);
    border-top-color: var(--g-primary); border-radius: 50%;
    animation: gamify-spin 0.6s linear infinite;
}
@keyframes gamify-spin { to { transform: rotate(360deg); } }
.gamify-bell-overlay { display: none; }
@media (max-width: 768px) {
    .gamify-bell-overlay {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4); z-index: 9998;
        opacity: 0; transition: opacity 0.2s;
    }
    .gamify-bell-overlay.active { display: block; opacity: 1; }
}
.gamify-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: var(--g-radius-sm);
    font-family: var(--g-font);
    font-weight: 600;
    cursor: pointer;
    color: var(--g-text-muted);
    transition: all var(--g-transition);
}
.gamify-tab-icon { font-size: 18px; line-height: 1; }
.gamify-tab-label { font-size: 11px; white-space: nowrap; }
.gamify-tab:hover { background: var(--g-bg-muted); color: #475569; }
.gamify-tab.active {
    background: #fff;
    color: var(--g-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

/* Tab Content */
.gamify-tab-content { display: none; }
.gamify-tab-content.active { display: block; }
.gamify-tab-slide-in { animation: tabSlideIn 0.3s ease-out; }
@keyframes tabSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Period Buttons */
.gamify-btn-sm {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    font-family: var(--g-font);
    font-size: var(--g-font-size-xs);
    font-weight: 600;
    color: var(--g-text-muted);
    cursor: pointer;
    transition: all var(--g-transition-fast);
}
.gamify-btn-sm:hover { border-color: var(--g-primary); color: var(--g-primary); }
.gamify-btn-sm.active { background: var(--g-primary); color: #fff; border-color: var(--g-primary); }

/* ==================== HERO CARD ==================== */
.gamify-hero-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border: none;
    border-radius: var(--g-radius-xl);
    padding: 32px 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    margin-bottom: var(--g-space-lg);
    box-shadow: 0 8px 32px rgba(99,102,241,0.3);
    position: relative;
    overflow: hidden;
}
.gamify-hero-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.gamify-hero-left { display: flex; align-items: center; gap: var(--g-space-md); position: relative; z-index: 1; }
.gamify-hero-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.4); box-shadow: 0 0 20px rgba(255,255,255,0.15); }
.gamify-hero-level-num {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: var(--g-font-size-2xl); font-weight: 800;
    box-shadow: 0 0 20px rgba(255,255,255,0.15);
}
.gamify-hero-info { display: flex; flex-direction: column; }
.gamify-hero-name { font-size: var(--g-font-size-xl); font-weight: 700; }
.gamify-hero-sub { font-size: var(--g-font-size-sm); opacity: 0.85; font-weight: 500; }
.gamify-hero-right { text-align: right; position: relative; z-index: 1; }
.gamify-hero-xp { font-size: var(--g-font-size-3xl); font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ==================== PROGRESS BAR ==================== */
.gamify-progress-wrap {
    width: 100%;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: var(--g-radius-md);
    padding: 12px 16px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}
.gamify-progress-track {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gamify-progress-level {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    flex-shrink: 0;
}
.gamify-progress-level-next {
    color: #fff;
}
.gamify-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
}
.gamify-progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    transition: width 1s ease-out;
}
.gamify-progress-labels {
    display: flex; justify-content: space-between;
    font-size: var(--g-font-size-xs); color: rgba(255,255,255,0.75);
    margin-top: 8px;
}
.gamify-progress-remaining { font-weight: 600; color: #fff; }
.gamify-max-level-badge {
    width: 100%;
    text-align: center; padding: 10px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--g-radius-md);
    font-weight: 700; color: #fff;
    margin-top: 16px;
    position: relative; z-index: 1;
}
.gamify-grace-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--g-radius-md);
    padding: 12px 16px;
    font-size: var(--g-font-size-sm); color: #92400e;
    margin-bottom: var(--g-space-lg);
}

/* ==================== STATS GRID ==================== */
.gamify-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--g-space-md);
    margin-bottom: var(--g-space-lg);
}
.gamify-stat-card {
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border);
    border-radius: 14px;
    padding: 22px 20px;
    text-align: center;
    transition: all var(--g-transition);
    position: relative;
    overflow: hidden;
}
.gamify-stat-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--g-primary), var(--g-accent));
    opacity: 0;
    transition: opacity var(--g-transition);
}
.gamify-stat-card:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: 0 6px 20px rgba(99,102,241,0.1); }
.gamify-stat-card:hover::after { opacity: 1; }
.gamify-stat-value { font-size: var(--g-font-size-xl); font-weight: 800; color: var(--g-text); display: block; }
.gamify-stat-label { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 500; margin-top: 6px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.gamify-stat-sub { font-size: var(--g-font-size-xs); color: var(--g-text-secondary); display: block; margin-top: 2px; }

/* ==================== BENEFITS ==================== */
.gamify-benefits { margin-bottom: var(--g-space-lg); }
.gamify-benefits h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }
.gamify-benefits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gamify-benefit-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md);
    padding: 12px 16px;
    font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text);
    transition: all var(--g-transition);
}
.gamify-benefit-item:hover { border-color: #bbf7d0; background: #f0fdf4; }
.gamify-benefit-icon {
    font-size: 18px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: #f0fdf4; border-radius: 50%;
    flex-shrink: 0;
}

/* ==================== BREAKDOWN ==================== */
.gamify-breakdown { margin-bottom: var(--g-space-lg); }
.gamify-breakdown h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }
.gamify-breakdown-list { display: flex; flex-direction: column; }
.gamify-breakdown-item {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: 12px; align-items: center;
    padding: 8px 0;
}
.gamify-breakdown-label { font-size: var(--g-font-size-sm); color: var(--g-text-secondary); font-weight: 500; }
.gamify-breakdown-bar { height: 6px; background: var(--g-bg-muted); border-radius: 6px; overflow: hidden; }
.gamify-breakdown-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6366f1, #a78bfa); }
.gamify-breakdown-value { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text); text-align: right; }

/* ==================== LEVEL MAP ==================== */
.gamify-level-map { margin-bottom: var(--g-space-lg); }
.gamify-level-map h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }
.gamify-level-path {
    display: flex; gap: 4px; overflow-x: auto; padding: 12px 4px; width: 100%;
    scrollbar-width: thin; scrollbar-color: var(--g-card-border) transparent;
}
.gamify-level-path::-webkit-scrollbar { height: 6px; }
.gamify-level-path::-webkit-scrollbar-track { background: transparent; }
.gamify-level-path::-webkit-scrollbar-thumb { background: var(--g-card-border); border-radius: 3px; }
.gamify-level-node {
    flex: 1 1 0;
    min-width: 0;
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border);
    border-radius: 14px;
    padding: 16px; text-align: center;
    transition: all var(--g-transition);
    position: relative;
}
.gamify-level-node + .gamify-level-node::before { display: none; }
.gamify-level-node.current {
    border-color: var(--g-primary); border-width: 2px;
    background: #f5f3ff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
    transform: scale(1.05);
}
.gamify-level-node.achieved { background: #fafafa; border-color: var(--g-card-border); }
.gamify-level-node.locked { opacity: 0.3; }
.gamify-level-node-badge {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px; color: #fff; font-weight: 700; font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gamify-level-node-icon { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.gamify-level-node-name { font-size: var(--g-font-size-xs); font-weight: 700; color: var(--g-text); display: block; }
.gamify-level-node-xp { font-size: var(--g-font-size-xs); color: var(--g-text-muted); display: block; margin-top: 2px; }
.gamify-level-node-perk { font-size: 10px; color: var(--g-primary); font-weight: 600; display: block; margin-top: 2px; }
.gamify-level-node-perk.gamify-level-more { color: var(--g-text-muted); font-style: italic; }
.gamify-level-node-perks { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.gamify-level-inspect-btn {
    margin-top: 8px; padding: 4px 12px; font-size: 11px; font-weight: 600;
    background: var(--g-primary); color: #fff; border: none; border-radius: 8px;
    cursor: pointer; transition: all var(--g-transition-fast);
}
.gamify-level-inspect-btn:hover { background: var(--g-primary-dark); transform: translateY(-1px); }

/* ---- Level Inspect Modal ---- */
.gamify-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.gamify-modal-content {
    background: #fff; border-radius: 16px; padding: 32px; max-width: 460px; width: 90%;
    max-height: 80vh; overflow-y: auto; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: slideUp 0.25s ease-out;
}
.gamify-modal-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    font-size: 24px; color: var(--g-text-muted); cursor: pointer; line-height: 1;
}
.gamify-modal-close:hover { color: var(--g-text); }
.gamify-level-modal-badge {
    width: 64px; height: 64px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; margin: 0 auto 12px;
    color: #fff; font-weight: 700; font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.gamify-level-modal-name { text-align: center; font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.gamify-level-modal-xp { text-align: center; color: var(--g-text-muted); font-size: 14px; margin: 0 0 20px; }
.gamify-level-modal-perks { display: flex; flex-direction: column; gap: 8px; }
.gamify-level-modal-perk {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--g-bg-muted); border-radius: 10px; font-size: 14px;
}
.gamify-level-modal-perk-icon { font-size: 18px; flex-shrink: 0; }
.gamify-level-modal-perk-text { font-weight: 500; color: var(--g-text); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==================== HISTORY ==================== */
.gamify-history { margin-bottom: var(--g-space-lg); }
.gamify-history h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }
.gamify-history-list { display: flex; flex-direction: column; gap: 6px; }
.gamify-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px;
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md);
    background: var(--g-card-bg);
    transition: all var(--g-transition-fast);
    border-left: 3px solid var(--g-primary);
    animation: slideInLeft 0.3s ease-out;
}
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.gamify-history-item:hover { border-color: #c7d2fe; box-shadow: var(--g-card-shadow-hover); }
.gamify-history-left { display: flex; flex-direction: column; }
.gamify-history-note { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text); }
.gamify-history-date { font-size: var(--g-font-size-xs); color: var(--g-text-muted); margin-top: 2px; }
.gamify-history-xp { font-size: var(--g-font-size-md); font-weight: 700; }
.gamify-history-xp.positive { color: var(--g-success); }
.gamify-history-xp.negative { color: var(--g-danger); }

/* ==================== BUTTONS ==================== */
.gamify-glass-btn {
    padding: 10px 24px;
    background: var(--g-primary);
    color: #fff;
    border: none;
    border-radius: var(--g-radius-sm);
    font-family: var(--g-font);
    font-size: var(--g-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--g-transition);
}
.gamify-glass-btn:hover { background: var(--g-primary-dark); transform: translateY(-1px); }
.gamify-glass-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.gamify-btn-outline {
    padding: 10px 24px;
    background: transparent;
    color: var(--g-primary);
    border: 1.5px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    font-family: var(--g-font);
    font-size: var(--g-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--g-transition);
}
.gamify-btn-outline:hover { border-color: var(--g-primary); background: #f5f3ff; }

/* ==================== BADGES ==================== */
/* Badge Summary & Filters */
.gamify-badge-summary {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--g-space-md); flex-wrap: wrap; gap: var(--g-space-sm);
}
.gamify-badge-summary-count {
    font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text-secondary);
}
.gamify-badge-filters {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.gamify-badge-filter {
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--g-card-border);
    background: var(--g-bg);
    font-size: var(--g-font-size-xs); font-weight: 500;
    color: var(--g-text-secondary); cursor: pointer;
    transition: all var(--g-transition-fast);
}
.gamify-badge-filter:hover { border-color: var(--g-primary); color: var(--g-primary); }
.gamify-badge-filter.active {
    background: var(--g-primary); color: #fff; border-color: var(--g-primary);
}

/* Badge Grid */
.gamify-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--g-space-md);
}
.gamify-badge-card {
    padding: var(--g-space-lg);
    transition: transform var(--g-transition), box-shadow var(--g-transition);
}
.gamify-badge-card.gamify-badge-complete {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}
.gamify-badge-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 8px; gap: 8px;
}
.gamify-badge-card-header h4 { margin: 0 0 2px; font-size: var(--g-font-size-md); color: var(--g-text); }
.gamify-badge-category-tag {
    font-size: var(--g-font-size-xs); color: var(--g-text-muted);
}
.gamify-badge-earned-tier {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 10px; border-radius: 12px;
    font-size: var(--g-font-size-xs); font-weight: 700; color: #fff;
    white-space: nowrap; flex-shrink: 0;
}
.gamify-badge-desc { font-size: var(--g-font-size-xs); color: var(--g-text-secondary); margin: 0 0 12px; line-height: 1.5; }
.gamify-badge-tiers { display: flex; flex-direction: column; gap: 8px; }
.gamify-badge-tier {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 6px 10px; border-radius: var(--g-radius-sm);
    background: var(--g-bg-subtle);
}
.gamify-badge-tier.earned {
    background: #f0fdf4;
}
.gamify-badge-tier-icon { width: 20px; height: 20px; border-radius: 50%; }
.gamify-badge-tier-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.8); }
.gamify-badge-tier-name { font-size: var(--g-font-size-xs); font-weight: 600; min-width: 40px; }
.gamify-badge-earned-check { color: var(--g-success); font-weight: 700; margin-left: auto; font-size: 14px; }
.gamify-badge-progress-text { font-size: var(--g-font-size-xs); color: var(--g-text-muted); white-space: nowrap; }

/* ==================== QUESTS ==================== */
/* Quest Summary */
.gamify-quest-summary {
    display: flex; gap: var(--g-space-md); margin-bottom: var(--g-space-lg);
}
.gamify-quest-stat {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 16px; background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md);
}
.gamify-quest-stat-num { font-size: var(--g-font-size-xl); font-weight: 800; color: var(--g-primary); }
.gamify-quest-stat-label { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 500; margin-top: 2px; }

/* Quest Grid */
.gamify-quest-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--g-space-md);
}

/* Quest Card */
.gamify-quest-card {
    padding: var(--g-space-lg); display: flex; flex-direction: column; gap: 12px;
    transition: all var(--g-transition);
}
.gamify-quest-card:hover { border-color: #c7d2fe; box-shadow: var(--g-card-shadow-hover); }
.gamify-quest-card.completed { opacity: 0.6; }
.gamify-quest-card.completed .gamify-quest-icon { filter: grayscale(0.5); }

/* Quest Top: icon + info */
.gamify-quest-top { display: flex; gap: 12px; align-items: flex-start; }
.gamify-quest-icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #f0f0ff 0%, #e8e0ff 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.gamify-quest-info { flex: 1; min-width: 0; }
.gamify-quest-title { margin: 0 0 4px; font-size: var(--g-font-size-md); font-weight: 700; color: var(--g-text); }
.gamify-quest-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gamify-quest-type {
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    background: var(--g-bg-muted); padding: 2px 8px; border-radius: 6px; color: var(--g-text-secondary);
}
.gamify-quest-diff {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 2px 8px; border-radius: 6px; border: 1px solid; background: transparent;
}

/* Quest Description */
.gamify-quest-desc { font-size: var(--g-font-size-sm); color: var(--g-text-secondary); margin: 0; line-height: 1.5; }

/* Quest Progress */
.gamify-quest-progress { display: flex; flex-direction: column; gap: 6px; }
.gamify-quest-progress-header { display: flex; justify-content: space-between; align-items: center; }
.gamify-quest-progress-text { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 600; }
.gamify-quest-progress-pct { font-size: var(--g-font-size-xs); color: var(--g-primary); font-weight: 700; }

/* Quest Footer */
.gamify-quest-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; border-top: 1px solid var(--g-bg-muted); }
.gamify-quest-reward { font-size: var(--g-font-size-sm); font-weight: 700; color: var(--g-primary); }
.gamify-quest-done { font-size: var(--g-font-size-xs); font-weight: 700; color: var(--g-success); background: rgba(34,197,94,0.1); padding: 3px 10px; border-radius: 6px; }
.gamify-quest-inprogress { font-size: var(--g-font-size-xs); font-weight: 600; color: var(--g-accent); background: rgba(139,92,246,0.1); padding: 3px 10px; border-radius: 6px; }

/* ==================== LEADERBOARD ==================== */
.gamify-leaderboard-list { display: flex; flex-direction: column; gap: 4px; }
.gamify-your-rank {
    text-align: center; padding: 12px; margin-bottom: 12px;
    font-size: var(--g-font-size-sm); color: var(--g-text-secondary);
    border: 1px solid var(--g-card-border); border-radius: var(--g-radius-md);
}
.gamify-leaderboard-row {
    display: grid; grid-template-columns: 50px 1fr auto 80px;
    align-items: center; gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    transition: all var(--g-transition-fast);
}
.gamify-leaderboard-row:hover { border-color: #c7d2fe; }
.gamify-leaderboard-row.top-1 { background: #fffbeb; border-color: #fde68a; }
.gamify-leaderboard-row.top-2 { background: #f8fafc; border-color: #cbd5e1; }
.gamify-leaderboard-row.top-3 { background: #fff7ed; border-color: #fed7aa; }
.gamify-lb-rank { font-size: var(--g-font-size-lg); font-weight: 800; text-align: center; }
.gamify-lb-name { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text); }
.gamify-lb-level { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: var(--g-font-size-xs); font-weight: 700; color: #fff; }
.gamify-lb-xp { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text-secondary); text-align: right; }

/* ==================== REFERRAL ==================== */
/* ==================== REFERRAL TAB ==================== */
/* Hero */
.gamify-referral-hero { text-align: center; padding: var(--g-space-xl) var(--g-space-lg); margin-bottom: var(--g-space-lg); }
.gamify-referral-hero-icon { font-size: 48px; margin-bottom: 8px; }
.gamify-referral-hero-title { margin: 0 0 8px; font-size: 22px; color: var(--g-text); font-weight: 700; }
.gamify-referral-hero-desc { color: var(--g-text-muted); font-size: 14px; margin: 0 0 20px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* Code box */
.gamify-referral-code-box { margin-bottom: 16px; }
.gamify-referral-code-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--g-text-muted); margin-bottom: 6px; }
.gamify-referral-code-value code {
    display: inline-block;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe); border: 2px solid #c7d2fe;
    padding: 12px 28px; border-radius: var(--g-radius-md);
    font-size: 20px; font-weight: 800; color: var(--g-primary);
    letter-spacing: 3px;
}

/* Link box */
.gamify-referral-link-box { max-width: 520px; margin: 0 auto; }
.gamify-referral-link-row { display: flex; gap: 8px; align-items: center; }
.gamify-referral-link-input {
    flex: 1; min-width: 0;
    padding: 16px 18px !important;
    min-height: 52px !important;
    height: auto !important;
    background: var(--g-bg-subtle) !important;
    border: 1px solid var(--g-card-border) !important;
    border-radius: var(--g-radius-sm) !important;
    font-family: var(--g-font);
    font-size: 13px !important;
    color: var(--g-text);
    box-sizing: border-box;
}
.gamify-referral-link-input:focus { outline: none; border-color: var(--g-primary) !important; box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important; }

/* Stats grid */
.gamify-referral-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: var(--g-space-lg);
}
.gamify-referral-stat-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 16px 8px; text-align: center;
}
.gamify-referral-stat-icon { font-size: 24px; margin-bottom: 4px; }
.gamify-referral-stat-value { font-size: 24px; font-weight: 800; color: var(--g-text); }
.gamify-referral-stat-label { font-size: 12px; color: var(--g-text-muted); font-weight: 500; }

/* Generator card */
.gamify-referral-generator-card { margin-bottom: var(--g-space-lg); }
.gamify-referral-section-title { margin: 0 0 8px; font-size: 16px; color: var(--g-text); font-weight: 700; }
.gamify-referral-section-desc { color: var(--g-text-muted); font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.gamify-referral-generator-row {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: var(--g-space-md);
}
.gamify-referral-product-input {
    flex: 1; min-width: 0;
    padding: 16px 18px !important;
    min-height: 52px !important;
    height: auto !important;
    background: var(--g-bg-subtle) !important;
    border: 1px solid var(--g-card-border) !important;
    border-radius: var(--g-radius-sm) !important;
    font-family: var(--g-font);
    font-size: 14px !important;
    color: var(--g-text);
    box-sizing: border-box;
}
.gamify-referral-product-input::placeholder { color: var(--g-text-muted); opacity: 0.7; }
.gamify-referral-product-input:focus { outline: none; border-color: var(--g-primary) !important; box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important; }
.gamify-referral-generate-btn { white-space: nowrap; flex-shrink: 0; padding: 14px 20px !important; }
.gamify-referral-result { margin-top: 8px; }
.gamify-referral-result-row {
    display: flex; gap: 8px; align-items: center;
}
.gamify-referral-result-input {
    flex: 1; min-width: 0;
    padding: 16px 18px !important;
    min-height: 52px !important;
    height: auto !important;
    background: #f0fdf4 !important;
    border: 2px solid #86efac !important;
    border-radius: var(--g-radius-sm) !important;
    font-family: var(--g-font);
    font-size: 13px !important;
    color: #15803d;
    font-weight: 600;
    box-sizing: border-box;
}

/* ==================== AFFILIATE DASHBOARD ==================== */

/* Hero */
.gamify-aff-hero {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    border-radius: var(--g-radius-lg);
    padding: 24px 28px;
    margin-bottom: var(--g-space-lg);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.gamify-aff-hero::after {
    content: '';
    position: absolute; top: -50%; right: -20%; width: 200px; height: 200px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.gamify-aff-hero-inner { position: relative; z-index: 1; }
.gamify-aff-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25); backdrop-filter: blur(4px);
    padding: 4px 14px; border-radius: 20px;
    font-size: var(--g-font-size-sm); font-weight: 700;
    margin-bottom: 8px;
}
.gamify-aff-hero-commission {
    font-size: 32px; font-weight: 800; line-height: 1.2;
}
.gamify-aff-hero-commission span { font-size: 16px; font-weight: 500; opacity: 0.85; }
.gamify-aff-hero-next {
    margin-top: 8px; font-size: var(--g-font-size-xs); opacity: 0.8;
}

/* Stats grid */
.gamify-aff-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--g-space-md);
    margin-bottom: var(--g-space-lg);
}
.gamify-aff-stat-card {
    text-align: center;
    padding: 16px 12px;
}
.gamify-aff-stat-value {
    font-size: 22px; font-weight: 800; line-height: 1.2;
}
.gamify-aff-stat-value small { font-size: 12px; font-weight: 600; }
.gamify-aff-stat-label {
    font-size: var(--g-font-size-xs); color: var(--g-text-muted); margin-top: 4px;
}

/* Two column layout */
.gamify-aff-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--g-space-lg);
    align-items: start;
}

/* Links card */
.gamify-aff-links-card h4,
.gamify-aff-convert-card h4,
.gamify-aff-chart-card h4 {
    margin: 0 0 16px; font-size: var(--g-font-size-lg); font-weight: 700;
}
.gamify-aff-link-row {
    display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.gamify-aff-link-row input {
    flex: 1; min-width: 0;
}

/* Discount code */
.gamify-aff-discount-code {
    display: flex; align-items: center; gap: 12px;
}
.gamify-aff-discount-code code {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    padding: 8px 20px; border-radius: var(--g-radius-sm);
    font-size: var(--g-font-size-lg); font-weight: 700; color: #92400e;
    letter-spacing: 2px;
}
.gamify-aff-discount-pct {
    font-size: var(--g-font-size-sm); font-weight: 600; color: #d97706;
}

/* Convert card */
.gamify-aff-convert-card { margin-bottom: var(--g-space-lg); }
.gamify-aff-balance-display {
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: var(--g-radius-sm);
    padding: 16px; text-align: center;
    margin-bottom: 16px;
}
.gamify-aff-balance-amount {
    font-size: 28px; font-weight: 800; color: #22c55e;
}
.gamify-aff-convert-form {
    display: flex; gap: 8px;
}
.gamify-aff-convert-input {
    flex: 1; min-width: 0;
    padding: 10px 14px;
    background: var(--g-bg-subtle); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    font-family: var(--g-font); font-size: var(--g-font-size-sm);
}
.gamify-aff-convert-input:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }
.gamify-glass-btn-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important; border: none !important;
    font-weight: 700;
}
.gamify-glass-btn-gold:hover { background: linear-gradient(135deg, #d97706, #b45309) !important; }

/* Charts row */
.gamify-aff-charts-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--g-space-md);
    margin-bottom: var(--g-space-md);
}
@media (max-width: 600px) { .gamify-aff-charts-row { grid-template-columns: 1fr; } }

/* Mini chart */
.gamify-aff-chart-card { margin-bottom: 0; }
.gamify-aff-mini-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 100px; padding: 0 4px;
}
.gamify-aff-chart-bar-wrap {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    height: 100%;
}
.gamify-aff-chart-bar {
    width: 100%; max-width: 32px;
    background: linear-gradient(to top, #f59e0b, #fbbf24);
    border-radius: 4px 4px 0 0;
    margin-top: auto;
    transition: height 0.3s ease;
}
.gamify-aff-chart-value {
    font-size: 10px; font-weight: 700; color: var(--g-text);
    margin-bottom: 2px;
}
.gamify-aff-chart-label {
    font-size: 9px; color: var(--g-text-muted);
}

/* Orders table */
.gamify-aff-orders-table {
    font-size: var(--g-font-size-sm);
}
.gamify-aff-orders-header {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 8px; padding: 8px 0;
    font-weight: 600; color: var(--g-text-muted);
    border-bottom: 1px solid var(--g-card-border);
    font-size: var(--g-font-size-xs);
}
.gamify-aff-orders-row {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 8px; padding: 10px 0;
    border-bottom: 1px solid var(--g-bg-muted);
    align-items: center;
}
.gamify-aff-orders-row:last-child { border-bottom: none; }
.gamify-aff-status-approved { color: #22c55e; font-weight: 600; font-size: 12px; }
.gamify-aff-status-pending { color: #f59e0b; font-weight: 600; font-size: 12px; }
.gamify-aff-status-other { color: var(--g-text-muted); font-size: 12px; }

/* Conversions list */
.gamify-aff-conversions-list {
    display: flex; flex-direction: column; gap: 8px;
}
.gamify-aff-conversion-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--g-bg-muted);
    font-size: var(--g-font-size-sm);
}
.gamify-aff-conversion-item:last-child { border-bottom: none; }

/* Actions bar: landing link + CSV */
.gamify-aff-actions-bar {
    display: grid; grid-template-columns: 1fr auto; gap: var(--g-space-md);
    margin-top: var(--g-space-lg);
}
.gamify-aff-landing-card { flex: 1; }
.gamify-aff-csv-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; min-width: 180px;
}

/* Campaign Materials */
.gamify-aff-materials-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.gamify-aff-material-card {
    border-radius: var(--g-radius-md); overflow: hidden;
    border: 1px solid var(--g-card-border); background: var(--g-bg-muted);
}
.gamify-aff-material-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.gamify-aff-material-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; font-size: var(--g-font-size-sm); font-weight: 600;
}

@media (max-width: 640px) {
    .gamify-aff-actions-bar { grid-template-columns: 1fr; }
    .gamify-aff-materials-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ==================== CARDS / COLLECTION ==================== */
.gamify-card-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--g-space-md);
}
.gamify-collect-card {
    border-radius: var(--g-radius-md);
    overflow: hidden;
    border: 2px solid var(--g-card-border);
    transition: all var(--g-transition);
    background: var(--g-card-bg);
}
.gamify-collect-card:hover { transform: translateY(-3px); box-shadow: var(--g-card-shadow-hover); }
.gamify-collect-card-img { width: 100%; aspect-ratio: 63/88; object-fit: cover; }
.gamify-collect-card-placeholder {
    width: 100%; aspect-ratio: 63/88;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 800;
    background: var(--g-bg-muted); color: var(--g-text-muted);
}
.gamify-collect-card-info { padding: 10px; }
.gamify-collect-card-name { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text); display: block; }
.gamify-collect-card-rarity { font-size: var(--g-font-size-xs); text-transform: uppercase; font-weight: 600; color: var(--g-text-muted); }
.gamify-collect-card-set { font-size: var(--g-font-size-xs); color: var(--g-text-muted); display: block; }

/* Duplicate Count Badge */
.gamify-card-count-badge {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    background: var(--g-primary); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
    box-shadow: 0 2px 6px rgba(99,102,241,0.3);
}
.gamify-collect-card { position: relative; }

/* Pack Opening Duplicate Count */
.gamify-pack-card-count {
    position: absolute; top: 4px; right: 4px; z-index: 3;
    background: var(--g-primary); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 8px;
    box-shadow: 0 1px 4px rgba(99,102,241,0.3);
}

/* Order Cost Label */
.gamify-pack-order-cost {
    color: var(--g-warning); font-weight: 600;
}

/* Rarity Borders */
.gamify-rarity-common { border-color: var(--g-rarity-common-border); }
.gamify-rarity-uncommon { border-color: var(--g-rarity-uncommon-border); background: var(--g-rarity-uncommon); }
.gamify-rarity-rare { border-color: var(--g-rarity-rare-border); background: var(--g-rarity-rare); }
.gamify-rarity-epic { border-color: var(--g-rarity-epic-border); background: var(--g-rarity-epic); }
.gamify-rarity-legendary { border-color: var(--g-rarity-legendary-border); background: var(--g-rarity-legendary); }

/* ==================== PACKS ==================== */
.gamify-packs-section { margin-bottom: var(--g-space-lg); }
.gamify-packs-section h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }
.gamify-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--g-space-lg);
}
.gamify-pack-card {
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-lg);
    padding: 0;
    background: var(--g-card-bg);
    transition: all var(--g-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.gamify-pack-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(99,102,241,0.12); }
.gamify-pack-visual {
    position: relative;
    width: 100%;
    max-height: 280px;
    overflow: hidden;
    border-radius: var(--g-radius-lg) var(--g-radius-lg) 0 0;
    background: linear-gradient(135deg, var(--g-bg-muted), #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gamify-pack-img { width: 100%; height: 100%; max-height: 280px; object-fit: contain; }
.gamify-pack-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}
.gamify-pack-placeholder span { font-size: 72px; opacity: 0.3; }
.gamify-pack-rarity-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.06);
}
.gamify-pack-rarity-badge.gamify-rarity-rare { color: #3b82f6; }
.gamify-pack-rarity-badge.gamify-rarity-epic { color: #a855f7; }
.gamify-pack-rarity-badge.gamify-rarity-legendary { color: #f59e0b; }
.gamify-pack-info { padding: var(--g-space-md); flex: 1; }
.gamify-pack-info h4 { margin: 0 0 4px; font-size: var(--g-font-size-md); font-weight: 700; color: var(--g-text); }
.gamify-pack-desc { font-size: var(--g-font-size-xs); color: var(--g-text-muted); margin: 0 0 8px; line-height: 1.4; }
.gamify-pack-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.gamify-pack-detail { font-size: var(--g-font-size-xs); color: var(--g-text-secondary); }
.gamify-pack-cost { font-size: var(--g-font-size-xs); font-weight: 600; color: var(--g-warning); }
.gamify-pack-free-label { color: var(--g-success); }
.gamify-pack-free { font-size: var(--g-font-size-xs); color: var(--g-success); font-weight: 600; display: block; margin-top: 6px; }
.gamify-pack-actions { padding: 0 var(--g-space-md) var(--g-space-md); }
.gamify-open-pack-btn { width: 100%; }

/* Pack Opening Overlay */
.gamify-pack-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.gamify-pack-overlay-inner {
    background: #fff;
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-xl);
    padding: var(--g-space-xl);
    max-width: 700px; width: 90%;
    text-align: center;
    position: relative;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}
.gamify-pack-overlay-header { display: flex; align-items: center; justify-content: center; margin-bottom: var(--g-space-lg); position: relative; }
.gamify-pack-overlay-header h3 { margin: 0; font-size: var(--g-font-size-xl); color: var(--g-text); }
.gamify-pack-overlay-close {
    position: absolute; top: -8px; right: -8px;
    background: var(--g-bg-muted); border: 1px solid var(--g-card-border);
    color: var(--g-text-secondary);
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--g-transition);
}
.gamify-pack-overlay-close:hover { background: var(--g-danger); color: #fff; border-color: var(--g-danger); }
.gamify-pack-cards { display: flex; gap: var(--g-space-md); flex-wrap: wrap; justify-content: center; margin-bottom: var(--g-space-lg); }
.gamify-pack-card-reveal { width: 126px; height: 176px; perspective: 600px; cursor: pointer; /* ~63:88 ratio */ }
.gamify-pack-card-inner {
    position: relative; width: 100%; height: 100%;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d;
}
.gamify-pack-card-reveal.flipped .gamify-pack-card-inner { transform: rotateY(180deg); }
.gamify-pack-card-front, .gamify-pack-card-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: var(--g-radius-md); overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gamify-pack-card-back {
    background: linear-gradient(135deg, var(--g-primary), var(--g-accent));
    border: 2px solid rgba(255,255,255,0.3);
    font-size: 32px; color: rgba(255,255,255,0.6);
}
.gamify-pack-card-front {
    transform: rotateY(180deg);
    padding: 0; text-align: center;
    border: 2px solid var(--g-card-border);
    background: #fff;
}
.gamify-pack-card-front img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.gamify-pack-card-letter {
    width: 100%; height: 100%;
    background: var(--g-bg-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700; color: var(--g-text);
    border-radius: 0; aspect-ratio: auto; margin: 0;
}
.gamify-pack-card-name {
    position: absolute; bottom: 16px; left: 4px; right: 4px;
    font-size: 11px; font-weight: 700; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    z-index: 2;
}
.gamify-pack-card-rarity {
    position: absolute; bottom: 4px; left: 4px; right: 4px;
    font-size: 10px; text-transform: uppercase; font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    z-index: 2;
}
.gamify-pack-loading { text-align: center; padding: var(--g-space-xl); }
.gamify-legendary-burst { animation: legendaryBurst 0.8s ease-out; }
@keyframes legendaryBurst {
    0% { box-shadow: 0 0 0 rgba(245,158,11,0); }
    50% { box-shadow: 0 0 30px rgba(245,158,11,0.5), 0 0 60px rgba(245,158,11,0.2); }
    100% { box-shadow: 0 0 10px rgba(245,158,11,0.15); }
}
.gamify-pack-card-reveal.gamify-rarity-rare.flipped { box-shadow: 0 0 15px rgba(59,130,246,0.3); }
.gamify-pack-card-reveal.gamify-rarity-epic.flipped { box-shadow: 0 0 20px rgba(168,85,247,0.3); }
.gamify-pack-card-reveal.gamify-rarity-legendary.flipped { box-shadow: 0 0 25px rgba(245,158,11,0.4); }

/* ==================== SET COMPLETION ==================== */
.gamify-set-completion { margin-top: var(--g-space-lg); }
.gamify-set-completion h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); }

/* Set Progress Grid (JS-rendered) */
.gamify-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--g-space-md); }
.gamify-set-card {
    padding: var(--g-space-md);
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md);
    background: var(--g-card-bg);
    transition: all var(--g-transition);
}
.gamify-set-card:hover { box-shadow: var(--g-card-shadow-hover); }
.gamify-set-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--g-space-sm); }
.gamify-set-clickable { cursor: pointer; user-select: none; }
.gamify-set-card-left { flex: 1; }
.gamify-set-card-name { font-size: var(--g-font-size-md); font-weight: 600; color: var(--g-text); margin: 0; }
.gamify-set-card-count { font-size: var(--g-font-size-sm); color: var(--g-text-muted); white-space: nowrap; display: block; margin-top: 2px; }
.gamify-set-expand-icon { font-size: 12px; color: var(--g-text-muted); transition: transform var(--g-transition); padding: 4px; }
.gamify-set-progress-bar { height: 8px; background: var(--g-bg-muted); border-radius: 4px; overflow: hidden; margin-bottom: var(--g-space-sm); }
.gamify-set-progress-fill { height: 100%; background: linear-gradient(90deg, var(--g-primary), var(--g-accent)); border-radius: 4px; transition: width var(--g-transition); }
.gamify-set-card-footer { display: flex; justify-content: space-between; align-items: center; }
.gamify-set-percentage { font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text-secondary); }
.gamify-set-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: var(--g-font-size-xs); font-weight: 600; }
.gamify-set-completed { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.gamify-set-claim-btn { white-space: nowrap; flex-shrink: 0; border-radius: var(--g-radius-sm); }

/* Set Cards Grid (expandable) */
.gamify-set-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    padding-top: var(--g-space-md);
    margin-top: var(--g-space-md);
    border-top: 1px solid var(--g-card-border);
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}
.gamify-set-card-item {
    border-radius: var(--g-radius-sm);
    overflow: hidden;
    border: 2px solid var(--g-card-border);
    text-align: center;
    transition: all var(--g-transition);
    position: relative;
    background: var(--g-card-bg);
}
.gamify-set-card-item.owned { border-color: var(--g-primary-light); }
.gamify-set-card-item.unowned { filter: grayscale(1); opacity: 0.4; pointer-events: none; }
.gamify-card-clickable { cursor: pointer; }
.gamify-card-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.15); }

/* Card Detail Modal */
.gamify-card-detail { text-align: center; padding: 8px 0; }
.gamify-card-detail-img-wrap { position: relative; overflow: hidden; display: inline-block; border-radius: var(--g-radius-md); margin-bottom: var(--g-space-md); }
.gamify-card-detail-img { display: block; width: 100%; max-width: 200px; aspect-ratio: 63/88; object-fit: contain; border-radius: var(--g-radius-md); border: 2px solid var(--rarity-color, var(--g-card-border)); }
.gamify-card-detail-placeholder { width: 200px; height: 280px; margin: 0 auto var(--g-space-md); display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 700; color: var(--g-text-muted); background: var(--g-bg-muted); border-radius: var(--g-radius-md); border: 2px solid var(--rarity-color, var(--g-card-border)); }
.gamify-card-detail-name { margin: 0 0 4px; font-size: var(--g-font-size-lg); font-weight: 700; color: var(--g-text); }
.gamify-card-detail-rarity { display: block; font-size: var(--g-font-size-sm); font-weight: 600; margin-bottom: 4px; }
.gamify-card-detail-count { display: inline-block; font-size: var(--g-font-size-sm); color: var(--g-text-muted); background: var(--g-bg-muted); padding: 2px 10px; border-radius: 12px; }
.gamify-set-card-item.gamify-rarity-rare.owned { border-color: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.2); }
.gamify-set-card-item.gamify-rarity-epic.owned { border-color: #a855f7; box-shadow: 0 0 8px rgba(168,85,247,0.2); }
.gamify-set-card-item.gamify-rarity-legendary.owned { border-color: #f59e0b; box-shadow: 0 0 10px rgba(245,158,11,0.25); }
.gamify-set-card-img { width: 100%; aspect-ratio: 63/88; object-fit: cover; display: block; }
.gamify-set-card-placeholder {
    width: 100%; aspect-ratio: 63/88;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800;
    background: var(--g-bg-muted); color: var(--g-text-muted);
}
.gamify-set-card-name { font-size: 10px; font-weight: 600; color: var(--g-text); display: block; padding: 4px 4px 2px; line-height: 1.2; }
.gamify-set-card-rarity { font-size: 9px; text-transform: uppercase; font-weight: 600; color: var(--g-text-muted); display: block; padding: 0 4px 4px; }
.gamify-set-card-count-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--g-primary); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 8px;
    line-height: 1.3;
}

/* ==================== QUIZ ==================== */
.gamify-quiz-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g-space-md); margin-bottom: var(--g-space-lg); }
.gamify-quiz-daily-limit {
    padding: 16px 20px; text-align: center; margin-bottom: var(--g-space-lg);
    color: var(--g-text-muted); font-size: var(--g-font-size-sm);
}
.gamify-quiz-daily-limit p { margin: 0; }

/* Quiz List */
.gamify-quiz-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--g-space-md);
}
.gamify-quiz-card {
    padding: 20px; transition: all var(--g-transition);
}
.gamify-quiz-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.gamify-quiz-card-complete {
    opacity: 0.6;
}
.gamify-quiz-card-complete:hover { opacity: 0.8; }
.gamify-quiz-card-header {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;
}
.gamify-quiz-card-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.gamify-quiz-card-info { flex: 1; min-width: 0; }
.gamify-quiz-card-title {
    margin: 0 0 4px; font-size: var(--g-font-size-base); font-weight: 700;
    color: var(--g-text); line-height: 1.3;
}
.gamify-quiz-card-meta {
    display: flex; gap: 6px; flex-wrap: wrap;
    font-size: var(--g-font-size-xs); color: var(--g-text-muted);
}
.gamify-quiz-earned { color: var(--g-success); font-weight: 600; }
.gamify-quiz-card-progress-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.gamify-quiz-card-bar {
    flex: 1; height: 6px; background: var(--g-bg-muted);
    border-radius: 3px; overflow: hidden;
}
.gamify-quiz-card-bar > div {
    height: 100%; background: var(--g-primary); border-radius: 3px;
    transition: width 0.4s ease;
}
.gamify-quiz-card-complete .gamify-quiz-card-bar > div { background: var(--g-success); }
.gamify-quiz-card-pct {
    font-size: var(--g-font-size-xs); color: var(--g-text-muted);
    font-weight: 600; white-space: nowrap;
}
.gamify-quiz-card-footer { display: flex; align-items: center; }
.gamify-quiz-start-btn {
    display: inline-block; padding: 8px 20px;
    background: var(--g-primary); color: #fff; border: none;
    border-radius: var(--g-radius-sm); font-size: var(--g-font-size-sm);
    font-weight: 600; cursor: pointer; transition: all var(--g-transition);
    font-family: var(--g-font);
}
.gamify-quiz-start-btn:hover:not(:disabled) { background: var(--g-primary-dark); transform: translateY(-1px); }
.gamify-quiz-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gamify-quiz-card-progress .gamify-quiz-start-btn {
    background: transparent; color: var(--g-primary);
    border: 1px solid var(--g-primary);
}
.gamify-quiz-card-progress .gamify-quiz-start-btn:hover:not(:disabled) {
    background: var(--g-primary); color: #fff;
}
.gamify-quiz-complete-badge {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    background: #dcfce7; color: #16a34a; font-size: var(--g-font-size-xs);
    font-weight: 700;
}

/* Quiz Play Mode */
.gamify-quiz-play-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: var(--g-space-lg); padding-bottom: 12px;
    border-bottom: 1px solid var(--g-card-border);
}
.gamify-quiz-back-btn {
    background: none; border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm); padding: 6px 14px;
    font-size: var(--g-font-size-sm); color: var(--g-text-muted);
    cursor: pointer; transition: all var(--g-transition);
    font-family: var(--g-font);
}
.gamify-quiz-back-btn:hover { border-color: var(--g-primary); color: var(--g-primary); }
.gamify-quiz-play-title { font-size: var(--g-font-size-lg); font-weight: 700; color: var(--g-text); }

/* Quiz Question */
.gamify-quiz-question { padding: var(--g-space-lg); }
.gamify-quiz-q-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.gamify-quiz-difficulty {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 700; text-transform: capitalize;
}
.gamify-quiz-diff-easy { background: #dcfce7; color: #16a34a; }
.gamify-quiz-diff-normal, .gamify-quiz-diff-medium { background: #fef3c7; color: #d97706; }
.gamify-quiz-diff-hard { background: #fef2f2; color: #dc2626; }
.gamify-quiz-xp-badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 700;
    background: #ede9fe; color: var(--g-primary);
}
.gamify-quiz-question h4 { margin: 0 0 16px; font-size: var(--g-font-size-lg); color: var(--g-text); line-height: 1.4; }
.gamify-quiz-options { display: flex; flex-direction: column; gap: 8px; }
.gamify-quiz-option {
    display: block; width: 100%; padding: 14px 18px;
    background: var(--g-bg-subtle);
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    font-size: var(--g-font-size-sm); text-align: left;
    cursor: pointer; transition: all var(--g-transition);
    color: var(--g-text); font-family: var(--g-font);
}
.gamify-quiz-option:hover:not(:disabled) { border-color: var(--g-primary); background: #f5f3ff; transform: translateX(4px); }
.gamify-quiz-option:disabled { cursor: default; opacity: 0.8; }
.gamify-quiz-option.correct { border-color: var(--g-success); background: #f0fdf4; color: #15803d; }
.gamify-quiz-option.wrong { border-color: var(--g-danger); background: #fef2f2; color: #b91c1c; }
.gamify-quiz-correct {
    padding: 14px; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: var(--g-radius-sm); color: #15803d; font-weight: 600; margin-top: 12px;
}
.gamify-quiz-wrong {
    padding: 14px; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: var(--g-radius-sm); color: #b91c1c; font-weight: 600; margin-top: 12px;
}
.gamify-quiz-explanation { font-size: var(--g-font-size-sm); color: var(--g-text-secondary); margin-top: 8px; }
.gamify-quiz-done {
    text-align: center; padding: 40px 20px;
}
.gamify-quiz-done-icon { font-size: 48px; margin-bottom: 12px; }
.gamify-quiz-done h4 { margin: 0 0 8px; font-size: var(--g-font-size-xl); color: var(--g-text); }
.gamify-quiz-done p { margin: 0 0 20px; color: var(--g-text-muted); }

/* ==================== NOTIFICATIONS ==================== */
.gamify-notification-list { display: flex; flex-direction: column; }
.gamify-notification-item {
    display: flex; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--g-bg-muted);
    align-items: flex-start;
    transition: background var(--g-transition-fast);
}
.gamify-notification-item:hover { background: var(--g-bg-subtle); }
.gamify-notification-item:last-child { border-bottom: none; }
.gamify-notification-item.unread { background: #f5f3ff; border-left: 3px solid var(--g-primary); }
.gamify-notification-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.gamify-notification-content { flex: 1; }
.gamify-notification-content strong { display: block; font-size: var(--g-font-size-sm); color: var(--g-text); margin-bottom: 2px; }
.gamify-notification-content p { margin: 0; font-size: var(--g-font-size-sm); color: var(--g-text-secondary); }
.gamify-notification-content small { color: var(--g-text-muted); }

/* ==================== SEASON / BATTLE PASS ==================== */
/* Season Hero */
.gamify-season-hero {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #c7d2fe;
    border-radius: var(--g-radius-lg);
    padding: var(--g-space-lg);
    margin-bottom: var(--g-space-lg);
    position: relative;
    overflow: hidden;
}
.gamify-season-hero.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.gamify-season-hero.has-bg-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245,243,255,0.85), rgba(237,233,254,0.8));
    z-index: 0;
}
.gamify-season-hero.has-bg-image > * {
    position: relative;
    z-index: 1;
}
.gamify-season-hero-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: var(--g-space-lg); margin-bottom: var(--g-space-md);
}
.gamify-season-hero-info { flex: 1; }
.gamify-season-title { margin: 0 0 6px; font-size: var(--g-font-size-xl); color: var(--g-text); }
.gamify-season-desc { margin: 0 0 8px; font-size: var(--g-font-size-sm); color: var(--g-text-secondary); }
.gamify-season-dates { font-size: var(--g-font-size-xs); color: var(--g-text-muted); }

/* Countdown */
.gamify-season-countdown {
    text-align: center; background: #fff; border-radius: var(--g-radius-md);
    padding: 12px 20px; border: 1px solid var(--g-card-border);
    min-width: 80px; flex-shrink: 0;
}
.gamify-season-countdown.urgent { background: #fef2f2; border-color: #fecaca; }
.gamify-season-countdown-num {
    display: block; font-size: 28px; font-weight: 800; color: var(--g-primary); line-height: 1;
}
.gamify-season-countdown.urgent .gamify-season-countdown-num { color: #dc2626; }
.gamify-season-countdown-label { font-size: 11px; color: var(--g-text-muted); font-weight: 600; }
.gamify-season-countdown.urgent .gamify-season-countdown-label { color: #dc2626; }

/* User stats */
.gamify-season-user-stats {
    display: flex; gap: var(--g-space-lg); margin-bottom: var(--g-space-md);
}
.gamify-season-user-stat { text-align: center; }
.gamify-season-stat-val { display: block; font-size: var(--g-font-size-lg); font-weight: 800; color: var(--g-primary); }
.gamify-season-stat-lbl { font-size: var(--g-font-size-xs); color: var(--g-text-muted); }

/* Progress bar */
.gamify-season-progress-wrap { display: flex; align-items: center; gap: 12px; }
.gamify-season-progress-bar {
    flex: 1; height: 8px; background: rgba(255,255,255,0.7);
    border-radius: 4px; overflow: hidden;
}
.gamify-season-progress-bar > div {
    height: 100%; background: var(--g-primary); border-radius: 4px;
    transition: width 0.6s ease;
}
.gamify-season-progress-label { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 600; white-space: nowrap; }

/* Grand Prize */
.gamify-season-prize {
    margin-bottom: var(--g-space-lg); padding: 20px;
    border: 2px solid #fbbf24; background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.gamify-season-prize-badge {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    background: #fbbf24; color: #78350f; font-size: 12px; font-weight: 700;
    margin-bottom: 12px;
}
.gamify-season-prize-content {
    display: flex; align-items: center; gap: 16px;
}
.gamify-season-prize-img {
    width: 80px; height: 80px; border-radius: var(--g-radius-sm);
    object-fit: cover; border: 2px solid #fbbf24; flex-shrink: 0;
}
.gamify-season-prize-info h4 { margin: 0 0 4px; font-size: var(--g-font-size-md); color: var(--g-text); }
.gamify-season-prize-info p { margin: 0; font-size: var(--g-font-size-sm); color: var(--g-text-secondary); }

/* Two-column layout */
.gamify-season-columns {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--g-space-lg);
}
.gamify-season-section-title {
    font-size: var(--g-font-size-md); font-weight: 700; color: var(--g-text);
    margin: 0 0 var(--g-space-md); padding-bottom: 8px;
    border-bottom: 2px solid var(--g-bg-muted);
}

/* Reward Ladder */
.gamify-season-ladder { display: flex; flex-direction: column; gap: 4px; }
.gamify-season-rung {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    background: var(--g-card-bg);
    transition: all var(--g-transition);
}
.gamify-season-rung.claimable {
    border-color: var(--g-primary);
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.gamify-season-rung.claimed { background: #f0fdf4; border-color: #bbf7d0; }
.gamify-season-rung.locked { opacity: 0.35; }
.gamify-season-rung-level { font-weight: 700; min-width: 40px; font-size: var(--g-font-size-sm); color: var(--g-primary); }
.gamify-season-rung-info { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gamify-season-rung-icon { font-size: 18px; flex-shrink: 0; }
.gamify-season-rung-name { font-size: var(--g-font-size-sm); color: var(--g-text); }
.gamify-season-rung-value { font-size: var(--g-font-size-xs); color: var(--g-text-secondary); }
.gamify-season-rung-status { font-size: var(--g-font-size-md); min-width: 30px; text-align: center; }
.gamify-season-rung-status.claimed { color: var(--g-success); }
.gamify-season-rung-status.locked { color: var(--g-text-muted); }
.gamify-season-claim-btn { white-space: nowrap; }

/* Season Leaderboard */
.gamify-season-leaderboard { display: flex; flex-direction: column; gap: 2px; }
.gamify-season-lb-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--g-radius-sm);
    background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    transition: background var(--g-transition);
}
.gamify-season-lb-row:hover { background: var(--g-bg-muted); }
.gamify-season-lb-top { background: #fffbeb; border-color: #fde68a; }
.gamify-season-lb-rank { min-width: 28px; font-size: 18px; text-align: center; }
.gamify-season-lb-rank-num { font-size: 13px; font-weight: 700; color: var(--g-text-muted); }
.gamify-season-lb-name { flex: 1; font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text); }
.gamify-season-lb-xp { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 600; white-space: nowrap; }

/* ==================== WRAPPED / SUMMARY ==================== */
/* Wrapped Period Selector */
.gamify-wrapped-periods { display: flex; gap: var(--g-space-sm); margin-bottom: var(--g-space-lg); }
.gamify-wrapped-period { flex: 1; text-align: center; border-radius: var(--g-radius-sm); }
.gamify-wrapped-period.active { background: var(--g-primary); border-color: var(--g-primary); color: #fff; }

/* ==================== WRAPPED STORY VIEWER ==================== */
.gamify-story-viewer {
    position: relative; width: 100%; max-width: 400px; margin: 0 auto;
    aspect-ratio: 9/16; border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    user-select: none; -webkit-user-select: none;
    cursor: pointer;
}
.gamify-story-slide {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 28px; text-align: center; color: #fff;
    opacity: 0; transform: scale(0.95); transition: opacity 0.5s, transform 0.5s;
    pointer-events: none;
}
.gamify-story-slide.active {
    opacity: 1; transform: scale(1); pointer-events: auto;
}

/* Slide Gradients */
/* Slide backgrounds are set via inline styles from admin config */
.gamify-story-slide { background: linear-gradient(160deg, #6366f1, #a855f7); }

/* Progress Bar */
.gamify-story-progress {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; gap: 4px; z-index: 10;
}
.gamify-story-progress-seg {
    flex: 1; height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.3); overflow: hidden;
}
.gamify-story-progress-fill {
    height: 100%; width: 0; background: #fff; border-radius: 2px;
    transition: width 0.3s linear;
}
.gamify-story-progress-seg.done .gamify-story-progress-fill { width: 100%; }
.gamify-story-progress-seg.active .gamify-story-progress-fill {
    width: 100%;
    animation: storyTimer 6s linear forwards;
}
@keyframes storyTimer { from { width: 0; } to { width: 100%; } }

/* Navigation zones */
.gamify-story-nav {
    position: absolute; top: 30px; bottom: 60px; z-index: 5;
}
.gamify-story-nav-left { left: 0; width: 30%; }
.gamify-story-nav-right { right: 0; width: 70%; }

/* Slide content elements */
.gamify-story-avatar {
    width: 90px; height: 90px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5); object-fit: cover;
    margin-bottom: 16px;
}
.gamify-story-pretitle {
    font-size: 14px; text-transform: uppercase; letter-spacing: 3px;
    opacity: 0.7; margin-bottom: 12px;
}
.gamify-story-title {
    font-size: 28px; font-weight: 800; line-height: 1.2;
    margin: 0 0 8px; text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.gamify-story-big-number {
    font-size: 72px; font-weight: 900; line-height: 1;
    margin: 16px 0; text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.gamify-story-subtitle {
    font-size: 16px; opacity: 0.85; line-height: 1.5; max-width: 280px;
}
.gamify-story-icon {
    font-size: 64px; margin-bottom: 16px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}
.gamify-story-icon-img {
    width: 80px; height: 80px; object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}
.gamify-story-detail {
    font-size: 13px; opacity: 0.6; margin-top: 12px;
}
/* Background image overlay */
.gamify-story-bg-image {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
}
.gamify-story-bg-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: rgba(0, 0, 0, 0.45);
}
.gamify-story-slide .gamify-story-bg-image ~ *:not(.gamify-story-bg-overlay) {
    position: relative; z-index: 2;
}
/* List items */
.gamify-story-list {
    width: 100%; max-width: 300px; margin: 18px auto 0; text-align: center;
}
.gamify-story-list-item {
    font-size: 15px; padding: 6px 0; opacity: 0.9;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.gamify-story-list-item:last-child { border-bottom: none; }
.gamify-story-logo {
    width: 80px; height: auto; object-fit: contain;
    position: absolute; z-index: 2;
}
.gamify-story-logo-top-left { top: 24px; left: 20px; }
.gamify-story-logo-top-center { top: 24px; left: 50%; transform: translateX(-50%); }
.gamify-story-logo-top-right { top: 24px; right: 20px; }
.gamify-story-logo-bottom-left { bottom: 40px; left: 20px; }
.gamify-story-logo-bottom-center { bottom: 40px; left: 50%; transform: translateX(-50%); }
.gamify-story-logo-bottom-right { bottom: 40px; right: 20px; }
.gamify-story-watermark {
    position: absolute; bottom: 16px; left: 0; right: 0;
    text-align: center; font-size: 12px; opacity: 0.35;
    letter-spacing: 0.5px;
}

/* Breakdown bars in story */
.gamify-story-bars {
    width: 100%; max-width: 300px; margin-top: 20px; text-align: left;
}
.gamify-story-bar-item {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.gamify-story-bar-label {
    font-size: 12px; min-width: 75px; text-align: right; opacity: 0.8;
}
.gamify-story-bar-track {
    flex: 1; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden;
}
.gamify-story-bar-fill {
    height: 100%; border-radius: 4px; background: #fff;
    transition: width 1s ease-out;
}
.gamify-story-bar-value {
    font-size: 11px; min-width: 50px; font-weight: 600;
}

/* Summary grid */
.gamify-story-summary-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    width: 100%; max-width: 300px; margin: 20px 0;
}
.gamify-story-summary-item {
    background: rgba(255,255,255,0.12); border-radius: 14px; padding: 14px 8px;
}
.gamify-story-summary-value {
    display: block; font-size: 24px; font-weight: 800;
}
.gamify-story-summary-label {
    display: block; font-size: 11px; opacity: 0.7; margin-top: 4px;
}

/* Bottom actions */
.gamify-story-actions {
    display: flex; gap: 8px; margin-top: 12px;
    justify-content: center;
}
.gamify-story-actions button {
    padding: 10px 20px; border: none; border-radius: 12px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.gamify-story-actions button:active { transform: scale(0.95); }
.gamify-story-btn-download {
    background: var(--g-primary, #6366f1); color: #fff;
}
.gamify-story-btn-download:hover { opacity: 0.9; }
.gamify-story-btn-share {
    background: transparent; color: var(--g-text, #475569);
    border: 1px solid var(--g-border, #e2e8f0) !important;
}
.gamify-story-btn-share:hover { background: var(--g-bg-secondary, #f8fafc); }

/* Animations for slide content */
.gamify-story-slide.active .gamify-story-big-number {
    animation: storyCountUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.gamify-story-slide.active .gamify-story-icon {
    animation: storyBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.gamify-story-slide.active .gamify-story-title {
    animation: storyFadeUp 0.5s ease-out both;
}
.gamify-story-slide.active .gamify-story-subtitle {
    animation: storyFadeUp 0.6s ease-out 0.1s both;
}
@keyframes storyCountUp {
    from { opacity: 0; transform: scale(0.5) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes storyBounce {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes storyFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== CAMPAIGN BANNER ==================== */
.gamify-campaign-banner { margin-bottom: var(--g-space-lg); }
.gamify-campaign-item {
    display: flex; align-items: center; gap: var(--g-space-md);
    padding: 14px 18px;
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: var(--g-radius-md);
    margin-bottom: var(--g-space-sm);
}
.gamify-campaign-icon { font-size: 24px; flex-shrink: 0; }
.gamify-campaign-info { flex: 1; }
.gamify-campaign-info strong { font-size: var(--g-font-size-sm); color: #92400e; display: block; }
.gamify-campaign-multiplier {
    display: inline-block;
    background: #fef3c7; padding: 2px 10px; border-radius: 20px;
    font-weight: 700; font-size: var(--g-font-size-xs); color: #92400e;
    margin-left: 8px;
}
.gamify-campaign-timer { font-size: var(--g-font-size-xs); color: var(--g-text-secondary); display: block; margin-top: 2px; }

/* ==================== PROFILE ==================== */
.gamify-profile-visit-bar {
    display: flex; align-items: center; gap: var(--g-space-md);
    margin-bottom: var(--g-space-md); padding: var(--g-space-md) var(--g-space-lg);
}
.gamify-profile-visit-info { flex: 1; min-width: 0; }
.gamify-profile-visit-label {
    font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text-secondary);
    margin-bottom: 6px; display: block;
}
.gamify-profile-visit-url-row { display: flex; gap: 8px; align-items: center; width: 100%; }
.gamify-profile-url-input {
    flex: 1; min-width: 0; padding: 8px 12px;
    background: var(--g-bg-subtle); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm); font-size: var(--g-font-size-sm);
    color: var(--g-text); font-family: monospace;
}
.gamify-profile-edit { margin-bottom: var(--g-space-lg); }
.gamify-profile-avatar-section {
    display: flex; align-items: center; gap: var(--g-space-md);
    margin-bottom: var(--g-space-lg);
}
.gamify-profile-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    border: 4px solid #fff; object-fit: cover;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1), 0 0 0 4px rgba(99,102,241,0.15);
}
.gamify-profile-fields { display: flex; flex-direction: column; gap: var(--g-space-md); }
.gamify-profile-fields label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: var(--g-font-size-sm); font-weight: 600; color: var(--g-text-secondary);
}
.gamify-profile-input {
    padding: 10px 14px;
    background: var(--g-bg-subtle); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm);
    color: var(--g-text); font-size: var(--g-font-size-sm);
    font-family: var(--g-font); resize: vertical;
    transition: border-color var(--g-transition);
}
.gamify-profile-input:focus { outline: none; border-color: var(--g-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.gamify-profile-toggle-wrap {
    display: flex; align-items: center; gap: var(--g-space-md);
    margin-top: var(--g-space-md);
    font-size: var(--g-font-size-sm); color: var(--g-text-secondary);
}
.gamify-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.gamify-toggle input { opacity: 0; width: 0; height: 0; }
.gamify-toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1; border-radius: 12px;
    cursor: pointer; transition: var(--g-transition);
}
.gamify-toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%;
    transition: var(--g-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.gamify-toggle input:checked + .gamify-toggle-slider { background: var(--g-primary); }
.gamify-toggle input:checked + .gamify-toggle-slider::before { transform: translateX(20px); }
.gamify-profile-showcase-section { margin-bottom: var(--g-space-lg); }
.gamify-profile-showcase-section h4 { margin: 0 0 var(--g-space-sm); font-size: var(--g-font-size-md); color: var(--g-text); }
.gamify-profile-showcase-hint { font-size: var(--g-font-size-xs); color: var(--g-text-muted); margin: 0 0 var(--g-space-sm); }
.gamify-showcase-picker {
    padding: 0;
}
.gamify-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: var(--g-bg-subtle);
    border-radius: var(--g-radius-sm);
    border: 1px solid var(--g-card-border);
}
.gamify-showcase-item {
    position: relative; cursor: pointer;
    border-radius: var(--g-radius-md); overflow: hidden;
    border: 2px solid var(--g-card-border);
    transition: all var(--g-transition);
    padding: 10px; text-align: center;
    display: flex; flex-direction: column; align-items: center;
    background: var(--g-card-bg);
    background: #fff;
}
.gamify-showcase-item:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: var(--g-card-shadow-hover); }
.gamify-showcase-item.selected { border-color: var(--g-primary); background: rgba(99, 102, 241, 0.05); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.gamify-showcase-item input[type="checkbox"] { position: absolute; top: 6px; right: 6px; accent-color: var(--g-primary); width: 16px; height: 16px; }
.gamify-showcase-item-name { font-size: var(--g-font-size-xs); color: var(--g-text); display: block; margin-top: 6px; word-break: break-word; font-weight: 500; line-height: 1.3; }
.gamify-showcase-thumb { width: 100%; height: auto; max-height: 90px; object-fit: contain; border-radius: 6px; }
.gamify-showcase-item-visual { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 110px; position: relative; }
.gamify-showcase-card-count {
    position: absolute; top: 4px; left: 4px;
    background: var(--g-primary); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 1px 6px; border-radius: 8px;
    line-height: 1.4;
}
.gamify-showcase-icon-placeholder { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.gamify-showcase-limit-tag {
    font-size: var(--g-font-size-xs); font-weight: 600;
    color: var(--g-text-muted); background: var(--g-bg-muted);
    padding: 2px 8px; border-radius: 10px; margin-left: 8px;
}
.gamify-showcase-disabled {
    opacity: 0.4; pointer-events: none; filter: grayscale(0.5);
}
.gamify-profile-save-wrap { display: flex; align-items: center; gap: var(--g-space-md); margin-top: var(--g-space-lg); }
.gamify-profile-save-btn { min-width: 120px; }

/* ==================== PUBLIC PROFILE — PREMIUM ==================== */
.gamify-public-profile-wrap {
    max-width: 880px; margin: 0 auto; padding: 0 var(--g-space-md);
    font-family: var(--g-font); color: var(--g-text);
}

/* ---- Private Profile ---- */
.gamify-pp-private {
    text-align: center; padding: 80px var(--g-space-xl);
    background: #fff; border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-xl); margin: 60px 0;
}
.gamify-pp-private-icon { font-size: 48px; margin-bottom: var(--g-space-md); opacity: 0.5; }
.gamify-pp-private h2 { margin: 0 0 8px; font-size: var(--g-font-size-xl); color: var(--g-text); }
.gamify-pp-private p { margin: 0; color: var(--g-text-muted); }

/* ---- Public Profile: hide theme page heading ---- */
.gamify-public-profile-page .page-title,
.gamify-public-profile-page .entry-title,
.gamify-public-profile-page .page-header h1,
.gamify-public-profile-page .woocommerce-page-title,
.gamify-public-profile-page header.page-header > h1 { display: none !important; }

/* ---- Avatar + Frame (shared) ---- */
.gamify-pp-avatar-wrap {
    position: relative; display: inline-block; margin-bottom: 16px;
    overflow: visible;
}
.gamify-pp-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    border: 4px solid #fff; object-fit: cover; display: block;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1), 0 0 0 4px rgba(99,102,241,0.15);
}
.gamify-pp-frame {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 156px; height: 156px;
    pointer-events: none; z-index: 2; object-fit: contain;
    overflow: visible;
}
.gamify-pp-avatar-wrap.has-frame .gamify-pp-avatar {
    border-color: transparent;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* ==================== PSA SLAB CARD ==================== */
.gamify-slab {
    width: 100%;
    margin: 32px 0 var(--g-space-xl);
    display: flex; flex-direction: column; align-items: center;
}

/* Avatar + username above slab */
.gamify-slab-avatar-wrap {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: -40px;
}
.gamify-slab-username-top {
    display: none;
}

/* Red outer frame (PSA case) */
.gamify-slab-frame {
    width: 100%;
    background: #cc0000;
    border-radius: 12px;
    padding: 18px;
    padding-top: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}
/* Username centered on red frame bar */
.gamify-slab-frame::after {
    content: attr(data-username);
    position: absolute; top: 22px; left: 0; right: 0;
    display: flex; justify-content: center;
    font-size: 19px; font-weight: 800; color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Inner white label */
.gamify-slab-label {
    background: #faf9f6;
    border-radius: 6px;
    overflow: hidden;
}

/* Red top bar inside label (hidden — outer frame serves as bar) */
.gamify-slab-bar {
    display: none;
}

/* Info area — two columns */
.gamify-slab-body {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 18px 28px 14px; gap: 32px;
}

/* Left column */
.gamify-slab-left {
    display: flex; flex-direction: column; gap: 1px;
    flex: 1; min-width: 0;
}
.gamify-slab-program {
    font-size: 16px; font-weight: 800; color: #1a1a1a;
    letter-spacing: 0.01em; line-height: 1.3;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}
.gamify-slab-level-name {
    font-size: 14px; font-weight: 700; color: #1a1a1a;
    letter-spacing: 0.01em; line-height: 1.3;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}
.gamify-slab-bio {
    font-size: 14px; font-weight: 700; color: #1a1a1a;
    letter-spacing: 0.01em; line-height: 1.3;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}

/* Right column */
.gamify-slab-right {
    display: flex; flex-direction: column; align-items: flex-end; gap: 0;
    text-align: right;
}
.gamify-slab-hash {
    font-size: 14px; font-weight: 800; color: #1a1a1a;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}
.gamify-slab-grade-label {
    font-size: 14px; font-weight: 800; color: #1a1a1a;
    letter-spacing: 0.05em;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}
.gamify-slab-grade {
    font-size: 42px; font-weight: 900; color: #1a1a1a;
    line-height: 1; letter-spacing: -0.02em;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}

/* XP under level grade */
.gamify-slab-xp {
    font-size: 14px; font-weight: 700; color: #1a1a1a;
    letter-spacing: 0.01em; line-height: 1.3; margin-top: 2px;
    font-family: 'Arial Narrow', Arial, Helvetica, sans-serif;
}

/* Slab responsive */
@media (max-width: 600px) {
    .gamify-slab-avatar-wrap .gamify-pp-avatar { width: 104px; height: 104px; }
    .gamify-slab-avatar-wrap .gamify-pp-frame { width: 126px; height: 126px; }
    .gamify-slab-avatar-wrap { margin-bottom: -30px; }
    .gamify-slab-body { padding: 14px 18px 10px; }
    .gamify-slab-grade { font-size: 32px; }
    .gamify-slab-program { font-size: 14px; }
    .gamify-slab-stats { padding: 12px 18px; }
    .gamify-slab-stat-value { font-size: var(--g-font-size-md); }
    .gamify-slab-serial { padding: 6px 18px; }
}

/* ---- Section (Showcase) ---- */
.gamify-pp-section {
    background: #fff; border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-xl); padding: var(--g-space-xl);
    margin-bottom: var(--g-space-lg);
    box-shadow: var(--g-card-shadow);
}
.gamify-pp-section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: var(--g-space-lg);
    padding-bottom: var(--g-space-md);
    border-bottom: 1px solid var(--g-card-border);
}
.gamify-pp-section-icon { font-size: 22px; }
.gamify-pp-section-header h2 {
    margin: 0; font-size: var(--g-font-size-lg); font-weight: 700;
    color: var(--g-text); flex: 1;
}
.gamify-pp-section-count {
    font-size: var(--g-font-size-xs); font-weight: 600;
    color: var(--g-text-muted); background: var(--g-bg-muted);
    padding: 4px 10px; border-radius: 12px;
}

/* ---- Badge Showcase Grid ---- */
.gamify-pp-badge-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--g-space-md);
}
.gamify-pp-badge-card {
    text-align: center; padding: 20px 12px;
    background: var(--g-bg-subtle); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md);
    transition: all var(--g-transition);
}
.gamify-pp-badge-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--g-card-shadow-hover);
    border-color: var(--g-primary-light);
}
.gamify-pp-badge-icon {
    width: 52px; height: 52px; border-radius: 50%;
    object-fit: cover; margin-bottom: 10px;
    border: 2px solid var(--g-card-border);
}
.gamify-pp-badge-icon-placeholder {
    width: 52px; height: 52px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; background: var(--g-bg-muted);
    margin-bottom: 10px; border: 2px solid var(--g-card-border);
}
.gamify-pp-badge-name {
    display: block; font-size: var(--g-font-size-sm); font-weight: 700;
    color: var(--g-text); line-height: 1.3;
}
.gamify-pp-badge-tier {
    display: block; font-size: var(--g-font-size-xs); font-weight: 600;
    margin-top: 4px;
}

/* ---- Card Showcase Grid ---- */
.gamify-pp-card-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: var(--g-space-sm);
}
.gamify-pp-card-item {
    background: var(--g-card-bg); border: 2px solid var(--g-card-border);
    border-radius: var(--g-radius-md); overflow: hidden;
    transition: all var(--g-transition);
    border-top: 3px solid var(--card-rarity-color, #94a3b8);
}
.gamify-pp-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.gamify-pp-card-img-wrap {
    background: var(--g-bg-muted); display: flex;
    align-items: center; justify-content: center;
}
.gamify-pp-card-img {
    width: 100%; height: auto; display: block;
    object-fit: contain;
}
.gamify-pp-card-img-placeholder {
    width: 100%; aspect-ratio: 63/88;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 800;
    color: var(--g-text-muted); background: var(--g-bg-muted);
}
.gamify-pp-card-meta {
    padding: 10px 12px;
}
.gamify-pp-card-name {
    display: block; font-size: var(--g-font-size-sm); font-weight: 700;
    color: var(--g-text); line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gamify-pp-card-rarity {
    display: block; font-size: var(--g-font-size-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px;
}

/* ---- Product Showcase Grid ---- */
.gamify-pp-product-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--g-space-md);
}
.gamify-pp-product-card {
    background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md); overflow: hidden;
    transition: all var(--g-transition);
    text-decoration: none; color: inherit; display: block;
}
.gamify-pp-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--g-primary-light);
}
.gamify-pp-product-img-wrap {
    background: var(--g-bg-muted); display: flex;
    align-items: center; justify-content: center;
    overflow: hidden; aspect-ratio: 3 / 4;
}
.gamify-pp-product-img-wrap img {
    width: 100%; height: 100%; display: block;
    object-fit: contain; padding: 8px;
}
.gamify-pp-product-name {
    display: block; padding: 10px 12px;
    font-size: var(--g-font-size-sm); font-weight: 600;
    color: var(--g-text); line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Dashboard Avatar Frame (reuse) ---- */
.gamify-avatar-frame-wrap {
    position: relative; display: inline-block; margin-bottom: var(--g-space-md);
    overflow: visible;
}
.gamify-avatar-frame-wrap .avatar {
    width: 100px; height: 100px; border-radius: 50%;
    border: 3px solid var(--g-primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
    object-fit: cover; display: block;
}
.gamify-profile-frame-overlay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 130px; height: 130px;
    pointer-events: none; z-index: 2; object-fit: contain;
    background: transparent;
    overflow: visible;
}
.gamify-avatar-frame-wrap .gamify-profile-avatar {
    position: relative; z-index: 1;
}
/* Frame varsa avatar'in kendi border/shadow'unu kaldir */
.gamify-avatar-frame-wrap.has-frame .avatar,
.gamify-avatar-frame-wrap.has-frame .gamify-profile-avatar {
    border-color: transparent;
    box-shadow: none;
}
.gamify-avatar-frame-sm .gamify-profile-avatar {
    width: 120px; height: 120px;
}
.gamify-avatar-frame-sm .gamify-profile-frame-overlay {
    width: 156px; height: 156px;
}

/* ---- Set Vitrini (Public Profile) ---- */
.gamify-pp-set-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g-space-md);
}
.gamify-pp-set-card {
    background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md); padding: 16px;
    transition: all var(--g-transition); cursor: pointer;
    position: relative;
}
.gamify-pp-set-card:hover {
    transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--g-primary-light);
}
.gamify-pp-set-card-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.gamify-pp-set-icon { font-size: 24px; }
.gamify-pp-set-icon-img { width: 80px; height: auto; object-fit: contain; border-radius: 0; }
.gamify-pp-set-name { font-weight: 700; font-size: var(--g-font-size-base); color: var(--g-text); }
.gamify-pp-set-progress-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.gamify-pp-set-count { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 600; white-space: nowrap; }
.gamify-pp-set-bar {
    flex: 1; height: 6px; background: var(--g-bg-muted); border-radius: 3px; overflow: hidden;
}
.gamify-pp-set-bar > div {
    height: 100%; background: var(--g-primary); border-radius: 3px;
    transition: width 0.4s ease;
}
.gamify-pp-set-pct { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 600; white-space: nowrap; }
.gamify-pp-set-complete-badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700;
    margin-bottom: 8px;
}
.gamify-pp-set-detail-btn {
    display: block; width: 100%; margin-top: 8px; padding: 8px 0;
    background: var(--g-bg-muted); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-sm); font-size: var(--g-font-size-sm);
    font-weight: 600; color: var(--g-primary); cursor: pointer;
    transition: all var(--g-transition);
}
.gamify-pp-set-detail-btn:hover {
    background: var(--g-primary); color: #fff; border-color: var(--g-primary);
}

/* Set Detail Modal */
.gamify-pp-set-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.5); display: flex;
    align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.gamify-pp-set-modal-content {
    background: #fff; border-radius: var(--g-radius-lg);
    padding: 28px; max-width: 640px; width: 90%;
    max-height: 80vh; overflow-y: auto;
    position: relative; animation: slideUp 0.25s ease;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}
.gamify-pp-set-modal-close {
    position: absolute; top: 12px; right: 16px; background: none;
    border: none; font-size: 28px; cursor: pointer; color: var(--g-text-muted);
    line-height: 1;
}
.gamify-pp-set-modal-close:hover { color: var(--g-text); }
.gamify-pp-set-modal-content h3 {
    margin: 0 0 20px; font-size: var(--g-font-size-lg); font-weight: 700;
}
.gamify-pp-set-modal-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
}
.gamify-pp-setcard {
    background: var(--g-card-bg); border: 2px solid var(--rarity-color, var(--g-card-border));
    border-radius: var(--g-radius-sm); padding: 8px; text-align: center;
    transition: all var(--g-transition);
}
.gamify-pp-setcard img {
    width: 100%; aspect-ratio: 63/88; object-fit: contain; border-radius: 4px;
    margin-bottom: 6px;
}
.gamify-pp-setcard-placeholder {
    width: 100%; aspect-ratio: 63/88; display: flex;
    align-items: center; justify-content: center;
    background: var(--g-bg-muted); border-radius: 4px;
    font-size: 28px; font-weight: 700; color: var(--g-text-muted);
    margin-bottom: 6px;
}
.gamify-pp-setcard-name {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--g-text); line-height: 1.2; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gamify-pp-setcard-rarity {
    display: block; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.gamify-pp-setcard-unowned {
    opacity: 0.4; border-color: var(--g-card-border) !important;
}
.gamify-pp-setcard-unowned img,
.gamify-pp-setcard-unowned .gamify-pp-setcard-placeholder {
    filter: grayscale(1);
}
.gamify-pp-setcard-locked {
    display: block; font-size: 12px; margin-top: 2px;
}

/* Dashboard set picker extras */
.gamify-showcase-set-item {
    flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.gamify-showcase-set-img {
    width: 80px; height: auto; object-fit: contain; border-radius: 0;
}
.gamify-showcase-set-progress {
    font-size: 11px; color: var(--g-text-muted); font-weight: 500;
}
.gamify-showcase-set-complete {
    font-size: 10px; color: #16a34a; font-weight: 700;
    background: #dcfce7; padding: 1px 8px; border-radius: 10px;
}
.gamify-showcase-set-bar {
    width: 100%; height: 4px; background: var(--g-bg-muted);
    border-radius: 2px; overflow: hidden; margin-top: 2px;
}
.gamify-showcase-set-bar > span {
    display: block; height: 100%; background: var(--g-primary); border-radius: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .gamify-pp-avatar { width: 96px; height: 96px; }
    .gamify-pp-frame { width: 126px; height: 126px; }
    .gamify-pp-section { padding: var(--g-space-md); }
    .gamify-pp-badge-grid { grid-template-columns: repeat(2, 1fr); }
    .gamify-pp-card-grid { grid-template-columns: repeat(3, 1fr); }
    .gamify-pp-product-grid { grid-template-columns: repeat(2, 1fr); }
    .gamify-pp-set-grid { grid-template-columns: 1fr; }
    .gamify-pp-set-modal-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ==================== SURPRISE ==================== */
.gamify-surprise-section { margin-bottom: var(--g-space-lg); }
.gamify-surprise-section h3 { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0 0 var(--g-space-md); color: var(--g-text); }
.gamify-surprise-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--g-space-sm); }
.gamify-surprise-card {
    display: flex; align-items: center; gap: var(--g-space-sm);
    padding: 12px 16px;
    background: #fdf2f8; border: 1px solid #fbcfe8;
    border-radius: var(--g-radius-sm);
}
.gamify-surprise-icon { font-size: 24px; flex-shrink: 0; }
.gamify-surprise-info { flex: 1; }
.gamify-surprise-info strong { font-size: var(--g-font-size-sm); color: #be185d; display: block; }
.gamify-surprise-value { font-size: var(--g-font-size-xs); color: var(--g-success); font-weight: 600; display: block; }
.gamify-surprise-info small { color: var(--g-text-muted); }

/* ==================== XP TOAST ==================== */
.gamify-xp-toast {
    position: fixed; top: 20px; right: 20px;
    background: var(--g-primary);
    color: #fff; padding: 14px 24px;
    border-radius: var(--g-radius-md);
    font-weight: 700; font-size: var(--g-font-size-md);
    z-index: 100000;
    box-shadow: 0 8px 32px rgba(99,102,241,0.3);
    pointer-events: none;
    opacity: 0; transform: translateX(100%);
    transition: all 0.4s ease-out;
}
.gamify-xp-toast.show { opacity: 1; transform: translateX(0); }
.gamify-xp-toast.positive { background: var(--g-success); box-shadow: 0 8px 32px rgba(34,197,94,0.3); }
.gamify-xp-toast.negative { background: var(--g-danger); box-shadow: 0 8px 32px rgba(239,68,68,0.3); }

/* ==================== UTILITIES ==================== */
.gamify-empty-state { text-align: center; color: var(--g-text-muted); padding: var(--g-space-lg) 0; font-size: var(--g-font-size-sm); }
.gamify-loading { text-align: center; color: var(--g-text-muted); padding: var(--g-space-lg) 0; }
.gamify-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: var(--g-radius-sm);
}
@keyframes skeletonPulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==================== COPY BUTTON ==================== */
.gamify-copy-btn { flex-shrink: 0; white-space: nowrap; }
.gamify-copy-btn.copied { background: var(--g-success); border-color: var(--g-success); }

/* ==================== BORDER GLOW CARD ==================== */
.gamify-tilt-card {
    position: relative;
    transition: transform var(--g-transition-fast), box-shadow var(--g-transition);
    overflow: hidden;
    z-index: 0;
}
.gamify-tilt-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        transparent 0%,
        transparent 30%,
        rgba(99,102,241,0.5) 45%,
        rgba(139,92,246,0.6) 50%,
        rgba(99,102,241,0.5) 55%,
        transparent 70%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--g-transition);
    z-index: -2;
    animation: snakeGlow 3s linear infinite;
}
.gamify-tilt-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: var(--g-card-bg);
    z-index: -1;
}
.gamify-tilt-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 20px rgba(99,102,241,0.12);
}
.gamify-tilt-card:hover::before {
    opacity: 1;
}

@keyframes snakeGlow {
    0%   { --glow-angle: 0deg; }
    100% { --glow-angle: 360deg; }
}
@property --glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ==================== HOLOGRAPHIC SHIMMER ==================== */
.gamify-holographic { position: relative; overflow: hidden; }
.gamify-holographic::after {
    content: ''; position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(99,102,241,0.06) 40%, rgba(99,102,241,0.12) 50%, rgba(99,102,241,0.06) 60%, transparent 70%);
    animation: holoShimmer 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes holoShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* ==================== WRAPPED SHARE PAGE ==================== */
.gamify-wrapped-share-wrap { max-width: 420px; margin: 40px auto; padding: 0 16px; }
.gamify-wrapped-share-page {
    aspect-ratio: 9/16; border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.gamify-wrapped-share-page .gamify-story-slide {
    position: relative; opacity: 1; transform: none; pointer-events: auto;
    min-height: 100%;
}

/* ==================== STREAK FIRE ==================== */
.gamify-streak-fire { display: inline-block; animation: fireFlicker 0.5s ease-in-out infinite alternate; }
@keyframes fireFlicker { 0% { transform: scale(1) rotate(-2deg); } 100% { transform: scale(1.15) rotate(2deg); } }

.gamify-streak-card {
    position: relative;
    overflow: hidden;
}
.gamify-streak-card.streak-active {
    background: linear-gradient(135deg, #fff7ed, #fff1e0) !important;
    border-color: #fed7aa !important;
    box-shadow: 0 0 16px rgba(251, 146, 60, 0.15);
}
.gamify-streak-card.streak-active .gamify-stat-value {
    background: linear-gradient(135deg, #f97316, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gamify-streak-card.streak-active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 50%; transform: translateX(-50%);
    width: 80%;
    height: 8px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.4), transparent);
    border-radius: 50%;
    animation: streakGlow 1.5s ease-in-out infinite;
}
@keyframes streakGlow {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scaleX(0.8); }
    50% { opacity: 0.8; transform: translateX(-50%) scaleX(1.1); }
}

/* Streak dots */
.gamify-streak-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 6px;
}
.gamify-streak-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--g-bg-muted);
    transition: all 0.3s ease;
}
.gamify-streak-dot.active {
    background: #f97316;
    box-shadow: 0 0 4px rgba(249, 115, 22, 0.5);
    animation: dotPop 0.4s ease-out;
}
@keyframes dotPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

/* ==================== CONFETTI ==================== */
.gamify-confetti-piece {
    position: fixed; width: 8px; height: 8px;
    z-index: 100001; pointer-events: none;
    animation: confettiFall var(--confetti-duration, 3s) ease-in forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    30% { transform: translateY(-30px) rotate(180deg) scale(1.1); opacity: 1; }
    100% { transform: translateY(200px) rotate(720deg) scale(0.5); opacity: 0; }
}

/* Badge earned confetti burst */
.gamify-badge-confetti-source {
    position: relative;
}
.gamify-badge-confetti-source::before,
.gamify-badge-confetti-source::after {
    content: '';
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.gamify-badge-confetti-source.confetti-burst::before {
    background: #f59e0b;
    top: -8px; left: 30%;
    animation: confettiParticle 0.8s ease-out forwards;
}
.gamify-badge-confetti-source.confetti-burst::after {
    background: #8b5cf6;
    top: -8px; right: 30%;
    animation: confettiParticle 0.8s 0.1s ease-out forwards;
}
@keyframes confettiParticle {
    0% { transform: translateY(0) translateX(0) scale(0); opacity: 0; }
    30% { opacity: 1; transform: translateY(-20px) translateX(var(--x, 10px)) scale(1); }
    100% { opacity: 0; transform: translateY(30px) translateX(var(--x, 15px)) scale(0.3); }
}

/* ==================== PROGRESS BAR GLOW ==================== */
.gamify-progress-fill.glow-pulse {
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4), 0 0 12px rgba(99, 102, 241, 0.2);
    animation: progressGlow 2s ease-in-out infinite;
}
@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(99, 102, 241, 0.3), 0 0 12px rgba(99, 102, 241, 0.1); }
    50% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.6), 0 0 20px rgba(99, 102, 241, 0.3); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .gamify-dashboard { padding: var(--g-space-md); }
    .gamify-stats-grid { grid-template-columns: repeat(2, 1fr); }

}

@media (max-width: 768px) {
    .gamify-stats-grid {
        display: flex; flex-wrap: wrap; gap: var(--g-space-sm);
    }
    .gamify-bonus-card { order: 1; width: calc(50% - var(--g-space-sm) / 2); }
    .gamify-streak-card { order: 2; width: calc(50% - var(--g-space-sm) / 2); }
    .gamify-bonus-card[style*="display: none"] + .gamify-streak-card,
    .gamify-bonus-card[style*="display:none"] + .gamify-streak-card { width: 100%; }
    .gamify-stat-today { order: 3; }
    .gamify-stat-month { order: 4; }
    .gamify-stat-total { order: 5; }
    .gamify-stat-today,
    .gamify-stat-month,
    .gamify-stat-total { width: calc(33.333% - var(--g-space-sm) * 2 / 3); }
    .gamify-hero-card { flex-direction: column; align-items: center; gap: 12px; padding: var(--g-space-md); text-align: center; }
    .gamify-hero-left { flex-direction: column; align-items: center; }
    .gamify-hero-right { align-self: center; text-align: center; }
    .gamify-hero-xp { font-size: var(--g-font-size-xl); }
    .gamify-progress-wrap { padding: var(--g-space-sm) var(--g-space-md); }
    .gamify-badge-grid { grid-template-columns: 1fr 1fr; }
    .gamify-card-collection { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .gamify-packs-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .gamify-bell-dropdown {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; max-height: 60vh;
        border-radius: var(--g-radius-xl) var(--g-radius-xl) 0 0;
        margin-top: 0; border-bottom: none;
        animation: gamify-bell-slide-up 0.2s ease-out;
    }
    .gamify-bell-handle {
        display: block; width: 36px; height: 4px; border-radius: 2px;
        background: var(--g-card-border); margin: 0 auto;
        padding: 0; cursor: pointer;
        /* Bigger tap area via parent padding */
    }
    .gamify-bell-dropdown > .gamify-bell-handle {
        margin-top: 0; padding: 12px 0;
        background: transparent; height: auto;
    }
    .gamify-bell-dropdown > .gamify-bell-handle::after {
        content: ''; display: block; width: 36px; height: 4px;
        border-radius: 2px; background: var(--g-card-border); margin: 0 auto;
    }
    .gamify-bell-list { max-height: calc(60vh - 70px); }
    .gamify-tabs { gap: 2px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .gamify-tabs::-webkit-scrollbar { display: none; }
    .gamify-tab { padding: 8px 8px; min-width: auto; flex-shrink: 0; }
    .gamify-tab-icon { font-size: 17px; }
    .gamify-tab-label { font-size: 9px; }
    .gamify-stat-card { padding: var(--g-space-sm) var(--g-space-md); }
    .gamify-stat-value { font-size: var(--g-font-size-lg); }
    .gamify-leaderboard-row { padding: 10px var(--g-space-md); }
    .gamify-streak-dots { gap: 3px; }
    .gamify-streak-dot { width: 5px; height: 5px; }
    .gamify-level-path { flex-direction: column; overflow-x: visible; gap: 8px; }
    .gamify-level-node {
        flex: none; min-width: 0; padding: 10px 14px;
        display: flex !important; align-items: center; gap: 10px;
        text-align: left;
    }
    .gamify-level-node.current { transform: none; }
    .gamify-level-node-badge { width: 36px; height: 36px; font-size: 14px; margin: 0; flex-shrink: 0; }
    .gamify-level-node-name { font-size: 13px; font-weight: 600; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gamify-level-node-xp { font-size: 12px; flex-shrink: 0; }
    .gamify-level-node-perks { display: none; }
    .gamify-level-inspect-btn { font-size: 10px; padding: 3px 10px; margin-top: 0; flex-shrink: 0; order: 3; }
    .gamify-level-node-xp { order: 4; }
}

@media (max-width: 600px) {
    .gamify-dashboard { padding: var(--g-space-sm); }
    .gamify-hero-card { flex-direction: column; align-items: center; gap: 12px; padding: var(--g-space-md); text-align: center; }
    .gamify-hero-left { flex-direction: column; align-items: center; }
    .gamify-hero-right { align-self: center; text-align: center; }
    .gamify-hero-xp { font-size: var(--g-font-size-xl); }
    .gamify-stats-grid,
    .gamify-quiz-stats { grid-template-columns: repeat(2, 1fr); }
    .gamify-quiz-list { grid-template-columns: 1fr; }
    .gamify-breakdown-item { grid-template-columns: 80px 1fr 60px; }
    .gamify-level-node { padding: 12px; }
    .gamify-level-node-badge { width: 32px; height: 32px; font-size: 12px; }
    .gamify-tabs { gap: 2px; padding: 4px; }
    .gamify-tab { min-width: auto; padding: 6px 6px; }
    .gamify-tab-label { font-size: 8px; }
    .gamify-leaderboard-row { grid-template-columns: 40px 1fr auto 70px; padding: 10px 12px; }
    .gamify-badge-grid { grid-template-columns: 1fr; }
    .gamify-badge-summary { flex-direction: column; align-items: flex-start; }
    .gamify-badge-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .gamify-card-collection { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .gamify-packs-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .gamify-product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .gamify-campaign-item { flex-direction: column; gap: 8px; text-align: center; }
    .gamify-pack-card-reveal { width: 90px; height: 126px; }
    .gamify-season-rung { flex-wrap: wrap; padding: 10px 14px; }
    .gamify-season-hero-top { flex-direction: column; }
    .gamify-season-countdown { align-self: flex-start; }
    .gamify-season-user-stats { flex-wrap: wrap; gap: var(--g-space-md); }
    .gamify-season-columns { grid-template-columns: 1fr; }
    .gamify-season-prize-content { flex-direction: column; text-align: center; }
    .gamify-surprise-grid { grid-template-columns: 1fr; }
    .gamify-showcase-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .gamify-profile-avatar-section { flex-direction: column; text-align: center; }
    .gamify-referral-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gamify-referral-hero-title { font-size: 18px; }
    .gamify-referral-code-value code { font-size: 16px; padding: 10px 20px; }
    .gamify-referral-link-row { flex-direction: column; }
    .gamify-referral-generator-row { flex-direction: column; }
    .gamify-referral-generate-btn { width: 100%; }
    .gamify-referral-result-row { flex-direction: column; }
    .gamify-set-grid { grid-template-columns: 1fr; }
    .gamify-story-viewer { max-width: 100%; border-radius: 16px; }
    .gamify-story-big-number { font-size: 56px; }
    .gamify-story-title { font-size: 22px; }
    /* Affiliate responsive */
    .gamify-aff-stats { grid-template-columns: repeat(2, 1fr); }
    .gamify-aff-columns { grid-template-columns: 1fr; }
    .gamify-aff-link-row { flex-direction: column; }
    .gamify-aff-convert-form { flex-direction: column; }
    .gamify-aff-orders-header,
    .gamify-aff-orders-row { grid-template-columns: 1.5fr 1fr 1fr; font-size: 12px; }
    .gamify-aff-orders-header span:nth-child(4),
    .gamify-aff-orders-header span:nth-child(5),
    .gamify-aff-orders-row span:nth-child(4),
    .gamify-aff-orders-row span:nth-child(5) { display: none; }
    .gamify-aff-hero-commission { font-size: 24px; }
}

/* ==================== QUIZ PROGRESS BAR ==================== */
.gamify-quiz-progress-wrap {
    display: flex; align-items: center; gap: 12px;
    background: var(--g-card-bg); border: 1px solid var(--g-card-border);
    border-radius: var(--g-radius-md); padding: 10px 16px; margin-bottom: 16px;
}
.gamify-quiz-progress-track {
    flex: 1; height: 8px; background: var(--g-bg-muted); border-radius: 4px; overflow: hidden;
}
.gamify-quiz-progress-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--g-primary), var(--g-accent));
    transition: width 0.4s ease;
}
.gamify-quiz-progress-text { font-size: 13px; font-weight: 600; color: var(--g-text-muted); white-space: nowrap; }

.gamify-quiz-slide-in { animation: quizSlideIn 0.3s ease-out; }
@keyframes quizSlideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.gamify-quiz-card-desc { font-size: 12px; color: var(--g-text-muted); margin: 2px 0 0; }

.gamify-quiz-summary-stats {
    display: flex; justify-content: center; gap: 24px; margin: 20px 0 16px;
}
.gamify-quiz-summary-stat { text-align: center; }
.gamify-quiz-summary-value { display: block; font-size: 24px; font-weight: 700; color: var(--g-primary); }
.gamify-quiz-summary-label { display: block; font-size: 12px; color: var(--g-text-muted); margin-top: 2px; }
.gamify-quiz-summary-msg { font-size: 15px; font-weight: 500; color: var(--g-text); }
.gamify-quiz-summary-bonus { font-size: 14px; color: var(--g-success); font-weight: 600; min-height: 20px; }

/* ==================== RARITY EFFECT SYSTEM ==================== */
/* Effect: shimmer — light sweep (contained within card) */
.gamify-effect-shimmer { position: relative; overflow: hidden; }
.gamify-effect-shimmer::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 40%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.12) 60%, transparent 100%);
    animation: effectShimmer 3s ease-in-out infinite; pointer-events: none; z-index: 1;
}
@keyframes effectShimmer { 0% { left: -100%; } 100% { left: 100%; } }

/* Effect: holographic — rainbow shimmer (contained within card) */
.gamify-effect-holographic { position: relative; overflow: hidden; }
.gamify-effect-holographic::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,0,0,0.08) 15%, rgba(255,165,0,0.1) 25%,
        rgba(255,255,0,0.08) 35%, rgba(0,255,0,0.1) 45%, rgba(0,0,255,0.08) 55%,
        rgba(128,0,255,0.1) 65%, transparent 100%);
    animation: effectHolo 4s ease-in-out infinite; pointer-events: none; z-index: 1;
}
@keyframes effectHolo { 0% { left: -100%; } 100% { left: 100%; } }

/* ==================== INFLUENCER PROFILE SECTIONS ==================== */

.gamify-inf-group-header { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--g-text-muted); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--g-border); }
.gamify-inf-section { padding: 20px; margin-bottom: 16px; }
.gamify-inf-section-title { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--g-text); }
.gamify-inf-hint { font-size: 12px; color: var(--g-text-muted); margin: 4px 0 12px; }

/* Profile card grid: logo + name/bio side by side */
.gamify-inf-profile-card-grid { display: flex; gap: 20px; align-items: flex-start; }
.gamify-inf-profile-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.gamify-inf-logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gamify-inf-logo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--g-border); background: var(--g-bg-secondary); }
.gamify-inf-banner-row { margin-top: 12px; }
.gamify-inf-banner { width: 100%; aspect-ratio: 900 / 280; object-fit: cover; border-radius: var(--g-radius-sm); border: 1px solid var(--g-border); margin: 6px 0; display: block; }

/* Placeholder (empty state for logo/banner) */
.gamify-inf-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 2px dashed var(--g-border); color: var(--g-text-muted); cursor: pointer;
    transition: border-color var(--g-transition), color var(--g-transition);
}
.gamify-inf-placeholder:hover { border-color: var(--g-primary); color: var(--g-primary); }
.gamify-inf-placeholder span { font-size: 11px; font-weight: 600; }
.gamify-inf-placeholder-logo { width: 80px; height: 80px; border-radius: 50%; background: var(--g-bg-subtle); }
.gamify-inf-placeholder-banner { width: 100%; aspect-ratio: 900 / 280; border-radius: var(--g-radius-sm); background: var(--g-bg-subtle); margin: 6px 0; }

/* Social media row with SVG icon */
.gamify-inf-social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gamify-inf-social-row { display: flex; align-items: center; gap: 8px; }
.gamify-inf-social-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; }
.gamify-inf-social-icon svg { width: 20px; height: 20px; fill: currentColor; }

.gamify-inf-code-row { display: flex; gap: 8px; align-items: flex-end; }
.gamify-inf-code-row input { flex: 1; }
.gamify-inf-link-row { font-size: 12px; color: var(--g-text-muted); margin-top: 8px; }
.gamify-inf-link-row a { color: var(--g-primary); text-decoration: none; }

.gamify-inf-rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gamify-inf-rate-bar { margin-top: 8px; }
.gamify-inf-rate-indicator { font-size: 12px; color: var(--g-text-muted); }

.gamify-inf-product-search { position: relative; margin-bottom: 12px; }
.gamify-inf-product-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--g-border); border-radius: var(--g-radius-sm); z-index: 10; max-height: 200px; overflow-y: auto; }
.gamify-inf-product-result { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.gamify-inf-product-result:hover { background: var(--g-bg-secondary); }
.gamify-inf-product-thumb { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }

.gamify-inf-selected-products { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.gamify-inf-product-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--g-bg-secondary); border: 1px solid var(--g-border); border-radius: 20px; padding: 4px 10px; font-size: 12px; transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s; }
.gamify-inf-product-chip button { background: none; border: none; cursor: pointer; color: var(--g-danger); font-size: 14px; padding: 0; line-height: 1; }
.gamify-inf-chip-content { display: inline-flex; align-items: center; gap: 6px; }
.gamify-inf-chip-thumb { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.gamify-inf-drag-handle { cursor: grab; color: var(--g-text-muted); font-size: 14px; user-select: none; opacity: 0.4; transition: opacity 0.15s; line-height: 1; }
.gamify-inf-product-chip:hover .gamify-inf-drag-handle { opacity: 1; }
.gamify-inf-chip-dragging { opacity: 0.35; transform: scale(0.95); }
.gamify-inf-chip-over { box-shadow: -3px 0 0 0 var(--g-primary); border-color: var(--g-primary); }

/* Video row with thumbnail */
.gamify-inf-video-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.gamify-inf-video-row input { flex: 1; }
.gamify-inf-video-row button { background: none; border: none; cursor: pointer; color: var(--g-danger); font-size: 18px; padding: 0; }
.gamify-inf-video-thumb { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; background: var(--g-bg-muted); }
.gamify-inf-video-thumb-placeholder { display: flex; align-items: center; justify-content: center; border: 1px solid var(--g-border); }

/* Affiliate commission card */
.gamify-aff-commission-card { margin-bottom: var(--g-space-lg); }
.gamify-aff-commission-card h4 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }

/* Pool distribution bar */
.gamify-pool-bar {
    display: flex; height: 36px; border-radius: 8px; overflow: hidden; margin-bottom: 16px;
    font-size: 12px; font-weight: 600; color: #fff;
}
.gamify-pool-comm {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex; align-items: center; justify-content: center;
    transition: width .3s ease; min-width: 0;
}
.gamify-pool-disc {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    transition: width .3s ease; min-width: 0;
}
.gamify-pool-comm span, .gamify-pool-disc span {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px;
}

/* Pool slider */
.gamify-pool-slider-wrap { margin-bottom: 12px; }
.gamify-pool-slider {
    -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
    border-radius: 4px; outline: none; margin: 8px 0;
    background: linear-gradient(90deg, #6366f1 0%, #22c55e 100%);
}
.gamify-pool-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
    border-radius: 50%; background: #fff; border: 3px solid var(--g-primary, #6366f1);
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.gamify-pool-slider::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%; background: #fff;
    border: 3px solid var(--g-primary, #6366f1); cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.gamify-inf-profile .gamify-btn-sm { font-size: 12px; padding: 4px 10px; }

@media (max-width: 600px) {
    .gamify-inf-profile-card-grid { flex-direction: column; }
    .gamify-inf-logo-wrap { flex-direction: row; }
    .gamify-inf-social-grid { grid-template-columns: 1fr; }
    .gamify-inf-rate-grid { grid-template-columns: 1fr; }
}

/* Simple Table (Referral Commission) */
.gamify-simple-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--g-font-size-sm);
}
.gamify-simple-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--g-text-muted);
    border-bottom: 2px solid var(--g-card-border);
    font-size: var(--g-font-size-xs);
}
.gamify-simple-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--g-bg-muted);
}
.gamify-simple-table tr:last-child td { border-bottom: none; }
.gamify-simple-table code {
    background: var(--g-bg-muted);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* ==================== BUTTON RADIUS CATCH-ALL ==================== */
.gamify-dashboard button { border-radius: var(--g-radius-sm); }

/* ==================== SHOP ==================== */

/* Wallet Bar */
.gamify-shop-wallet {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; margin-bottom: var(--g-space-lg);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border-radius: var(--g-radius-lg); color: #fff;
    box-shadow: 0 4px 20px rgba(99,102,241,0.25);
}
.gamify-shop-wallet-left { display: flex; align-items: center; gap: 12px; }
.gamify-shop-wallet-icon { font-size: 28px; line-height: 1; }
.gamify-shop-wallet-info { display: flex; flex-direction: column; }
.gamify-shop-wallet-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; font-weight: 600; }
.gamify-shop-wallet-xp { font-size: 22px; font-weight: 800; line-height: 1.2; }
.gamify-shop-wallet-right { display: flex; align-items: center; }
.gamify-shop-wallet-coupon-count {
    font-size: 13px; font-weight: 600; padding: 6px 14px;
    background: rgba(255,255,255,0.18); border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* Coupons Section */
.gamify-shop-coupons {
    margin-bottom: var(--g-space-lg); padding: var(--g-space-lg);
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border); border-radius: var(--g-radius-lg);
}
.gamify-shop-coupons-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gamify-shop-section-title { font-size: var(--g-font-size-lg); font-weight: 700; margin: 0; color: var(--g-text); }
.gamify-shop-coupon-stats { font-size: var(--g-font-size-xs); color: var(--g-text-muted); font-weight: 500; }
.gamify-shop-coupon-list { display: flex; flex-direction: column; gap: 8px; }
.gamify-shop-coupon-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 16px; background: var(--g-bg); border-radius: var(--g-radius-md);
    border: 1px solid var(--g-border); transition: all 0.2s;
}
.gamify-shop-coupon-item:hover { border-color: rgba(99,102,241,0.3); box-shadow: 0 2px 12px rgba(99,102,241,0.06); }
.gamify-shop-coupon-item.is-used { opacity: 0.5; }
.gamify-shop-coupon-item.gamify-shop-coupon-hidden { display: none; }
.gamify-shop-coupon-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.gamify-shop-coupon-icon-wrap {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
}
.gamify-shop-coupon-icon-wrap.is-used { background: var(--g-bg-muted); color: var(--g-text-muted); }
.gamify-shop-coupon-details { min-width: 0; }
.gamify-shop-coupon-top-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gamify-shop-coupon-name { font-weight: 600; color: var(--g-text); font-size: var(--g-font-size-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.gamify-shop-coupon-disc {
    font-size: 11px; color: #8b5cf6; font-weight: 700;
    background: rgba(139,92,246,0.08); padding: 2px 8px; border-radius: 4px;
}
.gamify-shop-coupon-bottom-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.gamify-shop-coupon-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: 10px;
}
.gamify-shop-coupon-badge.is-active { background: rgba(16,185,129,0.1); color: #059669; }
.gamify-shop-coupon-badge.is-used { background: rgba(107,114,128,0.1); color: #9ca3af; }
.gamify-shop-coupon-date { font-size: 11px; color: var(--g-text-muted); }
.gamify-shop-coupon-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gamify-shop-coupon-code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px; font-weight: 700; letter-spacing: 1px;
    background: var(--g-bg-muted); color: var(--g-text); padding: 6px 14px;
    border-radius: 8px; border: 1px dashed var(--g-primary);
    user-select: all; transition: all 0.15s;
}
.gamify-shop-coupon-code:hover { border-color: #8b5cf6; background: rgba(139,92,246,0.04); }
.gamify-shop-coupon-code.is-used {
    border-color: var(--g-border); border-style: solid;
    color: var(--g-text-muted); text-decoration: line-through; opacity: 0.7;
}
.gamify-shop-coupon-copy {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: var(--g-bg-muted); border: 1px solid var(--g-border); border-radius: 8px;
    cursor: pointer; font-size: 14px; color: var(--g-text-muted); transition: all 0.15s;
}
.gamify-shop-coupon-copy:hover { background: var(--g-primary); color: #fff; border-color: var(--g-primary); }
.gamify-shop-coupon-toggle {
    display: block; width: 100%; margin-top: 10px;
    padding: 10px; background: var(--g-bg); border: 1px dashed var(--g-border);
    border-radius: var(--g-radius-md); color: var(--g-primary); font-family: var(--g-font);
    font-size: var(--g-font-size-sm); font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.gamify-shop-coupon-toggle:hover { background: rgba(99,102,241,0.04); border-color: var(--g-primary); }

/* Shop Grid */
.gamify-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.gamify-shop-card {
    background: var(--g-card-bg);
    border: 1px solid var(--g-card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    position: relative;
}
.gamify-shop-card:hover {
    border-color: rgba(99,102,241,0.25);
    box-shadow: 0 8px 30px rgba(99,102,241,0.12), 0 2px 8px rgba(0,0,0,0.04);
    transform: translateY(-4px);
}
.gamify-shop-card.is-soldout { opacity: 0.45; pointer-events: none; filter: grayscale(0.3); }

/* Card Header / Visual */
.gamify-shop-card-header {
    position: relative; width: 100%; height: 160px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 8%, transparent), color-mix(in srgb, var(--accent) 15%, transparent));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.gamify-shop-card-header::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
    pointer-events: none;
}
.gamify-shop-card-img {
    width: 100%; height: 100%; object-fit: contain;
    padding: 16px; position: relative; z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}
.gamify-shop-card-emoji {
    font-size: 56px; line-height: 1; position: relative; z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}
.gamify-shop-card-type {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 4px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.9); color: var(--accent);
    backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.gamify-shop-card-soldout {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 4px 10px; border-radius: 8px;
    background: rgba(239,68,68,0.9); color: #fff;
    box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}

/* Card Body */
.gamify-shop-card-body {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; flex: 1;
}
.gamify-shop-card-name {
    font-size: 15px; font-weight: 700; color: var(--g-text);
    margin: 0 0 4px; line-height: 1.3;
}
.gamify-shop-card-desc {
    font-size: 13px; color: var(--g-text-secondary);
    margin: 0 0 14px; line-height: 1.45; flex: 1;
}

/* Price Area */
.gamify-shop-card-price-area {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 10px; padding-top: 10px;
    border-top: 1px solid var(--g-border);
}
.gamify-shop-card-price { display: flex; align-items: baseline; gap: 4px; }
.gamify-shop-card-price-val { font-size: 22px; font-weight: 800; color: var(--g-primary); line-height: 1; }
.gamify-shop-card-price-unit { font-size: 12px; font-weight: 700; color: var(--g-primary); opacity: 0.7; }
.gamify-shop-card-price.is-expensive .gamify-shop-card-price-val { color: var(--g-text-muted); }
.gamify-shop-card-price.is-expensive .gamify-shop-card-price-unit { color: var(--g-text-muted); }
.gamify-shop-card-stock { font-size: 11px; color: var(--g-text-muted); font-weight: 500; }

/* Limit Progress Bar */
.gamify-shop-card-limit {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px; font-size: 11px; color: var(--g-text-muted); font-weight: 500;
}
.gamify-shop-card-limit-bar {
    flex: 1; height: 4px; background: var(--g-bg-muted); border-radius: 2px; overflow: hidden;
}
.gamify-shop-card-limit-fill {
    height: 100%; background: var(--g-primary); border-radius: 2px;
    transition: width 0.3s;
}

/* Buy Button */
.gamify-shop-card-btn {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, var(--g-primary), #8b5cf6);
    color: #fff; border: none; border-radius: 12px;
    font-family: var(--g-font); font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
}
.gamify-shop-card-btn:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
    transform: scale(1.02);
}
.gamify-shop-card-btn.is-disabled {
    background: var(--g-bg-muted); color: var(--g-text-muted);
    cursor: not-allowed; box-shadow: none; transform: none;
}

/* ---- Shop Sub-tabs ---- */
.gamify-shop-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--g-bg-muted);
    padding: 4px;
    border-radius: var(--g-radius-md);
}
.gamify-shop-subtab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--g-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--g-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.gamify-shop-subtab.is-active {
    background: #fff;
    color: var(--g-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.gamify-shop-subtab:hover:not(.is-active) {
    color: var(--g-text);
}

/* ---- Inventory Sections ---- */
/* Active Bonuses (stat card) */
.gamify-bonus-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border-color: #fde68a !important;
}
.gamify-bonus-tags {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}
.gamify-bonus-tag {
    font-size: 11px;
    color: #92400e;
    white-space: nowrap;
}

.gamify-multiplier-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    margin-bottom: 16px;
}
.gamify-multiplier-banner-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,158,11,.15);
    border-radius: 10px;
    flex-shrink: 0;
}
.gamify-multiplier-banner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gamify-multiplier-banner-info strong {
    font-size: 15px;
    color: #92400e;
}
.gamify-multiplier-banner-info span {
    font-size: 13px;
    color: #b45309;
}
.gamify-inv-section {
    margin-bottom: 24px;
}
.gamify-inv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gamify-inv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-md);
}
.gamify-inv-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
}
.gamify-inv-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gamify-inv-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--g-text);
}
.gamify-inv-item-meta {
    font-size: 12px;
    color: var(--g-text-muted);
}
.gamify-inv-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--g-primary);
    white-space: nowrap;
}

/* ---- Frame Picker ---- */
.gamify-inv-frame-hint {
    font-size: 13px;
    color: var(--g-text-muted);
    margin: -4px 0 12px;
}
.gamify-inv-frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.gamify-inv-frame-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #fff;
    border: 2px solid var(--g-border);
    border-radius: var(--g-radius-md);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
}
.gamify-inv-frame-item:hover:not(.is-locked) {
    border-color: var(--g-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.15);
}
.gamify-inv-frame-item.is-selected {
    border-color: var(--g-primary);
    background: #f5f3ff;
}
.gamify-inv-frame-item.is-locked {
    cursor: not-allowed;
    opacity: 0.6;
}
.gamify-inv-frame-preview {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.gamify-inv-frame-preview.gamify-inv-frame-none {
    background: var(--g-bg-muted);
    border-radius: 50%;
    font-size: 24px;
    color: var(--g-text-muted);
}
.gamify-inv-frame-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.gamify-inv-frame-img.is-locked {
    filter: grayscale(1) opacity(0.5);
}
.gamify-inv-frame-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 2;
}
.gamify-inv-frame-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--g-text);
    line-height: 1.2;
}
.gamify-inv-frame-sub {
    font-size: 11px;
    color: var(--g-text-muted);
}
.gamify-inv-frame-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--g-primary);
    padding: 2px 8px;
    border-radius: 99px;
    margin-top: 2px;
}

/* ==================== PACK CARD BACK ==================== */
.gamify-pack-card-back-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--g-radius-md);
}

/* ==================== PACK OVERLAY FIX ==================== */
.gamify-pack-overlay-cards {
    max-height: 65vh;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--g-space-md);
    padding: var(--g-space-md);
}

/* ==================== MODAL CENTERED FIX ==================== */
.gamify-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.gamify-modal-inner {
    background: var(--g-card-bg);
    border-radius: var(--g-radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: var(--g-space-xl);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.gamify-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--g-text-muted);
    line-height: 1;
}
.gamify-modal-close:hover { color: var(--g-text); }

/* ==================== CARD DETAIL MODAL ==================== */
.gamify-card-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}
.gamify-card-detail-inner {
    background: var(--g-card-bg);
    border-radius: var(--g-radius-xl);
    max-width: 360px;
    width: 90%;
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.gamify-card-detail-inner > .gamify-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--g-text-muted);
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}
.gamify-card-detail-inner > .gamify-modal-close:hover {
    background: rgba(0,0,0,0.06);
    color: var(--g-text);
}
.gamify-card-detail-modal .gamify-card-detail-img-wrap {
    position: relative;
    overflow: hidden;
    display: inline-block;
    border-radius: var(--g-radius-lg);
    margin-bottom: var(--g-space-md);
    line-height: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.gamify-card-detail-modal .gamify-card-detail-img {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--g-radius-md);
    display: block;
    margin: 0;
    border: none;
}
.gamify-card-detail-modal .gamify-card-detail-name {
    font-size: var(--g-font-size-xl);
    font-weight: 700;
    color: var(--g-text);
    margin-bottom: var(--g-space-xs);
}
.gamify-card-detail-modal .gamify-card-detail-rarity {
    font-size: var(--g-font-size-sm);
    font-weight: 600;
    margin-bottom: var(--g-space-sm);
}
.gamify-card-detail-modal .gamify-card-detail-desc {
    font-size: var(--g-font-size-sm);
    color: var(--g-text-secondary);
    margin-bottom: var(--g-space-md);
}
.gamify-card-detail-modal .gamify-card-detail-set {
    font-size: var(--g-font-size-xs);
    color: var(--g-text-muted);
}
@media (max-width: 768px) {
    .gamify-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .gamify-shop-coupon-item { flex-direction: column; align-items: stretch; gap: 8px; }
    .gamify-shop-coupon-right { justify-content: flex-start; }
    .gamify-shop-wallet { flex-direction: column; gap: 10px; align-items: flex-start; }
    .gamify-shop-card-header { height: 130px; }
    .gamify-inv-frames-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .gamify-shop-grid { grid-template-columns: 1fr; }
    .gamify-bell-dropdown {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; max-height: 70vh;
        border-radius: var(--g-radius-xl) var(--g-radius-xl) 0 0;
        margin-top: 0; border-bottom: none;
        animation: gamify-bell-slide-up 0.2s ease-out;
    }
    .gamify-bell-list { max-height: calc(70vh - 56px); }
    @keyframes gamify-bell-slide-up {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
    }
    .gamify-shop-coupons-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .gamify-shop-wallet-xp { font-size: 18px; }
    .gamify-inv-frames-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ==================== BUG REPORT ==================== */
.gamify-bug-footer {
    text-align: center;
    padding: 24px 16px 8px;
    margin-top: 12px;
    border-top: 1px solid var(--g-card-border);
}
.gamify-bug-footer-text {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 10px;
    line-height: 1.5;
}
.gamify-bug-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}
.gamify-bug-footer-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.gamify-bug-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.gamify-bug-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    animation: gamifyBugSlideUp .25s ease;
}
@keyframes gamifyBugSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.gamify-bug-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}
.gamify-bug-close:hover { color: #475569; }
.gamify-bug-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.gamify-bug-header-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 12px;
}
.gamify-bug-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.gamify-bug-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}
.gamify-bug-field {
    margin-bottom: 16px;
}
.gamify-bug-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.gamify-bug-field select,
.gamify-bug-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .15s;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.gamify-bug-field select:focus,
.gamify-bug-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.gamify-bug-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}
.gamify-bug-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.gamify-bug-submit:hover { opacity: .9; }
.gamify-bug-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.gamify-bug-success {
    text-align: center;
    padding: 20px 0;
}
.gamify-bug-success span {
    display: block;
    font-size: 40px;
    color: #22c55e;
    margin-bottom: 8px;
}
.gamify-bug-success p {
    font-size: 15px;
    color: #1e293b;
    font-weight: 600;
    margin: 0;
}

