/* ══════════════════════════════════════════════════════════
   Retro Arcade Blast – Desktop Sidebar
   Playful, colorful, bouncy retro arcade vibes
   ══════════════════════════════════════════════════════════ */

.rab-layout-wrapper {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}
.rab-layout-wrapper > main,
.rab-layout-wrapper > .main-content { flex: 1; min-width: 0; }

.kz-sidebar.rab-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 78px;
    max-height: calc(100vh - 94px);
    overflow-y: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #240046) transparent;
}
.kz-sidebar.rab-sidebar::-webkit-scrollbar { width: 5px; }
.kz-sidebar.rab-sidebar::-webkit-scrollbar-thumb { background: var(--color-primary, #ff6b35); border-radius: 5px; }

.rab-sidebar .sidebar-widget {
    background: #fff;
    border: 4px solid var(--border-color, #240046);
    border-radius: var(--border-radius, 16px);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 4px 4px 0 var(--border-color, #240046);
}
.rab-sidebar .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 800;
    font-family: var(--font-heading, 'Fredoka One', cursive);
    color: var(--text-primary, #240046);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 3px dashed var(--color-secondary, #ffd23f);
}
.rab-sidebar .widget-title i { color: var(--color-primary, #ff6b35); font-size: .9rem; }
.rab-sidebar .widget-empty {
    font-size: .82rem;
    color: var(--text-muted, #8b5cf6);
    text-align: center;
    padding: 12px 0;
}

.rab-sidebar .widget-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary, #240046);
    transition: all .2s;
}
.rab-sidebar .widget-item:hover { background: var(--color-secondary, #ffd23f); transform: translateX(4px); }
.rab-sidebar .widget-item img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; border: 3px solid var(--border-color, #240046); }
.rab-sidebar .widget-item-title { font-size: .85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rab-sidebar .widget-item-meta { font-size: .72rem; color: var(--text-muted, #8b5cf6); }

.rab-sidebar .random-game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--color-primary, #ff6b35);
    color: #fff;
    border: 4px solid var(--border-color, #240046);
    border-radius: var(--border-radius, 16px);
    font-size: .95rem;
    font-weight: 800;
    font-family: var(--font-heading, 'Fredoka One', cursive);
    text-decoration: none;
    transition: all .2s;
    box-shadow: 4px 4px 0 var(--border-color, #240046);
}
.rab-sidebar .random-game-btn:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 var(--border-color, #240046); }

.rab-sidebar .sidebar-ad-slot { margin-top: 14px; border-radius: 16px; overflow: hidden; min-height: 250px; }

.rab-sidebar .challenge-item,
.rab-sidebar .achievement-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; margin-bottom: 8px; background: #fef9f0; border: 3px solid var(--border-color, #240046); transition: background .15s; }
.rab-sidebar .challenge-item:hover { background: #fff3e0; }
.rab-sidebar .challenge-item.dc-done { border-color: #10b981; background: #f0fdf4; }
.rab-sidebar .challenge-item.dc-claimed { opacity: .55; }
.rab-sidebar .dc-countdown { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-muted, #8b5cf6); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 3px dashed var(--color-secondary, #ffd23f); }
.rab-sidebar .dc-countdown i { color: var(--color-primary, #ff6b35); }
.rab-sidebar .dc-header { display: flex; align-items: flex-start; gap: 10px; }
.rab-sidebar .dc-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--color-secondary, #ffd23f); border: 3px solid var(--border-color, #240046); color: var(--border-color, #240046); font-size: 1.05rem; flex-shrink: 0; }
.rab-sidebar .dc-info { flex: 1; min-width: 0; }
.rab-sidebar .dc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rab-sidebar .dc-title { font-size: .85rem; font-weight: 800; font-family: var(--font-heading, 'Fredoka One', cursive); color: var(--text-primary, #240046); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rab-sidebar .dc-xp { font-size: .78rem; font-weight: 800; color: var(--color-primary, #ff6b35); white-space: nowrap; flex-shrink: 0; }
.rab-sidebar .dc-desc { font-size: .78rem; color: var(--text-muted, #8b5cf6); margin: 2px 0 0; }
.rab-sidebar .challenge-progress { height: 6px; background: #f3e8ff; border-radius: 3px; margin-top: 4px; overflow: hidden; border: 2px solid var(--border-color, #240046); }
.rab-sidebar .challenge-progress-bar { height: 100%; background: linear-gradient(90deg, #ff6b35, #ffd23f); border-radius: 3px; transition: width .3s; }
.rab-sidebar .dc-footer { margin-top: 2px; }
.rab-sidebar .dc-counter { font-size: .75rem; font-weight: 700; color: var(--text-muted, #8b5cf6); }
.rab-sidebar .dc-status { font-size: .75rem; font-weight: 700; }
.rab-sidebar .dc-status-pending { color: var(--text-muted, #8b5cf6); }
.rab-sidebar .dc-status-claimed { color: #10b981; }
.rab-sidebar .dc-status-claimed i { margin-right: 2px; }
.rab-sidebar .dc-claim-btn { padding: 4px 12px; font-size: .75rem; font-weight: 800; background: var(--color-primary, #ff6b35); color: #fff; border: 3px solid var(--border-color, #240046); border-radius: 10px; cursor: pointer; font-family: var(--font-heading, 'Fredoka One', cursive); transition: transform .15s; box-shadow: 2px 2px 0 var(--border-color, #240046); }
.rab-sidebar .dc-claim-btn:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--border-color, #240046); }
.rab-sidebar .dc-claim-btn i { margin-right: 3px; }

.rab-sidebar .friend-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text-primary, #240046); transition: all .2s; }
.rab-sidebar .friend-item:hover { background: var(--color-secondary, #ffd23f); transform: translateX(4px); }
.rab-sidebar .friend-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-color, #240046); }
.rab-sidebar .friend-status { width: 10px; height: 10px; background: #10b981; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff; }

@media (max-width: 1200px) {
    .kz-sidebar.rab-sidebar { display: none; }
    .rab-layout-wrapper { padding: 0 16px; }
}





/* ── Shared Sidebar Widget Styles (sidebar.js classes) ── */

/* Game Items (Recently Played / Favorites list) */
.sidebar-game-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.sidebar-game-item:hover { background: rgba(128,128,128,.08); }

.sidebar-game-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-game-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-game-title {
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-game-cat {
    font-size: .72rem;
    opacity: .6;
}

/* Achievements */
.sidebar-ach-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(128,128,128,.04);
    border: 1px solid rgba(128,128,128,.08);
    transition: all .15s;
    opacity: .55;
}
.sidebar-ach-item:last-of-type { margin-bottom: 8px; }
.sidebar-ach-item:hover {
    background: rgba(128,128,128,.08);
    border-color: rgba(128,128,128,.15);
}
.sidebar-ach-item.unlocked {
    opacity: 1;
    border-color: rgba(37,99,235,.2);
    background: rgba(37,99,235,.04);
}

.sidebar-ach-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(128,128,128,.08);
    border-radius: 8px;
    flex-shrink: 0;
}
.sidebar-ach-item.unlocked .sidebar-ach-icon {
    background: rgba(37,99,235,.1);
}

.sidebar-ach-info {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.sidebar-ach-name {
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-ach-xp {
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    padding: 2px 7px;
    border-radius: 6px;
}

.sidebar-link-all {
    display: block;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    padding: 8px 0 0;
    transition: color .15s;
}
.sidebar-link-all:hover { opacity: .7; }

/* Friends */
.sidebar-friend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.sidebar-friend:hover { background: rgba(128,128,128,.08); }

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    flex-shrink: 0;
}

.friend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.friend-name {
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: .68rem;
    opacity: .6;
}


/* ── Favorites Grid (2 per row, equal size) ── */
.sidebar-fav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 4px 0;
}

.sidebar-fav-item {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: all .15s;
    background: rgba(0,212,255,.03);
    border: 1px solid rgba(0,212,255,.06);
}

.sidebar-fav-item:hover {
    border-color: rgba(0,212,255,.15);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,212,255,.1);
}

.sidebar-fav-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
}

.sidebar-fav-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-fav-title {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: inherit;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 6px 8px;
}
