/* =====================================================
   GAMIFICATION CSS — Dark theme matching 11SC palette
   Background: #4B4B4B | Text: #fff | Accent: #E9B753
   ===================================================== */

/* ── Header Integration ── */
#join { position: relative; }
#username_field .rank-badges { margin-left: 6px; }
.rank-badge-sm .rank-badge { font-size: 11px; padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,0.12); color: #ccc; border-color: rgba(255,255,255,0.2); }
.rank-badge-sm .rank-icon { font-size: 13px; }
.rank-badge-sm .rank-num { font-size: 10px; }

/* ── Rank Badges ── */
.rank-badges { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.rank-badge { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; cursor: default; }
.rank-artist { background: rgba(233,183,83,0.15); color: #E9B753; border: 1px solid rgba(233,183,83,0.4); }
.rank-critic { background: rgba(100,160,220,0.15); color: #7cb5ec; border: 1px solid rgba(100,160,220,0.4); }
.rank-icon { font-size: 13px; }
.rank-badge-lg .rank-badge { padding: 4px 10px; font-size: 14px; }
.rank-badge-lg .rank-icon { font-size: 18px; }

/* ── XP Progress Bar ── */
.xp-bar-wrap { margin: 6px 0; }
.xp-bar-label { font-size: 13px; margin-bottom: 3px; color: #ddd; }
.xp-bar-type { color: #bbb; }
.xp-bar-rank { color: #999; font-size: 11px; }
.xp-bar-track { background: #3a3a3a; border-radius: 4px; height: 8px; overflow: hidden; border: 1px solid #555; }
.xp-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.xp-bar-fill-artist { background: linear-gradient(90deg, #E9B753, #d4a017); }
.xp-bar-fill-critic { background: linear-gradient(90deg, #7cb5ec, #4a90d9); }
.xp-bar-detail { font-size: 11px; color: #aaa; margin-top: 2px; }

/* ── Notification Bell ── */
.notif-bell { position: relative; cursor: pointer; font-size: 18px; vertical-align: middle; margin-left: 10px; }
.notif-badge { position: absolute; top: -6px; right: -8px; background: #C20000; color: #fff; font-size: 10px; font-weight: bold; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; }
.notif-dropdown { position: absolute; right: 0; top: 28px; width: 380px; max-height: 400px; overflow-x: hidden; overflow-y: auto; background: #3a3a3a; border: 1px solid #555; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 9999; color: #eee; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #555; font-size: 13px; color: #ddd; }
.notif-header a { color: #E9B753; text-decoration: none; font-size: 12px; }
.notif-list { padding: 0; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid #444; font-size: 13px; line-height: 1.4; color: #ccc; word-wrap: break-word; overflow-wrap: break-word; }
.notif-unread { background: rgba(233,183,83,0.08); }
.notif-xp { color: #5cb85c; font-weight: bold; }
.notif-empty { padding: 20px; text-align: center; color: #888; font-size: 13px; }
.notif-loading { padding: 20px; text-align: center; color: #888; }

/* ── Achievement Toast ── */
.achievement-toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.achievement-toast { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #2a2a2a; color: #fff; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); transform: translateX(120%); transition: transform 0.4s ease; cursor: pointer; min-width: 280px; border-left: 4px solid #E9B753; }
.achievement-toast-show { transform: translateX(0); }
.achievement-toast-hide { transform: translateX(120%); }
.achievement-toast-rare { border-left-color: #f1c40f; box-shadow: 0 4px 20px rgba(241,196,15,0.3); }
.achievement-toast-icon { font-size: 28px; }
.achievement-toast-body { flex: 1; }
.achievement-toast-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #E9B753; margin-bottom: 2px; }
.achievement-toast-name { font-size: 16px; font-weight: bold; }
.achievement-toast-xp { font-size: 13px; color: #5cb85c; margin-top: 2px; }

/* ── Profile Gamification Section ── */
.gamification-section { margin: 20px 0; clear: both; }
.gamification-section h4 { margin: 16px 0 8px; color: #E9B753; border-bottom: 1px solid #666; padding-bottom: 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.gamification-section h5 { margin: 12px 0 6px; color: #bbb; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Rank Cards */
.rank-cards { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.rank-card { flex: 1; min-width: 200px; padding: 16px; border-radius: 8px; }
.rank-card-artist { background: rgba(233,183,83,0.1); border: 1px solid rgba(233,183,83,0.3); }
.rank-card-critic { background: rgba(100,160,220,0.1); border: 1px solid rgba(100,160,220,0.3); }
.rank-card-icon { font-size: 32px; margin-bottom: 4px; }
.rank-card-name { font-size: 18px; font-weight: bold; margin-bottom: 2px; color: #fff; }
.rank-card-level { font-size: 12px; color: #aaa; margin-bottom: 8px; }

/* Showcase */
.showcase-slots { display: flex; gap: 10px; }
.showcase-slot { width: 60px; height: 60px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; text-align: center; color: #ddd; }
.showcase-filled { background: #3a3a3a; border: 2px solid #E9B753; }
.showcase-empty { background: #3a3a3a; border: 2px dashed #666; }
.showcase-add { font-size: 24px; color: #666; cursor: pointer; }
.showcase-add:hover { color: #999; }

/* Achievement Grid */
.achievement-grid { margin: 10px 0; }
.achievement-category { margin-bottom: 16px; }
.achievement-items { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-item { position: relative; width: 120px; min-height: 90px; padding: 8px; border-radius: 6px; text-align: center; font-size: 11px; cursor: default; transition: transform 0.2s; display: flex; flex-direction: column; }
.achievement-item:hover { transform: scale(1.05); z-index: 10; }
.achievement-item[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 12px; font-weight: normal; line-height: 1.4; white-space: normal; width: max-content; max-width: 220px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.5); z-index: 100; pointer-events: none; border: 1px solid #444; }
.achievement-item[data-tip]:hover::before { content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1a1a1a; z-index: 100; pointer-events: none; }
.achievement-earned { background: rgba(233,183,83,0.15); border: 1px solid #E9B753; color: #fff; }
.achievement-locked { background: #3a3a3a; border: 1px solid #555; color: #777; opacity: 0.6; }
.achievement-icon { font-size: 13px; font-weight: bold; margin-bottom: 4px; word-wrap: break-word; overflow-wrap: break-word; line-height: 1.25; flex: 1; display: flex; align-items: center; justify-content: center; }
.achievement-date { font-size: 10px; color: #E9B753; margin-top: auto; }
.achievement-progress { margin: 12px 0; }
.achievement-progress h4 { color: #fff; }

/* Streak */
.streak-section { margin: 16px 0; }
.streak-display { font-size: 14px; color: #ddd; }
.streak-display div { margin: 4px 0; }
.streak-display strong { color: #E9B753; }

/* Vote Progress */
.vote-progress { margin: 10px 0; padding: 12px; background: #3a3a3a; border-radius: 8px; border: 1px solid #555; color: #ddd; }
.vote-progress-text { font-size: 14px; margin-bottom: 6px; color: #eee; }
.vote-progress-text strong { color: #E9B753; }
.vote-progress-target { font-size: 13px; color: #7cb5ec; margin-top: 4px; }
.vote-progress-xp { font-size: 12px; color: #5cb85c; margin-top: 2px; }
