/* Drop the Wax — Shared Panel Styles */

/* ==========================================
   TOAST NOTIFICATIONS
========================================== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: linear-gradient(135deg, #2a1f10, #3d2e18);
    color: #faf0dc;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,160,74,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s;
}

[data-theme="dark"] .toast {
    background: linear-gradient(135deg, #3d3020, #4d3e28);
    color: #f5ead6;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,160,74,0.2);
}

.toast.success { border-left: 4px solid var(--forest); }
.toast.info { border-left: 4px solid var(--gold); }
.toast.alert { border-left: 4px solid var(--rust); }

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.75rem;
    opacity: 0.8;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 5px;
}

.toast-close:hover { opacity: 1; }

.toast.removing {
    animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==========================================
   SIDEBAR PANELS (Wishlist / Collection)
========================================== */
.sidebar-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--cream);
    z-index: 4000;
    box-shadow: -10px 0 50px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--terracotta);
    overscroll-behavior: contain;
}

.sidebar-panel.active {
    right: 0;
}

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--cream-dark);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brown);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--tan);
}

.sidebar-empty svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.sidebar-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--cream-dark);
    border-radius: 8px;
    margin-bottom: 10px;
}

.sidebar-item-image {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.3);
}

.sidebar-item-info {
    flex: 1;
}

.sidebar-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.sidebar-item-info p {
    font-size: 0.75rem;
    color: var(--tan);
}

.sidebar-item-info .price {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rust);
    margin-top: 5px;
}

.sidebar-item-info .price-alert {
    font-size: 0.65rem;
    color: var(--forest);
    margin-top: 3px;
}

.sidebar-item-remove {
    background: none;
    border: none;
    color: var(--tan);
    cursor: pointer;
    padding: 5px;
}

.sidebar-item-remove:hover {
    color: var(--rust);
}

.sidebar-item-source {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}
.sidebar-item-source.store {
    background: var(--forest);
    color: white;
}
.sidebar-item-source.personal {
    background: var(--gold);
    color: var(--brown);
}

/* ==========================================
   SEARCH OVERLAY
========================================== */
.search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.search-overlay.active { display: flex; }
.search-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--tan);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}
.search-close-btn:hover {
    background: rgba(0,0,0,0.08);
    color: var(--brown);
}
[data-theme="dark"] .search-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #faf0dc;
}
.search-box {
    position: relative;
    background: var(--warm-white);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.3), 0 0 0 1px rgba(212,160,74,0.1);
}
[data-theme="dark"] .search-box { background: var(--cream-dark); }
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--cream-dark);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.search-input-wrap svg { color: var(--tan); flex-shrink: 0; }
.search-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1.2rem;
    font-family: 'Nunito', sans-serif;
    color: var(--brown);
    outline: none;
}
.search-input::placeholder { color: var(--tan); }
.search-results {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.search-result-item:hover { background: var(--cream-dark); }
.search-result-art {
    width: 50px; height: 50px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.search-result-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.search-result-info p {
    font-size: 0.75rem;
    color: var(--tan);
}
.search-empty {
    text-align: center;
    padding: 30px;
    color: var(--tan);
    font-size: 0.9rem;
}
.search-section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    padding: 12px 12px 4px;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 4px;
}
.search-section-label:first-child { border-top: none; margin-top: 0; }
.search-external-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    opacity: 0.85;
}
.search-external-item:hover { background: var(--cream-dark); opacity: 1; }
.search-external-art {
    width: 50px; height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--cream-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.search-external-art img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.search-external-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.search-external-info p {
    font-size: 0.75rem;
    color: var(--tan);
}
.search-external-badge {
    font-size: 0.6rem;
    background: var(--rust);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Space Mono', monospace;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.search-loading-ext {
    text-align: center;
    padding: 15px;
    color: var(--tan);
    font-size: 0.8rem;
}
.search-loading-ext::after {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--tan);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: searchSpin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes searchSpin { to { transform: rotate(360deg); } }
[data-theme="dark"] .search-section-label { border-top-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .search-external-item:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .search-result-item:hover { background: rgba(255,255,255,0.05); }

/* ==========================================
   PROFILE PIC SECTION
========================================== */
.profile-pic-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 25px 5px;
}
.profile-pic-current {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s;
}
.profile-pic-current:hover {
    border-color: var(--terracotta);
    transform: scale(1.05);
}
.profile-pic-edit-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    cursor: pointer;
    transition: color 0.2s;
}
.profile-pic-edit-label:hover { color: var(--rust); }

/* ==========================================
   PFP PICKER MODAL
========================================== */
.pfp-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.pfp-picker-overlay.open { display: flex; }
.pfp-picker {
    background: var(--cream);
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}
[data-theme="dark"] .pfp-picker { background: #1e1a15; }
.pfp-picker-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--brown);
    transition: color 0.2s;
}
.pfp-picker-close:hover { color: var(--rust); }
.pfp-picker h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--brown);
}
.pfp-picker p {
    font-size: 0.75rem;
    color: var(--brown-light);
    margin-bottom: 18px;
}
.pfp-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.pfp-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cream-dark);
    cursor: pointer;
    transition: all 0.25s;
}
.pfp-option:hover {
    border-color: var(--terracotta);
    transform: scale(1.1);
}
.pfp-option.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 74, 0.3);
}
.pfp-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--cream-dark);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--brown-light);
    transition: all 0.2s;
}
.pfp-upload-btn:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
}
[data-theme="dark"] .pfp-upload-btn { border-color: #3d3020; color: #c4b8a4; }
[data-theme="dark"] .pfp-upload-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ==========================================
   GAMER PANEL
========================================== */
.gamer-panel-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.gamer-panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.gamer-panel {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: var(--cream);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}
body.panel-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100vh !important;
    touch-action: none;
}
[data-theme="dark"] .gamer-panel { background: #1a1a1a; }
.gamer-panel.open { transform: translateX(0); }
.gamer-panel-header {
    padding: 25px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gamer-panel-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
}
.gamer-panel-close {
    background: none;
    border: none;
    color: var(--brown);
    font-size: 1.5rem;
    cursor: pointer;
}

.gamer-level-section {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--cream-dark);
}
.gamer-level-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}
.gamer-level-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 5px;
}
.gamer-level-subtitle {
    font-size: 0.75rem;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}
.xp-bar-container {
    background: var(--cream-dark);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}
[data-theme="dark"] .xp-bar-container { background: #333; }
.xp-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--terracotta), var(--mustard));
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.xp-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: xpShimmer 2s infinite;
}
@keyframes xpShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.xp-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--tan);
}

.gamer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--cream-dark);
    border-bottom: 1px solid var(--cream-dark);
}
[data-theme="dark"] .gamer-stats { background: #333; }
.gamer-stat {
    background: var(--cream);
    padding: 15px 10px;
    text-align: center;
}
[data-theme="dark"] .gamer-stat { background: #1a1a1a; }
.gamer-stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rust);
}
.gamer-stat-label {
    font-size: 0.6rem;
    color: var(--tan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-bottom: 2px solid var(--cream-dark);
    padding: 0 10px;
    gap: 0;
}
.profile-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tan);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.profile-tab:hover { color: var(--brown); }
.profile-tab.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
    font-weight: 700;
}
.profile-tab-content {
    display: none;
    padding: 20px 25px 25px;
}
.profile-tab-content.active { display: block; }

/* Badges Section */
.badges-section {
    padding: 0;
}
.badges-section h4 {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tan);
    margin-bottom: 15px;
}
.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.badge-item {
    background: var(--warm-white);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .badge-item { background: var(--cream-dark); }
.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}
.badge-item.unlocked {
    box-shadow: 0 4px 15px rgba(196, 92, 62, 0.2);
}
.badge-item.just-unlocked {
    animation: badgeUnlock 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes badgeUnlock {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.badge-emoji {
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.badge-name {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 3px;
}
.badge-desc {
    font-size: 0.6rem;
    color: var(--tan);
    line-height: 1.4;
}
.badge-progress {
    margin-top: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    color: var(--rust);
}

/* ==========================================
   WAX REWARDS PUNCH CARD
========================================== */
.punch-card {
    background: var(--warm-white);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px dashed var(--cream-dark);
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .punch-card { background: var(--cream-dark); border-color: #444; }
.punch-card::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 40px; height: 40px;
    background: var(--cream);
    border-radius: 50%;
}
[data-theme="dark"] .punch-card::before { background: #1a1a15; }
.punch-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 40px; height: 40px;
    background: var(--cream);
    border-radius: 50%;
}
[data-theme="dark"] .punch-card::after { background: #1a1a15; }
.punch-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 5px;
}
.punch-card-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--tan);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}
.punch-card-prestige {
    text-align: center;
    margin-bottom: 15px;
}
.prestige-stars {
    color: var(--mustard);
    font-size: 1.2rem;
    letter-spacing: 4px;
}
.prestige-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    color: var(--mustard);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}
.punch-stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.punch-stamp {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-family: 'Space Mono', monospace;
    color: var(--tan);
    position: relative;
    transition: all 0.3s;
}
[data-theme="dark"] .punch-stamp { border-color: #555; }
.punch-stamp.stamped {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: white;
    font-weight: 700;
}
.punch-stamp.milestone {
    border-color: var(--mustard);
    border-width: 3px;
}
.punch-stamp.milestone.stamped {
    background: linear-gradient(135deg, var(--mustard), #e8b84a);
    border-color: var(--mustard);
    animation: milestoneGlow 2s infinite;
}
@keyframes milestoneGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(212,160,74,0.4); }
    50% { box-shadow: 0 0 16px rgba(212,160,74,0.7); }
}
.punch-stamp.next-reward {
    border-color: var(--terracotta);
    border-style: dashed;
}
.punch-milestone-list {
    margin-top: 15px;
}
.punch-milestone-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.8rem;
}
[data-theme="dark"] .punch-milestone-item { border-color: #333; }
.punch-milestone-item:last-child { border-bottom: none; }
.punch-milestone-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.punch-milestone-icon.earned {
    background: linear-gradient(135deg, var(--mustard), #e8b84a);
    color: white;
}
.punch-milestone-icon.locked {
    background: var(--cream-dark);
    color: var(--tan);
    filter: grayscale(0.5);
}
[data-theme="dark"] .punch-milestone-icon.locked { background: #333; }
.punch-milestone-info {
    flex: 1;
}
.punch-milestone-name {
    font-weight: 700;
    font-size: 0.8rem;
}
.punch-milestone-desc {
    font-size: 0.65rem;
    color: var(--tan);
    margin-top: 2px;
}
.punch-milestone-status {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
}
.punch-milestone-status.earned { color: var(--sage); }
.punch-milestone-status.locked { color: var(--tan); }
.punch-milestone-status.next { color: var(--terracotta); }

/* Active Rewards */
.active-rewards {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed var(--cream-dark);
}
.active-reward-item {
    background: linear-gradient(135deg, var(--mustard), #e8b84a);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}
.active-reward-item:hover { transform: scale(1.02); }
.active-reward-emoji { font-size: 1.3rem; }
.active-reward-text { flex: 1; font-size: 0.75rem; font-weight: 700; }
.active-reward-code {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    background: rgba(255,255,255,0.25);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ==========================================
   AWARD SHELF
========================================== */
.award-shelf {
    perspective: 600px;
}
.shelf-row {
    background: linear-gradient(180deg, var(--paper) 0%, var(--cream-dark) 100%);
    border-radius: 0 0 8px 8px;
    padding: 20px 15px 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}
[data-theme="dark"] .shelf-row {
    background: linear-gradient(180deg, #2a241c 0%, #1e1a15 100%);
}
.shelf-row::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--dusty-rose), var(--terracotta), var(--mustard));
    border-radius: 0 0 8px 8px;
}
.shelf-row-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tan);
    margin-bottom: 12px;
}
.shelf-items {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.shelf-trophy {
    width: 60px;
    text-align: center;
    transition: transform 0.3s;
    cursor: default;
}
.shelf-trophy:hover { transform: translateY(-4px); }
.shelf-trophy-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 6px;
    position: relative;
}
.shelf-trophy-icon.badge-type {
    background: linear-gradient(135deg, var(--warm-white), var(--paper));
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="dark"] .shelf-trophy-icon.badge-type {
    background: linear-gradient(135deg, #2a241c, #333);
}
.shelf-trophy-icon.reward-type {
    background: linear-gradient(135deg, var(--mustard), #e8b84a);
    box-shadow: 0 2px 8px rgba(212,160,74,0.3);
}
.shelf-trophy-icon.prestige-type {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: var(--mustard);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.shelf-trophy-name {
    font-size: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--brown);
}
[data-theme="dark"] .shelf-trophy-name { color: var(--paper); }
.shelf-empty {
    text-align: center;
    padding: 25px;
    color: var(--tan);
    font-size: 0.8rem;
}
.shelf-empty-icon { font-size: 2rem; margin-bottom: 10px; }

/* ==========================================
   LEADERBOARD
========================================== */
.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
}
.leaderboard-header h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.leaderboard-header p {
    font-size: 0.65rem;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--warm-white);
    border-radius: 10px;
    transition: all 0.2s;
}
[data-theme="dark"] .leaderboard-entry { background: var(--cream-dark); }
.leaderboard-entry.is-you {
    border: 2px solid var(--terracotta);
    background: linear-gradient(135deg, rgba(201,111,60,0.08), rgba(212,160,74,0.08));
}
.leaderboard-entry.top-3 {
    background: linear-gradient(135deg, rgba(212,160,74,0.12), rgba(212,160,74,0.04));
}
.leaderboard-rank {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    width: 28px;
    text-align: center;
    color: var(--brown);
}
.leaderboard-rank.gold { color: #d4a04a; }
.leaderboard-rank.silver { color: #a8a8a8; }
.leaderboard-rank.bronze { color: #cd7f32; }
.leaderboard-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
[data-theme="dark"] .leaderboard-avatar { background: #333; }
.leaderboard-info { flex: 1; }
.leaderboard-name {
    font-weight: 700;
    font-size: 0.8rem;
}
.leaderboard-meta {
    font-size: 0.6rem;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
}
.leaderboard-score {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--terracotta);
}
.leaderboard-note {
    text-align: center;
    padding: 20px;
    font-size: 0.7rem;
    color: var(--tan);
    font-style: italic;
    margin-top: 10px;
}

/* ==========================================
   ADD RECORD BUTTON
========================================== */
.add-record-btn {
    background: var(--rust);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.add-record-btn:hover { background: var(--rust-light); transform: translateY(-1px); }
.add-record-btn svg { flex-shrink: 0; }

.add-record-btn-sidebar {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.add-record-btn-gamer {
    width: calc(100% - 50px);
    margin: 15px 25px;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* ==========================================
   ADD RECORD MODAL
========================================== */
.add-record-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.add-record-overlay.active { display: flex; }

.add-record-modal {
    background: var(--cream);
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .add-record-modal { background: #1a1a1a; }

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.add-record-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.add-record-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
}
.add-record-close {
    background: none;
    border: none;
    color: var(--brown);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.add-record-close:hover { background: var(--cream-dark); }

.add-record-tabs {
    display: flex;
    border-bottom: 1px solid var(--cream-dark);
    padding: 0 25px;
}
.add-record-tab {
    background: none;
    border: none;
    padding: 12px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tan);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.add-record-tab:hover { color: var(--brown); }
.add-record-tab.active {
    color: var(--rust);
    border-bottom-color: var(--rust);
}

.add-record-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.add-record-tab-content { display: none; }
.add-record-tab-content.active { display: block; }

/* Camera Tab */
.camera-capture-area {
    border: 2px dashed var(--cream-dark);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.camera-capture-area:hover { border-color: var(--rust); background: rgba(196,92,62,0.03); }
.camera-capture-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.camera-capture-area .camera-icon {
    font-size: 2.5rem;
}
.camera-capture-area p {
    font-size: 0.85rem;
    color: var(--tan);
}
.camera-capture-area .camera-hint {
    font-size: 0.7rem;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
}

.camera-preview {
    display: none;
    margin-bottom: 15px;
}
.camera-preview.has-image { display: block; }
.camera-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--cream-dark);
}
.camera-preview-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.camera-preview-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.camera-retake-btn {
    background: var(--cream-dark);
    color: var(--brown);
}
.camera-retake-btn:hover { background: var(--tan); color: white; }

.camera-search-wrapper {
    margin-top: 15px;
}
.camera-search-wrapper label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
}

/* Search Tab */
.ar-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}
.ar-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid var(--cream-dark);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    background: var(--warm-white);
    color: var(--brown);
    transition: border-color 0.2s;
    outline: none;
}
[data-theme="dark"] .ar-search-input { background: #252525; border-color: #333; }
.ar-search-input:focus { border-color: var(--rust); }
.ar-search-input::placeholder { color: var(--tan); }
.ar-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tan);
}

.ar-search-loading {
    text-align: center;
    padding: 30px;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    display: none;
}
.ar-search-loading.active { display: block; }

.ar-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.ar-result-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--warm-white);
    border: 1px solid var(--cream-dark);
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}
[data-theme="dark"] .ar-result-card { background: #252525; border-color: #333; }
.ar-result-card:hover {
    border-color: var(--rust);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.ar-result-art {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: var(--cream-dark);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
}
.ar-result-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ar-result-info {
    flex: 1;
    min-width: 0;
}
.ar-result-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ar-result-info p {
    font-size: 0.75rem;
    color: var(--tan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ar-result-info .ar-result-year {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--gold);
    margin-top: 2px;
}
.ar-result-add {
    background: var(--forest);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ar-result-add:hover { background: #4a5f46; transform: scale(1.1); }

.ar-no-results {
    text-align: center;
    padding: 30px;
    color: var(--tan);
}
.ar-no-results p {
    font-size: 0.85rem;
    margin-bottom: 5px;
}
.ar-no-results .hint {
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
}

/* Manual Tab */
.ar-form-group {
    margin-bottom: 14px;
}
.ar-form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    color: var(--tan);
    font-family: 'Space Mono', monospace;
}
.ar-form-group input,
.ar-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    background: var(--warm-white);
    color: var(--brown);
    outline: none;
    transition: border-color 0.2s;
}
[data-theme="dark"] .ar-form-group input,
[data-theme="dark"] .ar-form-group select { background: #252525; border-color: #333; }
.ar-form-group input:focus,
.ar-form-group select:focus { border-color: var(--rust); }
.ar-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ar-manual-photo {
    border: 2px dashed var(--cream-dark);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    position: relative;
    font-size: 0.8rem;
    color: var(--tan);
    transition: border-color 0.2s;
}
.ar-manual-photo:hover { border-color: var(--rust); }
.ar-manual-photo input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.ar-manual-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.ar-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--rust);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.ar-submit-btn:hover { background: var(--rust-light); }
.ar-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================
   MOBILE RESPONSIVE — SHARED PANELS
========================================== */
@media (max-width: 768px) {
    .sidebar-panel { width: 100%; right: -100%; }
    .search-box { width: 95%; padding: 20px; }
    .gamer-panel { width: 100%; }
    .badges-grid { grid-template-columns: repeat(2, 1fr); }
    .gamer-level-name { font-size: 1.4rem; }
    .profile-tab { font-size: 0.5rem; padding: 10px 4px; }
    .punch-stamp { width: 30px; height: 30px; font-size: 0.55rem; }
    .leaderboard-entry { padding: 10px; gap: 8px; }
    .leaderboard-name { font-size: 0.7rem; }
    .shelf-trophy { width: 50px; }
    .shelf-trophy-icon { width: 42px; height: 42px; font-size: 1.2rem; }
    .shelf-trophy-name { font-size: 0.45rem; }
    .gamer-stats { grid-template-columns: 1fr !important; }
    .add-record-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .add-record-overlay {
        align-items: stretch;
    }
    .add-record-tabs {
        padding: 0 15px;
    }
    .add-record-tab {
        flex: 1;
        text-align: center;
        padding: 12px 8px;
        font-size: 0.75rem;
    }
    .add-record-body { padding: 20px 15px; }
    .camera-capture-area { min-height: 200px; padding: 25px; }
    .camera-capture-area .camera-icon { font-size: 3rem; }
    .ar-result-card { padding: 10px; }
    .ar-result-add { width: 44px; height: 44px; font-size: 1.3rem; }
}
