:root {
    --bg-white: #FFFFFF;
    --bg-gray: #F8F9FA;
    --bg-gray-darker: #E9ECEF;
    --accent-yellow: #FFC107;
    --accent-yellow-light: rgba(255, 193, 7, 0.05);
    --text-dark: #333333;
    --text-muted: #888888;
    --border-radius: 16px;
    --border-color: #E0E0E0;
    --stats-bg: #eef0f2;
    --stats-ink: 0, 0, 0;
    --post-bw-rgb: 0,188,212;
    --post-tl-rgb: 103,58,183;
    --post-melo-rgb: 34,197,94;
    --post-trivia-rgb: 156,39,176;
}

.theme-hue-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red);
    outline: none;
    cursor: pointer;
}
.theme-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-dark);
    cursor: pointer;
}
.theme-hue-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-dark);
    cursor: pointer;
}
.theme-light-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #1a1a1a, #f5f5f5);
    outline: none;
    cursor: pointer;
}
.theme-light-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-dark);
    cursor: pointer;
}
.theme-light-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-dark);
    cursor: pointer;
}

[data-theme="dark"] {
    --bg-white: #121212;
    --bg-gray: #1e1e1e;
    --bg-gray-darker: #2a2a2a;
    --accent-yellow: #FFC107;
    --accent-yellow-light: rgba(255, 193, 7, 0.08);
    --text-dark: #E8E8E8;
    --text-muted: #888888;
    --border-color: #2e2e2e;
    --stats-bg: var(--bg-gray);
    --stats-ink: 255, 255, 255;
}

[data-theme="dark"] body { background-color: var(--bg-white); color: var(--text-dark); }
[data-theme="dark"] .topbar { border-bottom-color: var(--border-color); background-color: var(--bg-white); }
[data-theme="dark"] .search-bar input { border-color: var(--border-color); }
[data-theme="dark"] .mobile-menu { border-bottom-color: var(--border-color); background-color: var(--bg-white); }
[data-theme="dark"] .mobile-search-bar { background-color: var(--bg-white); border-bottom-color: var(--border-color); }
[data-theme="dark"] .mobile-search-inner { background-color: var(--bg-gray); }
[data-theme="dark"] .mobile-search-inner input { color: var(--text-dark); }
[data-theme="dark"] .anime-card { box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
[data-theme="dark"] .review-card { border-color: var(--border-color); }
[data-theme="dark"] .modal-content { background: var(--bg-gray); border: 1px solid var(--border-color); }
[data-theme="dark"] .modal-content input,
[data-theme="dark"] .modal-content textarea,
[data-theme="dark"] .modal-content select { background: var(--bg-white); border-color: var(--border-color); color: var(--text-dark); }
[data-theme="dark"] .dropdown-menu { background: var(--bg-gray); border-color: var(--border-color); }
[data-theme="dark"] .dropdown-item:hover { background: var(--bg-gray-darker); }
[data-theme="dark"] .list-table-container { border-color: var(--border-color); }
[data-theme="dark"] .anime-list-table th { background-color: var(--bg-gray-darker); }
[data-theme="dark"] .anime-list-table td { border-bottom-color: var(--border-color); }
[data-theme="dark"] .anime-list-table tr:hover { background-color: var(--bg-gray-darker); }
[data-theme="dark"] .profile-card { border-color: var(--border-color); }
[data-theme="dark"] .stat-box { border-color: var(--border-color); }
[data-theme="dark"] .cancel-btn { background: var(--bg-gray-darker); color: var(--text-dark); }
[data-theme="dark"] .top10-list-item:hover { border-color: var(--border-color); }
[data-theme="dark"] .news-card { border-color: var(--border-color); }
[data-theme="dark"] .action-btn,
[data-theme="dark"] .submit-btn,
[data-theme="dark"] .toggle-btn.active,
[data-theme="dark"] .nav-btn.active,
[data-theme="dark"] .badge-weebee,
[data-theme="dark"] .news-link,
[data-theme="dark"] .carousel-arrow:hover { color: #1a1a1a; }
[data-theme="dark"] .nav-btn.active .material-symbols-outlined { color: #1a1a1a; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background-color: var(--bg-white); color: var(--text-dark); }
.app-container { display: flex; flex-direction: column; height: 100vh; }

/* ── Top nav bar ── */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 30px; height: 64px; background-color: var(--bg-white); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo { font-size: 24px; font-weight: 800; font-family: 'Nunito', 'Inter', sans-serif; color: var(--text-dark); letter-spacing: -0.5px; margin-right: 16px; flex-shrink: 0; user-select: none; }
.top-nav { display: flex; align-items: center; gap: 2px; }
.nav-btn { background: none; border: none; padding: 8px 12px; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; color: var(--text-muted); white-space: nowrap; }
.nav-btn .material-symbols-outlined { font-size: 18px; transition: color 0.2s; }
.nav-btn:hover { background-color: var(--bg-gray); color: var(--text-dark); }
.nav-btn:hover .material-symbols-outlined { color: var(--text-dark); }
.nav-btn.active { background-color: var(--accent-yellow); color: var(--text-dark); }
.nav-btn.active .material-symbols-outlined { color: var(--text-dark); }

/* ── Hamburger (mobile only) ── */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--text-dark); border-radius: 8px; align-items: center; justify-content: center; }
.hamburger-btn:hover { background: var(--bg-gray); }

/* ── Search icon button (mobile only) ── */
.search-icon-btn { display: none; background: none; border: none; padding: 6px; color: var(--text-dark); cursor: pointer; border-radius: 8px; align-items: center; justify-content: center; }
.search-icon-btn:hover { background: var(--bg-gray); }
.search-icon-btn .material-symbols-outlined { font-size: 22px; }

/* ── Mobile search dropdown ── */
.mobile-search-bar { display: none; background: var(--bg-white); border-bottom: 1px solid var(--border-color); padding: 10px 16px; position: sticky; top: 64px; z-index: 98; }
.mobile-search-bar.open { display: block; }
.mobile-search-inner { display: flex; align-items: center; gap: 10px; background: var(--bg-gray); border-radius: 20px; padding: 9px 14px; }
.mobile-search-inner .material-symbols-outlined { color: var(--text-muted); font-size: 18px; flex-shrink: 0; }
.mobile-search-inner input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--text-dark); min-width: 0; }
.search-close-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; display: flex; align-items: center; flex-shrink: 0; }

/* ── PWA-only tweaks: no custom cursor / bee trail settings in standalone mode ── */
@media (display-mode: standalone) {
    .pwa-hide { display: none !important; }
}

/* ── Mobile slide-down menu ── */
.mobile-menu { display: none; flex-direction: column; gap: 4px; background: var(--bg-white); border-bottom: 1px solid var(--border-color); padding: 10px 16px; position: sticky; top: 64px; z-index: 99; }
.mobile-menu.open { display: flex; }
.mobile-menu .nav-btn { width: 100%; justify-content: flex-start; padding: 10px 14px; color: var(--text-dark); }

/* ── Mobile bottom navigation bar ── */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--bg-white); border-top: 1px solid var(--border-color); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav .nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; background: none; border: none; color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.bottom-nav .nav-btn .material-symbols-outlined { font-size: 22px; }
.bottom-nav .nav-btn.active { color: #FFC107; }

/* ── Search bar ── */
.search-bar { position: relative; width: 260px; }
.search-bar .material-symbols-outlined { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 18px; }
.search-bar input { width: 100%; padding: 9px 16px 9px 36px; border-radius: 20px; border: 1px solid var(--border-color); background-color: var(--bg-gray); font-size: 13px; outline: none; transition: border-color 0.2s; color: var(--text-dark); }
.search-bar input:focus { border-color: var(--accent-yellow); }

/* ── User profile area ── */
.user-profile { display: flex; gap: 15px; align-items: center; flex-shrink: 0; }
.user-profile .material-symbols-outlined { cursor: pointer; color: var(--text-dark); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background-color: #DDD; z-index: 2; position: relative; }
.clickable-user { cursor: pointer; transition: color 0.2s, transform 0.2s; }
.clickable-user:hover { color: var(--accent-yellow); transform: scale(1.05); }

/* ── Main scrollable area ── */
.main-content { flex: 1; overflow-y: auto; }
.content-views { padding: 30px 36px; max-width: 1500px; margin: 0 auto; width: 100%; }

/* ── Medium breakpoint: compact nav for split-screen / portrait monitors ── */
@media (max-width: 1100px) {
    .nav-label { display: none; }
    .nav-btn { padding: 8px 10px; }
    .search-bar { width: 180px; }
    .topbar { padding: 0 20px; }
    .content-views { padding: 24px; }

    /* Stack profile layout to single column so review cards have full width */
    .profile-layout-grid { grid-template-columns: 1fr !important; }
    .profile-side-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

    /* Scale down in-depth badge rows to fit at medium widths */
    .review-badges-row { zoom: 0.82; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .review-badges-row::-webkit-scrollbar { display: none; }
}

/* ── At 960px (half-screen / portrait 1080p): switch to hamburger ── */
@media (max-width: 960px) {
    .top-nav { display: none; }
    .hamburger-btn { display: flex; }
    .search-bar { display: none; }
    .search-icon-btn { display: flex; }
    .content-views { padding: 20px; }
    .logo { font-size: 20px; margin-right: 0; }
}

/* ── Mobile breakpoints ── */
@media (max-width: 860px) {
    /* Nav */
    .top-nav { display: none; }
    .hamburger-btn { display: flex; }
    .search-bar { display: none; }
    .search-icon-btn { display: flex; }
    .logo { margin-right: 0; font-size: 20px; }
    .content-views { padding: 20px; }
    .app-container { overflow-x: hidden; }

    /* Bottom nav bar */
    .bottom-nav { display: flex; }
    .main-content { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

    /* Never allow the page itself to scroll sideways */
    html, body, .main-content { overflow-x: hidden; }

    /* Tab bars (community, games, etc.) — shrink tabs to equal widths so they
       all fit on screen without scrolling */
    .detail-tabs { flex-wrap: nowrap !important; gap: 0 !important; }
    .detail-tab {
        flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 2px;
        padding: 6px 0 !important; font-size: 8.5px !important; text-align: center; white-space: normal; line-height: 1.1;
        word-break: break-word; overflow-wrap: break-word;
    }
    .detail-tab .material-symbols-outlined { font-size: 16px !important; }

    /* Hero banner titles (Tier Lists, BuzzWord, Trivia, etc.) — shrink to fit one line */
    .banner-hero-title { font-size: 28px !important; }

    /* BuzzWord game thumbnail rows — shrink title/icon/CTA to fit one line */
    .banner-thumb-title { font-size: 15px !important; }
    .banner-thumb-icon { font-size: 32px !important; }
    .banner-thumb-cta { padding: 6px 10px !important; font-size: 12px !important; }

    /* ── Anime detail: force single-column, sidebar compact strip at top ── */
    .detail-layout { display: flex !important; flex-direction: column !important; gap: 16px; align-items: stretch !important; }
    .detail-main { order: 0; width: 100%; min-width: 0; }
    .detail-main h1 { font-size: 22px; }

    /* Sidebar becomes a horizontal compact strip (cover left | stats right) */
    .detail-sidebar {
        display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
        gap: 14px !important; align-items: flex-start !important;
        position: static !important; width: 100% !important; min-width: 0 !important;
    }
    .detail-sidebar > img {
        width: 100px !important; height: 142px !important; max-width: 100px !important;
        flex-shrink: 0 !important; border-radius: 8px; object-fit: cover; margin: 0 !important;
    }
    .detail-sidebar > .stat-box { flex: 1 !important; min-width: 150px !important; margin-bottom: 0 !important; }
    /* Buttons span full width below image+stats */
    .detail-sidebar > .action-btn { flex: 1 1 calc(50% - 7px) !important; max-width: none !important; width: auto !important; margin-bottom: 0 !important; }

    /* ── Profile: force single-column, show tabs feed first ── */
    .profile-layout-grid { display: flex !important; flex-direction: column !important; gap: 20px; }
    .profile-main-feed { order: -1 !important; width: 100%; min-width: 0; }
    .profile-side-deck { order: 0; width: 100%; min-width: 0; }
    .profile-card { width: 100%; box-sizing: border-box; }

    /* Profile header — stack into a centered column on mobile */
    .profile-banner { min-height: 230px; }
    .profile-banner-overlay { padding: 14px 14px 16px; }
    .profile-banner-overlay > div { width: 100%; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
    .profile-banner-overlay > div > div:last-child { padding-right: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
    .profile-banner-overlay > div > div:last-child > div:first-child,
    .profile-banner-overlay > div > div:last-child > div { justify-content: center; }
    #profile-follow-counts { justify-content: center; }
    .profile-avatar-large { width: 64px; height: 64px; }

    /* Review cards */
    .review-anime-thumb { display: none; }
    .review-cover-mobile { display: block !important; }
    .review-card { overflow: visible; }
    .review-card [style*="padding-right: 170px"] { padding-right: 0 !important; }
    .review-card [style*="padding-right: 195px"] { padding-right: 0 !important; }

    /* Review badges — horizontal scroll instead of wrapping */
    .review-badges-row { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 8px !important; padding-bottom: 6px; }
    .review-badges-row::-webkit-scrollbar { display: none; }

    /* Review action buttons — icon-only on mobile to prevent overflow */
    .action-stat { flex-shrink: 0; }
    .action-stat button { flex-shrink: 0; }
    .action-stat > .action-label { display: none; }
    .review-actions { gap: 14px; }

    /* "Tap to expand" hint — revealed on mobile */
    .expand-hint-row { display: block; }

    /* Prevent horizontal bleed on specific views */
    #anime-detail-view, #profile-view { overflow-x: hidden; }

    /* Podium — compact sizes with !important to override any cached CSS */
    .podium-item { padding: 8px 8px 0 !important; }
    .podium-step { width: calc(100% + 16px) !important; margin: 10px -8px 0 !important; }
    .podium-1 img { width: 76px !important; height: 108px !important; }
    .podium-2 img, .podium-3 img { width: 62px !important; height: 88px !important; }
    .podium-1 h4 { font-size: 10px !important; width: 76px !important; }
    .podium-2 h4, .podium-3 h4 { font-size: 10px !important; width: 62px !important; }
    .podium-rank-change { height: 16px !important; margin-bottom: 4px !important; }
    .step-1 { height: 44px !important; font-size: 24px !important; }
    .step-2 { height: 34px !important; font-size: 18px !important; }
    .step-3 { height: 26px !important; font-size: 14px !important; }

    /* Content sections */
    .content-section { padding: 16px; }
    .content-section h3 { font-size: 16px; }

    /* News grid */
    .news-grid { grid-template-columns: 1fr; }

    /* Podium — images sized so they always fit (~256px total vs 320px+ available) */
    .podium-container { gap: 4px !important; justify-content: center !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .podium-container::-webkit-scrollbar { display: none; }

    /* My List tabs — wrap instead of overflow */
    .profile-tabs.list-tabs { flex-wrap: wrap !important; gap: 2px 8px !important; overflow-x: hidden; }
    .profile-tabs.list-tabs .p-tab { font-size: 13px; padding: 8px 4px; white-space: nowrap; }

    /* My List table — fit without horizontal scroll */
    .list-table-container { overflow-x: hidden; }
    .anime-list-table { min-width: unset; font-size: 13px; }
    .anime-list-table th, .anime-list-table td { padding: 10px 8px; }

    /* Character grid */
    .character-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

    /* Profile card showcase — fit 2 columns on narrow phones */
    #profile-card-showcase > div { padding: 14px 10px; }
    .profile-showcase-grid { gap: 10px !important; }
    .showcase-card-frame { width: 110px !important; height: 154px !important; }
    .showcase-card-scale { transform: scale(0.5) !important; }

    /* Carousel arrows — pull them in so they don't clip */
    .carousel-arrow.left { left: -8px; }
    .carousel-arrow.right { right: -8px; }

    /* ── Topbar: tighten spacing, hide non-essential elements ── */
    .topbar-display-name { display: none; }
    .topbar-chevron { display: none; }
    .topbar-right { gap: 4px; }
    .user-profile { gap: 4px; }
    .topbar-notif-wrap { margin-right: 0 !important; }

    /* Keep the logo from being squeezed/overlapped by the right-side icons
       (DM, notifications, amber balance, avatar, hamburger) */
    .topbar-left { flex-shrink: 0; }

    /* Merge DM + Notifications into one "Activity" bell — frees up enough
       room to keep the amber balance pill next to the avatar */
    .topbar-dm-wrap { display: none !important; }
    .activity-tabs { display: flex !important; }

    /* ── Notification + DM dropdowns: fix to viewport on mobile ── */
    #notification-dropdown, #dm-dropdown { position: fixed !important; top: 60px !important; right: 14px !important; left: 14px !important; width: auto !important; max-height: 70vh !important; }

    /* ── Review cards ── */
    .source-badge { display: none !important; }
    .card-follow-btn { display: none !important; }
    .review-anime-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100vw - 120px); display: inline-block; vertical-align: middle; }
    .review-header { min-width: 0; }
    .review-header > div:first-child { min-width: 0; flex: 1; overflow: hidden; }

    /* ── Prize Wheel: prizes list becomes a 3-column grid ── */
    .wheel-prizes-panel { flex: 1 1 100% !important; max-width: none !important; }
    .wheel-prizes-list { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
    .wheel-prizes-list > div { flex-direction: column !important; text-align: center !important; gap: 4px !important; padding: 10px 4px !important; }
    .wheel-prizes-list > div span[style*="margin-left:auto"] { margin-left: 0 !important; }
}

@media (max-width: 500px) {
    .topbar { padding: 0 14px; height: 56px; }
    .topbar-right { gap: 2px; }
    .topbar-amber-badge { padding: 2px 5px !important; }
    .mobile-menu { top: 56px; }
    .mobile-search-bar { top: 56px; }
    .content-views { padding: 14px; }
    .detail-main h1 { font-size: 18px; }
    .profile-header { padding: 18px 14px; }

    /* Review action buttons — smaller icons on very small screens */
    .action-stat button { width: 36px; height: 36px; }

    /* Episode rows — hide the avg score to save space */
    .ep-avg { display: none; }

    /* Stat row text */
    .stat-box h4 { font-size: 10px; }
    .stat-box .value { font-size: 16px !important; }

    /* Profile tabs — compact on small screens */
    .profile-tabs { gap: 4px; }
    .p-tab { font-size: 12px; padding: 8px 6px; }

    /* Hide rank, status, edit columns on small screens — leaves Image, Title, Score */
    .anime-list-table th:first-child,
    .anime-list-table td:first-child { display: none; }
    .anime-list-table th:nth-child(6),
    .anime-list-table td:nth-child(6) { display: none; }
    .anime-list-table th:nth-child(7),
    .anime-list-table td:nth-child(7) { display: none; }
    .anime-list-table th, .anime-list-table td { padding: 8px 6px; }
}
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease-in-out; }
#profile-view { background-color: var(--bg-white); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h2 { margin-bottom: 20px; font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; margin-bottom: 15px; }

/* --- NEW CAROUSEL & WAVE ANIMATION STYLES --- */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.carousel-arrow {
    position: absolute;
    z-index: 10;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
    top: 50%; transform: translateY(-50%);
}
.carousel-arrow:hover { background: var(--accent-yellow); transform: translateY(-50%) scale(1.1); }
.carousel-arrow.left { left: -20px; }
.carousel-arrow.right { right: -20px; }

.carousel { 
    display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth;
    padding: 15px 5px 25px 5px; /* Extra padding for wave pop-out */
    -ms-overflow-style: none; scrollbar-width: none; 
}
.carousel::-webkit-scrollbar { display: none; }

/* ── Discover page ── */
.discover-section { margin-bottom: 48px; }
.discover-section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.discover-section-header .section-icon { font-size: 28px; flex-shrink: 0; }
.discover-section-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.discover-section-header p { font-size: 13px; color: var(--text-muted); }

/* Spotlight */
.spotlight-card { position: relative; border-radius: var(--border-radius); overflow: hidden; cursor: pointer; min-height: 240px; display: flex; align-items: center; transition: transform 0.2s; }
.spotlight-card:hover { transform: scale(1.005); }
.spotlight-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(22px) brightness(0.35) saturate(1.4); transform: scale(1.12); z-index: 0; }
.spotlight-content { position: relative; z-index: 1; display: flex; gap: 28px; padding: 36px; align-items: flex-start; width: 100%; }
.spotlight-cover { width: 130px; height: 185px; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); flex-shrink: 0; }
.spotlight-info { color: white; flex: 1; min-width: 0; }
.spotlight-label { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-yellow); color: #1a1a1a; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.spotlight-title { font-size: 26px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); line-height: 1.2; }
.spotlight-genres { display: inline-block; font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 8px; }
.spotlight-synopsis { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.spotlight-footer { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.spotlight-btn { background: white; color: #1a1a1a; font-weight: 700; }
.spotlight-btn:hover { background: var(--accent-yellow); }
@media (max-width: 600px) {
    .spotlight-content { flex-direction: column; padding: 20px; gap: 16px; }
    .spotlight-cover { width: 90px; height: 130px; }
    .spotlight-title { font-size: 20px; }
}

.anime-card {
    background-color: var(--bg-gray); padding: 10px; border-radius: var(--border-radius); text-align: center;
    min-width: 160px; box-shadow: 0 4px 6px rgba(0,0,0,0.03); cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center bottom;
}
.anime-card:hover { 
    transform: translateY(-10px) scale(1.05); 
    box-shadow: 0 15px 25px rgba(0,0,0,0.15); 
    z-index: 5;
    background-color: var(--bg-white);
}
.anime-card img { width: 140px; height: 200px; border-radius: 8px; margin-bottom: 10px; object-fit: cover; }
.anime-card p { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

/* Review Cards */
.review-card { position: relative; overflow: hidden; background-color: var(--bg-gray); padding: 20px; border-radius: var(--border-radius); margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.03); border: 1px solid transparent; }
.review-card.weebee-review { background-color: var(--accent-yellow-light); border: 1px solid var(--accent-yellow); }
.review-card.bw-post-card { background-color: rgba(var(--post-bw-rgb), 0.05); border: 1px solid rgba(var(--post-bw-rgb), 0.5); }
.review-card.tl-post-card { background-color: rgba(var(--post-tl-rgb), 0.05); border: 1px solid rgba(var(--post-tl-rgb), 0.45); }
.review-card.melobee-post-card { background-color: rgba(var(--post-melo-rgb), 0.05); border: 1px solid rgba(var(--post-melo-rgb), 0.5); }
.review-card.trivia-post-card { background-color: rgba(var(--post-trivia-rgb), 0.05); border: 1px solid rgba(var(--post-trivia-rgb), 0.45); }
[data-theme="dark"] .review-card.bw-post-card { background-color: rgba(var(--post-bw-rgb), 0.09); }
[data-theme="dark"] .review-card.tl-post-card { background-color: rgba(var(--post-tl-rgb), 0.1); }
[data-theme="dark"] .review-card.melobee-post-card { background-color: rgba(var(--post-melo-rgb), 0.09); }
[data-theme="dark"] .review-card.trivia-post-card { background-color: rgba(var(--post-trivia-rgb), 0.09); }
.review-card.interactive { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.review-card.interactive:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }

.review-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; position: relative; z-index: 2; }
.spoiler-post-wrap { margin-bottom: 20px; }
.spoiler-post-wrap .review-header { z-index: 21; }
.review-header span { color: var(--text-muted); font-size: 14px; }
.review-text { font-size: 14px; line-height: 1.6; margin-bottom: 15px; position: relative; z-index: 2; white-space: pre-wrap; }
.review-anime-thumb { position: absolute; top: 0; right: 0; height: 100%; width: 185px; object-fit: cover; opacity: 0.85; -webkit-mask-image: linear-gradient(to right, transparent 0%, black 55%); mask-image: linear-gradient(to right, transparent 0%, black 55%); z-index: 3; cursor: pointer; border-radius: 0 var(--border-radius) var(--border-radius) 0; transition: height 0.3s ease, border-radius 0.3s ease, opacity 0.2s; }
.review-anime-thumb:hover { opacity: 1; }
.review-anime-hint { position: absolute; bottom: 10px; right: 10px; z-index: 4; background: rgba(0,0,0,0.75); color: white; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; opacity: 0; transition: opacity 0.2s; pointer-events: none; white-space: nowrap; }
.review-card:hover .review-anime-hint { opacity: 1; }
.review-card.expanded .review-anime-thumb { height: 215px; border-radius: 0 var(--border-radius) 0 0; }

/* Prize Wheel */
.wheel-notif-dot { display: none; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #FF4444; box-shadow: 0 0 0 2px var(--bg-card); }
.wheel-slice-icon { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; transform-origin: center; pointer-events: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.wheel-spinning { animation: wheel-glow-pulse 1s ease-in-out infinite; }
@keyframes wheel-glow-pulse {
    0% { box-shadow: 0 0 0 4px var(--border-color), 0 0 26px 6px rgba(244,63,94,0.55); }
    25% { box-shadow: 0 0 0 4px var(--border-color), 0 0 32px 9px rgba(245,158,11,0.6); }
    50% { box-shadow: 0 0 0 4px var(--border-color), 0 0 38px 12px rgba(124,58,237,0.65); }
    75% { box-shadow: 0 0 0 4px var(--border-color), 0 0 32px 9px rgba(14,165,233,0.6); }
    100% { box-shadow: 0 0 0 4px var(--border-color), 0 0 26px 6px rgba(244,63,94,0.55); }
}
.wheel-pointer-bounce { animation: wheel-pointer-bounce 0.18s ease-in-out infinite; }
@keyframes wheel-pointer-bounce {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(18deg); }
}
@keyframes wheel-confetti-burst {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4); opacity: 0; }
}

/* Wheel outer wrapper: rotating rainbow ring + sparkles + landing flash */
.wheel-outer { z-index: 0; }
.wheel-ring {
    position: absolute; inset: -14px; border-radius: 50%; z-index: -1;
    background: conic-gradient(from 0deg, #f43f5e, #f59e0b, #facc15, #84cc16, #22c55e, #14b8a6, #0ea5e9, #6366f1, #a855f7, #ec4899, #f43f5e);
    filter: blur(6px); opacity: 0.45;
    animation: wheel-ring-spin 18s linear infinite;
}
@keyframes wheel-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.wheel-active-spin .wheel-ring { animation-duration: 1.4s; opacity: 0.85; filter: blur(9px) brightness(1.3); }
.wheel-sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.wheel-sparkle {
    position: absolute; top: 50%; left: 50%; font-size: 18px;
    transform: rotate(calc(var(--i) * 60deg)) translate(0, -53%);
    animation: wheel-sparkle-twinkle 2.6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.4s);
    opacity: 0.15;
}
@keyframes wheel-sparkle-twinkle {
    0%, 100% { opacity: 0.1; filter: none; }
    50% { opacity: 1; filter: drop-shadow(0 0 8px #fff); }
}
.wheel-flash {
    position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 6; opacity: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 70%);
}
.wheel-flash.active { animation: wheel-flash-pop 0.7s ease-out; }
@keyframes wheel-flash-pop {
    0% { opacity: 0; transform: scale(0.6); }
    30% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.35); }
}
.wheel-spin-btn:not(:disabled):hover { filter: brightness(1.12); transform: translate(-50%,-50%) scale(1.05); }
.wheel-spin-btn { transition: filter 0.15s, transform 0.15s; }

.source-badge { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 10px; vertical-align: middle; }
.badge-weebee { background-color: var(--accent-yellow); color: var(--text-dark); }
.badge-global { background-color: var(--bg-gray-darker); color: var(--text-muted); }
.bw-game-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; margin-left: 8px; vertical-align: middle; }
.bw-thumb-wrapper { position: absolute; top: 0; right: 0; width: 185px; height: 100%; z-index: 4; border-radius: 0 var(--border-radius) var(--border-radius) 0; overflow: hidden; }
.bw-thumb-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; -webkit-mask-image: linear-gradient(to right, transparent 0%, black 100%); mask-image: linear-gradient(to right, transparent 0%, black 100%); display: block; }
.bw-play-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.bw-thumb-wrapper:hover .bw-play-btn { background: var(--accent-yellow); color: #111; border-color: var(--accent-yellow); }
.bw-play-btn { background: rgba(0,0,0,0.6); color: white; border: 1.5px solid rgba(255,255,255,0.7); border-radius: 20px; padding: 7px 16px; font-weight: 800; font-size: 13px; letter-spacing: 0.5px; transition: all 0.2s; pointer-events: auto; cursor: pointer; }

.rating-badge { width: 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; color: white; font-size: 13px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); box-shadow: inset 0 0 10px rgba(0,0,0,0.2); text-shadow: 1px 1px 2px rgba(0,0,0,0.4); }
.tier-royal    { background: linear-gradient(135deg, #4A90D9, #7B2FBE); }
.tier-platinum { background: linear-gradient(135deg, #E5E4E2, #B0E0E6); color: #333; text-shadow: 1px 1px 2px rgba(255,255,255,0.8); }
.tier-gold     { background: linear-gradient(135deg, #FFC107, #FF9800); }
.tier-silver   { background: linear-gradient(135deg, #E0E0E0, #9E9E9E); color: #333; text-shadow: 1px 1px 2px rgba(255,255,255,0.8); }
.tier-bronze   { background: linear-gradient(135deg, #CD7F32, #8D4004); }
.tier-iron     { background: linear-gradient(135deg, #7A7A7A, #424242); }
.tier-stone    { background: linear-gradient(135deg, #8D6E63, #4E342E); }
.blue { background: linear-gradient(135deg, #42A5F5, #1E88E5); }

.review-actions { display: flex; gap: 20px; margin-top: 15px; padding-top: 15px; position: relative; z-index: 2; align-items: center; }
.expand-hint-row { display: block; text-align: center; margin-top: 10px; padding-right: 170px; position: relative; z-index: 2; }
.expand-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; background: var(--bg-gray-darker); padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 2px; }
.review-card.expanded .expand-hint-row { display: none; }
.review-cover-mobile { display: none; width: 26px; height: 37px; border-radius: 4px; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.action-stat { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.action-stat button { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; color: var(--text-dark); box-shadow: 0 2px 4px rgba(0,0,0,0.02);}
.action-stat button:hover { background: var(--bg-gray-darker); transform: scale(1.05); }

.top10-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.anime-card.horizontal { display: flex; text-align: left; gap: 15px; padding: 15px; min-width: unset; }
.anime-card.horizontal img { width: 80px; height: 115px; margin-bottom: 0; }
.anime-card.horizontal .details { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.anime-card.horizontal .details h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Anime Detail Page */
.back-btn { background: none; border: none; display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 600; color: var(--text-muted); cursor: pointer; margin-bottom: 20px; transition: color 0.2s; }
.back-btn:hover { color: var(--accent-yellow); }
.stat-box { background-color: var(--bg-white); border-radius: 12px; padding: 15px; margin-bottom: 15px; border: 1px solid #E0E0E0; }
.stat-box h4 { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px;}
.stat-box .value { font-size: 20px; font-weight: bold; color: var(--text-dark); }
.stat-box .sub-value { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.info-list { text-align: left; font-size: 13px; }
.info-row { display: flex; flex-direction: column; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #E0E0E0; }
.info-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.info-row strong { color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.info-row span { color: var(--text-dark); }
.stat-row { display: flex; justify-content: space-around; align-items: center; text-align: center; }
.stat-col { display: flex; flex-direction: column; align-items: center; }

.detail-main { flex: 1; min-width: 0; }
.detail-main .header-info { margin-bottom: 30px; }
.detail-main h1 { font-size: 32px; margin-bottom: 5px; }
.detail-main .tags { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; }
.content-section { background-color: var(--bg-gray); padding: 25px; border-radius: var(--border-radius); margin-bottom: 30px; }
.content-section.no-bg { background-color: transparent; padding: 0; }
.content-section p { font-size: 15px; line-height: 1.7; color: var(--text-dark); margin-bottom: 15px; }

.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.character-card { display: flex; background-color: var(--bg-white); border-radius: 8px; overflow: hidden; border: 1px solid #E0E0E0; }
.character-card img { width: 60px; height: 80px; object-fit: cover; }
.character-card .info { padding: 10px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.character-card .name { font-size: 14px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.character-card .role { font-size: 12px; color: var(--text-muted); }

.loading { text-align: center; color: var(--text-muted); padding: 20px; }

.review-header-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 15px; }
.review-header-left { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.review-header-left h3 { margin-bottom: 0; }

.action-btn { background-color: var(--accent-yellow); color: var(--text-dark); border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background-color 0.2s; }
.action-btn:hover { background-color: #e5ad06; }
.action-btn .material-symbols-outlined { font-size: 18px; }

.review-toggle { display: flex; background-color: var(--bg-gray-darker); border-radius: 20px; overflow: hidden; }
.toggle-btn { padding: 8px 16px; border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.toggle-btn.active { background-color: var(--accent-yellow); color: var(--text-dark); }

/* Modal Styles */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: var(--bg-white); padding: 30px; border-radius: var(--border-radius); width: 90%; max-width: 600px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 85vh; overflow-y: auto; }
.modal-content h3 { margin-bottom: 20px; text-align: center; }
.modal-content label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.modal-section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dark); margin: 24px 0 14px; padding-top: 18px; border-top: 1px solid var(--border-color); }
.modal-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.modal-section-title .material-symbols-outlined { font-size: 18px; color: var(--accent-yellow); }
.modal-section-hint { font-size: 12px; font-weight: 400; color: var(--text-muted); margin: -8px 0 14px; }
.modal-content input, .modal-content textarea, .modal-content select { width: 100%; padding: 12px; border: 1px solid #E0E0E0; border-radius: 8px; background: var(--bg-gray); font-family: 'Inter', sans-serif; margin-bottom: 20px; outline: none; }
.modal-content input:focus, .modal-content textarea:focus, .modal-content select:focus { border-color: var(--accent-yellow); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px;}
.modal-actions button { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; }
.cancel-btn { background: var(--bg-gray-darker); color: var(--text-dark); padding: 8px 16px; border-radius: 8px; font-weight: 600; border: none; cursor: pointer; }
.submit-btn { background: var(--accent-yellow); color: var(--text-dark); padding: 8px 16px; border-radius: 8px; font-weight: 600; border: none; cursor: pointer; }
.submit-btn:hover { background: #e5ad06; }

.category-block { background-color: var(--bg-gray); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid #E0E0E0; }
.cat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cat-header label { margin-bottom: 0; color: var(--text-dark); font-size: 14px; }
.cat-header input { width: 90px; margin-bottom: 0; padding: 8px; text-align: center; }
.category-block textarea { margin-bottom: 0; background-color: var(--bg-white); }
.optional-badge { font-size: 11px; font-weight: normal; color: var(--text-muted); }
.rating-badge.large { width: 90px; height: 90px; font-size: 28px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-top: 20px; }
.tl-drop-zone.drag-over { outline: 2px dashed var(--accent-yellow); background: rgba(255,193,7,0.08) !important; }
.tl-tier-row { border: 2px solid transparent; transition: border-color 0.15s; }
.tl-tier-row.tl-tier-drag-over { border-color: var(--accent-yellow) !important; }
.tl-item-drag-over { outline: 2px solid var(--accent-yellow) !important; border-radius: 6px; opacity: 0.7; }
.news-card { background: var(--bg-gray); border-radius: var(--border-radius); overflow: hidden; transition: transform 0.2s; border: 1px solid #E0E0E0; display: flex; flex-direction: column; min-width: 250px; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.news-content h3 { font-size: 16px; margin-bottom: 10px; line-height: 1.4; color: var(--text-dark); }
.news-content p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; color: var(--accent-yellow); text-transform: uppercase; }
.news-link { color: var(--text-dark); text-decoration: none; background: var(--accent-yellow); padding: 5px 10px; border-radius: 5px; }

.dropdown-menu { position: absolute; top: 50px; right: 0; background: var(--bg-white); border: 1px solid #E0E0E0; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 180px; z-index: 100; padding: 8px 0; animation: fadeIn 0.2s ease-out; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--text-dark); cursor: pointer; transition: background 0.2s; }
.dropdown-item:hover { background-color: var(--bg-gray); }
.dropdown-item .material-symbols-outlined { font-size: 20px; color: var(--text-muted); }
.dropdown-divider { height: 1px; background-color: #F0F0F0; margin: 8px 0; }
.dropdown-item.logout { color: #FF4444; }
.dropdown-item.logout .material-symbols-outlined { color: #FF4444; }

/* ── Merged "Activity" bell (notifications + messages) — mobile only ── */
.activity-tabs { display: none; }
.activity-tab { flex: 1; background: none; border: none; padding: 10px; font-weight: 700; font-size: 12px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.activity-tab.active { color: var(--text-dark); border-bottom-color: var(--accent-yellow); }
.activity-combined-badge { display: none; }

/* ── Direct Messages ── */
.chat-modal-content { max-width: 480px; width: 90%; height: 78vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: var(--bg-white); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-gray); }
.chat-input-row { padding: 10px 14px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; align-items: center; flex-shrink: 0; background: var(--bg-white); }
.chat-input-row input { flex: 1; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--bg-gray); outline: none; font-size: 14px; color: var(--text-dark); font-family: 'Inter', sans-serif; }
.chat-input-row input:focus { border-color: var(--accent-yellow); }
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 18px; font-size: 14px; word-break: break-word; line-height: 1.45; }
.chat-bubble-me { background: var(--accent-yellow); color: #1a1a1a; border-bottom-right-radius: 4px; }
.chat-bubble-them { background: var(--bg-white); color: var(--text-dark); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
@media (max-width: 860px) { .chat-modal-content { height: 88vh; width: 100%; max-width: 100%; border-radius: var(--border-radius) var(--border-radius) 0 0; align-self: flex-end; } }

/* ── Genre chips ── */
.genre-chip { background: var(--bg-gray-darker); color: var(--text-muted); border: 1px solid transparent; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.genre-chip.active { background: var(--accent-yellow); color: #1a1a1a; border-color: var(--accent-yellow); }
.genre-chip:hover:not(.active) { border-color: var(--accent-yellow); color: var(--text-dark); }

/* ── Achievements ── */
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.achievement-card { background: var(--bg-gray); border-radius: 12px; padding: 16px 12px; text-align: center; border: 1px solid transparent; transition: all 0.2s; position: relative; }
.achievement-card.earned { border-color: var(--accent-yellow); background: var(--accent-yellow-light); }
.achievement-card.locked { opacity: 0.38; filter: grayscale(0.8); }
.achievement-card .ach-icon { font-size: 34px; display: block; margin-bottom: 8px; color: var(--text-muted); }
.achievement-card.earned .ach-icon { color: inherit; }
.achievement-card .ach-name { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: var(--text-dark); }
.achievement-card .ach-desc { font-size: 11px; color: var(--text-muted); line-height: 1.45; }
.achievement-card .ach-date { font-size: 10px; color: var(--accent-yellow); margin-top: 6px; font-weight: 700; }

@keyframes slideInToast {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.profile-header-wrap { position: relative; border-radius: var(--border-radius); margin-bottom: 20px; }
.profile-banner { width: 100%; min-height: 260px; background-size: cover; background-position: center; border-radius: var(--border-radius); position: relative; display: flex; flex-direction: column; justify-content: flex-end; background-color: var(--bg-gray); }
.profile-banner-overlay { background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%); padding: 20px 24px 22px; border-radius: 0 0 var(--border-radius) var(--border-radius); }
.profile-avatar-large { width: 80px; height: 80px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.55); flex-shrink: 0; object-fit: cover; }
.profile-card { background: var(--bg-white); border: 1px solid #E0E0E0; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.profile-card h4 { font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 15px; letter-spacing: 1px; }
.profile-stat-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.profile-stat-row strong { color: var(--text-dark); }
.profile-tabs { display: flex; gap: 20px; border-bottom: 2px solid #F0F0F0; margin-bottom: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.p-tab { background: none; border: none; padding: 10px 5px; font-weight: 600; font-size: 15px; color: var(--text-muted); cursor: pointer; position: relative; white-space: nowrap; flex-shrink: 0; }
.p-tab.active { color: var(--text-dark); }
.p-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: var(--accent-yellow); }

.detail-tabs { display: flex; gap: 20px; border-bottom: 2px solid var(--border-color); margin: 5px 0 25px; }
.detail-tab { background: none; border: none; padding: 10px 5px; font-weight: 600; font-size: 15px; color: var(--text-muted); cursor: pointer; position: relative; }
.detail-tab.active { color: var(--text-dark); }
.detail-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: var(--accent-yellow); }

.episode-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.episode-row { display: flex; align-items: center; gap: 15px; padding: 12px 15px; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 10px; transition: background 0.15s; }
.episode-row:hover { background: var(--bg-gray); }
.ep-num { font-size: 13px; font-weight: 700; color: var(--text-muted); min-width: 28px; text-align: center; }
.ep-info { flex: 1; min-width: 0; }
.ep-title { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-meta { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ep-score-area { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ep-avg { font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.ep-score-btn { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--bg-gray); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-dark); transition: all 0.15s; white-space: nowrap; }
.ep-score-btn:hover { border-color: var(--accent-yellow); background: var(--accent-yellow-light); }
.ep-score-btn.scored { background: var(--accent-yellow); border-color: var(--accent-yellow); color: #333; }

.guestbook-input { margin-bottom: 25px; }
.guestbook-input textarea { width: 100%; border-radius: 12px; border: 1px solid #E0E0E0; padding: 15px; font-family: inherit; resize: none; margin-bottom: 10px; }
.user-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--bg-gray); padding: 5px 12px; border-radius: 20px; font-size: 13px; border: 1px solid #E0E0E0; cursor: pointer; transition: background 0.2s;}
.user-chip:hover { background: #E0E0E0; }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }

.list-table-container { background: var(--bg-white); border-radius: var(--border-radius); border: 1px solid #E0E0E0; overflow: hidden; }
.anime-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.anime-list-table th { background-color: var(--bg-gray); padding: 15px; text-align: left; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; user-select: none; }
.anime-list-table th:hover { color: var(--text-dark); }
.sortable-col { cursor: pointer; white-space: nowrap; }
.sort-icon { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 2px; opacity: 0.4; transition: opacity 0.2s; }
.sort-icon .material-symbols-outlined { font-size: 15px; }
.sortable-col:hover .sort-icon { opacity: 1; }
.sort-icon.active { opacity: 1; color: var(--accent-yellow); }
.anime-list-table td { padding: 15px; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
.anime-list-table tr:last-child td { border-bottom: none; }
.anime-list-table tr:hover { background-color: var(--bg-gray); }
.list-status-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; display: inline-block; }
.status-watching { background: #E3F2FD; color: #1E88E5; }
.status-completed { background: #E8F5E9; color: #43A047; }
.status-on-hold { background: #FFF3E0; color: #F8A100; }
.status-dropped { background: #FFEBEE; color: #E53935; }
.status-plan-to-watch { background: #F3E5F5; color: #8E24AA; }

.profile-layout-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 36px; align-items: start; }
.detail-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.detail-sidebar { width: 100%; }
.detail-sidebar img { width: 100%; height: auto; max-width: 250px; object-fit: cover; border-radius: var(--border-radius); display: block; margin-bottom: 15px; }

details > summary { list-style: none; transition: background-color 0.2s; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { background-color: var(--bg-gray); }
details[open] summary .material-symbols-outlined { transform: rotate(180deg); }
details summary .material-symbols-outlined { transition: transform 0.2s ease; }

.tooltip-icon { position: relative; cursor: help; display: inline-flex; align-items: center; justify-content: center; }
.tooltip-icon::after { content: attr(data-tooltip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: white; padding: 10px 14px; border-radius: 8px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: normal; width: 220px; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 100; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.tooltip-icon::before { content: ''; position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: rgba(0,0,0,0.85) transparent transparent transparent; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 100; }
.tooltip-icon:hover::after, .tooltip-icon:hover::before { opacity: 1; transform: translateX(-50%) translateY(-2px); }

/* NEW: Notification Dropdown Styles */
.notif-item { padding: 15px; border-bottom: 1px solid #F0F0F0; display: flex; gap: 12px; align-items: flex-start; transition: background 0.2s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-gray); }
.notif-item.unread { background: var(--accent-yellow-light); border-left: 3px solid var(--accent-yellow); padding-left: 12px; }
.notif-item img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; flex-shrink: 0; cursor: pointer;}
.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; color: var(--text-dark); margin-bottom: 4px; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); }

/* Top 10 Podium */
.podium-container { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-bottom: 40px; padding-top: 10px; }
.podium-item {
    display: flex; flex-direction: column; align-items: center; cursor: pointer;
    background: var(--bg-gray); border-radius: 16px 16px 0 0; padding: 16px 16px 0;
    text-align: center; position: relative;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s;
}
.podium-item:hover { transform: translateY(-8px); box-shadow: 0 20px 35px rgba(0,0,0,0.12); }
.podium-item img { border-radius: 10px; object-fit: cover; margin-bottom: 10px; display: block; }
.podium-1 img { width: 150px; height: 210px; }
.podium-2 img, .podium-3 img { width: 115px; height: 165px; }
.podium-item h4 { font-weight: 600; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.podium-1 h4 { font-size: 15px; width: 150px; }
.podium-2 h4, .podium-3 h4 { font-size: 13px; width: 115px; }
.podium-rank-change { height: 22px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
.podium-step {
    width: calc(100% + 32px); margin: 12px -16px 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; color: rgba(255,255,255,0.92); flex-shrink: 0;
}
.step-1 { background: linear-gradient(135deg, #FFC107, #FF8F00); height: 72px; font-size: 40px; }
.step-2 { background: linear-gradient(135deg, #CFD8DC, #78909C); height: 56px; font-size: 32px; }
.step-3 { background: linear-gradient(135deg, #CD7F32, #7B4100); height: 44px; font-size: 28px; }

/* Historical achievement badges */
.hist-badges { display: flex; gap: 3px; margin-bottom: 6px; justify-content: center; }
.hist-badge { font-size: 18px !important; cursor: help; }
.hist-gem { color: #FFC107 !important; }
.hist-silver { color: #90A4AE !important; }
.hist-bronze { color: #A0522D !important; }

/* Rank movement indicators */
.change-up { color: #4CAF50; font-weight: 700; font-size: 13px; }
.change-down { color: #F44336; font-weight: 700; font-size: 13px; }
.change-same { color: var(--text-muted); font-size: 13px; }

/* Top 10 List (ranks 4-10) */
.top10-list-container { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.top10-list-item {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-gray); border-radius: 12px; padding: 12px 16px;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid transparent;
}
.top10-list-item:hover { transform: translateX(5px); box-shadow: 0 4px 12px rgba(0,0,0,0.07); border-color: #E0E0E0; }
.top10-list-item img { width: 44px; height: 64px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.list-rank-number { font-size: 20px; font-weight: 900; color: var(--text-muted); width: 26px; text-align: center; flex-shrink: 0; }
.rank-change-col { width: 22px; text-align: center; flex-shrink: 0; }
.top10-scores { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

@media (max-width: 600px) {
    .top10-list-item { gap: 8px; padding: 10px 10px; }
    .top10-list-item img { width: 36px; height: 52px; }
    .list-rank-number { font-size: 15px; width: 18px; }
    .rank-change-col { width: 14px; font-size: 11px; }
    .top10-scores { flex-direction: column; gap: 3px; }
    .top10-wb-badge { width: 40px !important; height: 40px !important; font-size: 11px !important; }
    .top10-mal-badge { width: 34px !important; height: 34px !important; font-size: 10px !important; }
    .top10-list-item h3 { font-size: 13px !important; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Anime Detail Page — WeeBee rank achievement badges */
.detail-rank-badges { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-rank-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 700; cursor: default;
    position: relative;
}
.detail-rank-badge .material-symbols-outlined { font-size: 19px; }
.hist-gem-badge { background: rgba(255,193,7,0.12); color: #8a6500; border: 1px solid rgba(255,193,7,0.45); }
.hist-gem-badge .material-symbols-outlined { color: #FFC107; }
.hist-silver-badge { background: rgba(144,164,174,0.12); color: #37474F; border: 1px solid rgba(144,164,174,0.45); }
.hist-silver-badge .material-symbols-outlined { color: #90A4AE; }
.hist-bronze-badge { background: rgba(160,82,45,0.12); color: #6D3B00; border: 1px solid rgba(160,82,45,0.45); }
.hist-bronze-badge .material-symbols-outlined { color: #CD7F32; }
.detail-rank-badge::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.85); color: white;
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 500; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 200;
}
.detail-rank-badge::before {
    content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: rgba(0,0,0,0.85);
    opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 200;
}
.detail-rank-badge:hover::after, .detail-rank-badge:hover::before { opacity: 1; }

/* Settings Modal */
.settings-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid var(--border-color);
}
.settings-row-info { display: flex; align-items: center; gap: 14px; }
.settings-row-info .material-symbols-outlined { font-size: 22px; color: var(--text-muted); }
.settings-row-label { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.settings-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    display: block; width: 48px; height: 26px;
    background: var(--bg-gray-darker); border-radius: 13px;
    transition: background 0.25s;
    position: relative;
}
.toggle-switch input:checked + .toggle-track { background: var(--accent-yellow); }
.toggle-thumb {
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.25s;
}

/* --- BUZZWORD GAMES --- */
@keyframes wpFlip { 0% { transform:rotateX(-90deg); opacity:0; } 100% { transform:rotateX(0deg); opacity:1; } }
.wordle-header-row { display:flex; gap:6px; margin-bottom:8px; }
.wordle-col-header { flex:1; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); text-align:center; padding:4px 2px; }
.bw-tip { position:relative; display:inline-flex; align-items:center; justify-content:center; cursor:default; }
.bw-tip-icon { font-size:11px; color:var(--text-muted); opacity:0.7; margin-left:3px; vertical-align:middle; cursor:help; user-select:none; }
.bw-tip-icon:hover { opacity:1; }
.bw-tip .bw-tip-box { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:#222; color:#fff; font-size:11px; font-weight:500; text-transform:none; letter-spacing:0; padding:7px 10px; border-radius:8px; white-space:nowrap; z-index:999; box-shadow:0 4px 12px rgba(0,0,0,0.4); pointer-events:none; line-height:1.5; }
.bw-tip .bw-tip-box::after { content:''; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:5px solid transparent; border-top-color:#222; }
.bw-tip:hover .bw-tip-box { display:block; }
.wordle-char-header { width:100px; min-width:100px; flex:0 0 100px; }
.wordle-row { display:flex; gap:6px; margin-bottom:6px; }
.wordle-char-cell { width:100px; min-width:100px; flex:0 0 100px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:8px 4px; background:var(--bg-gray-darker); border-radius:10px; }
.wordle-cell { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:8px 4px; border-radius:10px; font-size:15px; font-weight:700; color:white; min-height:82px; line-height:1.4; word-break:break-word; }
.wordle-cell.green  { background:#2e7d32; }
.wordle-cell.yellow { background:#c49a00; }
.wordle-cell.red    { background:#b71c1c; }
.wordle-search-wrap { position:relative; }
.wordle-suggestions { display:none; position:absolute; bottom:100%; left:0; right:0; margin-bottom:4px; background:var(--bg-white); border:1px solid var(--border-color); border-radius:10px; z-index:50; max-height:240px; overflow-y:auto; box-shadow:0 -4px 16px rgba(0,0,0,0.12); }
.wordle-suggestion-item { padding:11px 16px; cursor:pointer; font-size:14px; font-weight:600; color:var(--text-dark); border-bottom:1px solid var(--border-color); }
.wordle-suggestion-item:last-child { border-bottom:none; }
.wordle-suggestion-item:hover { background:var(--bg-gray); }

/* --- BUZZWORD BANNERS --- */
/* Light mode: subtle colored tint on card background */
.bw-banner-hero { background: linear-gradient(135deg, rgba(139,0,0,0.07) 0%, rgba(90,50,0,0.07) 35%, rgba(13,59,85,0.07) 100%); border-color: rgba(100,100,100,0.15) !important; }
.bw-banner-op   { background: rgba(183,28,28,0.08);  border-color: rgba(139,0,0,0.2) !important; }
.bw-banner-nrt  { background: rgba(230,81,0,0.08);   border-color: rgba(180,90,0,0.2) !important; }
.bw-banner-blc  { background: rgba(2,119,189,0.08);  border-color: rgba(0,100,160,0.2) !important; }
.bw-banner-db   { background: rgba(191,54,12,0.08);  border-color: rgba(160,60,0,0.2) !important; }

/* Light mode: make text dark since background is now light */
.bw-banner-op  [style*="color:#FFD700"]             { color: #7b0000 !important; }
.bw-banner-nrt [style*="color:#FF8C00"]             { color: #7a3500 !important; }
.bw-banner-blc [style*="color:#00BCD4"]             { color: #005f80 !important; }
.bw-banner-db  [style*="color:#FF6F00"]             { color: #7a2800 !important; }
.bw-banner-op [style*="rgba(255,255,255"],
.bw-banner-nrt [style*="rgba(255,255,255"],
.bw-banner-blc [style*="rgba(255,255,255"],
.bw-banner-db  [style*="rgba(255,255,255"],
.bw-banner-hero [style*="rgba(255,255,255"]         { color: rgba(0,0,0,0.55) !important; }
.bw-banner-hero [style*="color:white"]              { color: var(--text-dark) !important; }

/* Dark mode: restore original dark gradients and text colors */
[data-theme="dark"] .bw-banner-hero { background: linear-gradient(135deg, #1a0000 0%, #1a0a00 35%, #0d1b2a 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .bw-banner-op   { background: linear-gradient(135deg, #1a0000 0%, #3d0000 60%, #6b0000 100%); border-color: #8B0000 !important; }
[data-theme="dark"] .bw-banner-nrt  { background: linear-gradient(135deg, #1a1500 0%, #3a2e00 60%, #5c4a00 100%); border-color: var(--accent-yellow) !important; }
[data-theme="dark"] .bw-banner-blc  { background: linear-gradient(135deg, #0d1b2a 0%, #0a2a3d 60%, #0d3b55 100%); border-color: #006080 !important; }
[data-theme="dark"] .bw-banner-db   { background: linear-gradient(135deg, #1a0a00 0%, #2d1200 60%, #4a1f00 100%); border-color: #FF6F00 !important; }
[data-theme="dark"] .bw-banner-op  [style*="color:#FFD700"]  { color: #FFD700 !important; }
[data-theme="dark"] .bw-banner-nrt [style*="color:#FF8C00"]  { color: #FF8C00 !important; }
[data-theme="dark"] .bw-banner-blc [style*="color:#00BCD4"]  { color: #00BCD4 !important; }
[data-theme="dark"] .bw-banner-db  [style*="color:#FF6F00"]  { color: #FF6F00 !important; }
[data-theme="dark"] .bw-banner-op  [style*="rgba(255,255,255"],
[data-theme="dark"] .bw-banner-nrt [style*="rgba(255,255,255"],
[data-theme="dark"] .bw-banner-blc [style*="rgba(255,255,255"],
[data-theme="dark"] .bw-banner-db  [style*="rgba(255,255,255"],
[data-theme="dark"] .bw-banner-hero [style*="rgba(255,255,255"] { color: rgba(255,255,255,0.75) !important; }
[data-theme="dark"] .bw-banner-hero [style*="color:white"]    { color: white !important; }

/* --- TIER LIST BANNER --- */
.tl-banner-hero { background: rgba(74,20,140,0.07); border:1px solid rgba(100,100,100,0.15); }
.tl-banner-hero [style*="color:white"]              { color: var(--text-dark) !important; }
.tl-banner-hero [style*="rgba(255,255,255"]         { color: rgba(0,0,0,0.55) !important; }
.tl-banner-hero [style*="color:#FFC107"]            { color: #7a5800 !important; }
[data-theme="dark"] .tl-banner-hero                 { background: linear-gradient(135deg, #1a0a2e 0%, #2d1054 60%, #1a0a2e 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .tl-banner-hero [style*="color:white"]              { color: white !important; }
[data-theme="dark"] .tl-banner-hero [style*="rgba(255,255,255"]         { color: rgba(255,255,255,0.75) !important; }
[data-theme="dark"] .tl-banner-hero [style*="color:#FFC107"]            { color: #FFC107 !important; }

/* --- HOT TAKES BANNER --- */
.ht-banner-hero { background: rgba(255,69,0,0.07); border:1px solid rgba(100,100,100,0.15); }
.ht-banner-hero [style*="color:white"]              { color: var(--text-dark) !important; }
.ht-banner-hero [style*="rgba(255,255,255"]         { color: rgba(0,0,0,0.55) !important; }
[data-theme="dark"] .ht-banner-hero                 { background: linear-gradient(135deg, #2a0a00 0%, #3d1500 60%, #2a0a00 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .ht-banner-hero [style*="color:white"]              { color: white !important; }
[data-theme="dark"] .ht-banner-hero [style*="rgba(255,255,255"]         { color: rgba(255,255,255,0.75) !important; }

/* --- POLLS BANNER --- */
.polls-banner-hero { background: rgba(33,150,243,0.07); border:1px solid rgba(100,100,100,0.15); }
.polls-banner-hero [style*="color:white"]              { color: var(--text-dark) !important; }
.polls-banner-hero [style*="rgba(255,255,255"]         { color: rgba(0,0,0,0.55) !important; }
[data-theme="dark"] .polls-banner-hero                 { background: linear-gradient(135deg, #0a1929 0%, #0d2137 60%, #1a0a2e 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .polls-banner-hero [style*="color:white"]              { color: white !important; }
[data-theme="dark"] .polls-banner-hero [style*="rgba(255,255,255"]         { color: rgba(255,255,255,0.75) !important; }

/* --- BRACKETS BANNER --- */
.brackets-banner-hero { background: rgba(255,193,7,0.07); border:1px solid rgba(100,100,100,0.15); }
.brackets-banner-hero [style*="color:white"]              { color: var(--text-dark) !important; }
.brackets-banner-hero [style*="rgba(255,255,255"]         { color: rgba(0,0,0,0.55) !important; }
[data-theme="dark"] .brackets-banner-hero                 { background: linear-gradient(135deg, #1a1200 0%, #2d2000 60%, #1a1200 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .brackets-banner-hero [style*="color:white"]              { color: white !important; }
[data-theme="dark"] .brackets-banner-hero [style*="rgba(255,255,255"]         { color: rgba(255,255,255,0.75) !important; }

/* --- TRIVIA BANNER --- */
.trivia-banner-hero { background: rgba(156,39,176,0.07); border:1px solid rgba(100,100,100,0.15); }
.trivia-banner-hero [style*="color:white"]      { color: var(--text-dark) !important; }
.trivia-banner-hero [style*="rgba(255,255,255"] { color: rgba(0,0,0,0.55) !important; }
.trivia-banner-hero [style*="color:#CE93D8"]    { color: #7b1fa2 !important; }
[data-theme="dark"] .trivia-banner-hero                 { background: linear-gradient(135deg, #1a0533 0%, #110d2e 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .trivia-banner-hero [style*="color:white"]      { color: white !important; }
[data-theme="dark"] .trivia-banner-hero [style*="rgba(255,255,255"] { color: rgba(255,255,255,0.75) !important; }
[data-theme="dark"] .trivia-banner-hero [style*="color:#CE93D8"]    { color: #CE93D8 !important; }

/* --- MELOBEE BANNER --- */
.melobee-banner-hero { background: rgba(34,197,94,0.07); border:1px solid rgba(100,100,100,0.15); }
.melobee-banner-hero [style*="color:white"]      { color: var(--text-dark) !important; }
.melobee-banner-hero [style*="rgba(255,255,255"] { color: rgba(0,0,0,0.55) !important; }
[data-theme="dark"] .melobee-banner-hero                 { background: linear-gradient(135deg, #0a2e1a 0%, #0d2b14 100%); border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .melobee-banner-hero [style*="color:white"]      { color: white !important; }
[data-theme="dark"] .melobee-banner-hero [style*="rgba(255,255,255"] { color: rgba(255,255,255,0.75) !important; }

/* --- ADVANCED ANIME SEARCH --- */
.adv-search-trigger-btn { background:var(--accent-yellow); color:#1a1a1a; font-weight:700; }
.adv-search-modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    width: 90vw;
    max-width: 900px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.adv-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
#adv-search-main-view, #adv-archive-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
.adv-search-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.adv-search-input {
    flex: 1;
    background: var(--bg-gray);
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
}
.adv-search-input:focus { box-shadow: 0 0 0 2px var(--accent-yellow); }
.adv-filter-row {
    display: flex;
    gap: 12px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.adv-filter-group { display:flex; flex-direction:column; gap:4px; }
.adv-filter-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); }
.adv-select {
    background: var(--bg-gray);
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size:13px;
    color: var(--text-dark);
    cursor: pointer;
    outline: none;
}
.adv-genre-section {
    padding: 12px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.adv-genre-chips { display:flex; flex-wrap:wrap; gap:8px; }
.adv-genre-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.adv-genre-chip:hover { border-color: var(--accent-yellow); color: var(--accent-yellow); }
.adv-genre-chip.selected { background: var(--accent-yellow); border-color: var(--accent-yellow); color: #1a1a1a; }
.adv-results-scroll-wrap {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.adv-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px 6px;
}
.adv-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
    padding: 10px 22px 20px;
}
.adv-anime-card {
    background: var(--bg-gray);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}
.adv-anime-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.adv-anime-card-img { width:100%; padding-top:145%; position:relative; overflow:hidden; border-radius:8px 8px 0 0; }
.adv-anime-card-img img { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; display:block; }
.adv-anime-card-body { padding:8px 8px 10px; flex:1; display:flex; flex-direction:column; justify-content:space-between; }
.adv-anime-card-title { font-size:12px; font-weight:700; line-height:1.3; margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.adv-anime-card-meta { font-size:11px; color:var(--text-muted); margin-bottom:6px; }
.adv-anime-card-score { font-size:12px; font-weight:700; color:var(--accent-yellow); margin-bottom:6px; }
.adv-quick-add-btn {
    width: 100%;
    padding: 5px;
    border-radius: 6px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.adv-quick-add-btn:hover { border-color: var(--accent-yellow); color: var(--accent-yellow); }
.adv-quick-add-btn.in-list { background: var(--accent-yellow); border-color: var(--accent-yellow); color: #1a1a1a; }

/* Seasonal Archive */
.adv-archive-table { width:100%; border-collapse:collapse; font-size:13px; }
.adv-archive-table th { padding:10px 14px; text-align:center; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); border-bottom:1px solid var(--border-color); }
.adv-archive-table th:first-child { text-align:left; }
.adv-archive-table td { padding:6px 14px; border-bottom:1px solid var(--border-color); }
.adv-archive-table td:first-child { font-weight:700; color:var(--text-dark); }
.adv-season-btn {
    background: var(--bg-gray);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    transition: all 0.15s;
}
.adv-season-btn:hover { background: var(--accent-yellow); color: #1a1a1a; }
#adv-archive-content { flex:1; overflow-y:auto; padding:16px 22px; min-height:0; }
.toggle-switch input:checked + .toggle-track .toggle-thumb { transform: translateX(22px); }

/* ── MOBILE FIXES ── */

/* #1 — Anime detail: centered cover, info below */
@media (max-width: 860px) {
    .detail-sidebar {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .detail-sidebar > img {
        width: 160px !important; height: 228px !important; max-width: 160px !important;
        margin: 0 auto !important;
    }
    .detail-sidebar > .stat-box { width: 100% !important; min-width: 0 !important; flex: unset !important; overflow-x: auto; }
    .detail-sidebar > .action-btn { width: 100% !important; flex: unset !important; max-width: 100% !important; }

    /* #2 — BuzzWord feed: hide thumb on mobile, fix header overflow */
    .bw-thumb-wrapper { display: none !important; }
    .review-header[style*="padding-right"] { padding-right: 0 !important; }
    .bw-emoji-grid { font-size: 13px !important; letter-spacing: 1px !important; line-height: 1.9 !important; padding-right: 0 !important; }

    /* #3 — BuzzWord game modals: full-screen bottom sheet */
    #bwop-modal, #bwnrt-modal, #bwblc-modal { align-items: flex-end; }
    #bwop-modal .modal-content,
    #bwnrt-modal .modal-content,
    #bwblc-modal .modal-content {
        width: 100vw !important; max-width: 100vw !important;
        max-height: 92vh !important;
        border-radius: 16px 16px 0 0 !important;
        margin: 0; padding: 16px !important;
        display: flex; flex-direction: column;
    }
    .bw-grid-scroll-area {
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        padding-bottom: 6px; margin-bottom: 8px;
        flex-shrink: 0;
    }
    .wordle-header-row, .wordle-row { min-width: 480px; flex-wrap: nowrap; }
    .wordle-cell { font-size: 11px !important; min-height: 58px !important; padding: 4px 2px !important; }
    .wordle-char-cell { width: 76px !important; min-width: 76px !important; flex: 0 0 76px !important; }
    .wordle-col-header { font-size: 9px !important; }

    /* #5 — My List: no horizontal scroll, hide progress, shrink image */
    .anime-list-table { min-width: unset !important; font-size: 12px; }
    .anime-list-table th:nth-child(5), .anime-list-table td:nth-child(5) { display: none; }
    .anime-list-table td:nth-child(2) img { width: 32px !important; height: 44px !important; }
    .anime-list-table td:nth-child(3) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .list-status-badge { font-size: 10px !important; padding: 3px 6px !important; }

    /* #6 — Discover seasonal vote: 2 columns instead of 5 */
    .seasonal-vote-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .seasonal-vote-grid img { height: 150px !important; }

    /* Advanced search modal: full screen on mobile */
    .adv-search-modal-content { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
    .adv-filter-row { gap: 8px; }
    .adv-select { font-size: 12px; padding: 6px 8px; }
}
/* ── TCG Card System (admin prototype) ── */
.wb-card {
    width: 220px;
    height: 308px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    font-family: inherit;
    flex-shrink: 0;
    transform: translateZ(0);
}
.wb-card.rarity-common {
    background: linear-gradient(160deg, #c7ccd1 0%, #9aa1a8 50%, #7d848c 100%);
    padding: 7px;
}
.wb-card.rarity-rare {
    background: linear-gradient(160deg, #fde68a 0%, #f59e0b 45%, #b45309 100%);
    padding: 7px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 24px rgba(245,158,11,0.4);
}
.wb-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    background: #20242b;
    display: flex;
    flex-direction: column;
}
.wb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    z-index: 2;
}
.rarity-common .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(to bottom,
        rgba(20,22,28,0.97) 0%,
        rgba(20,22,28,0.86) 30%,
        rgba(20,22,28,0.62) 58%,
        rgba(20,22,28,0.32) 82%,
        transparent 100%);
    padding-bottom: 34px;
}
.rarity-rare .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 100%);
}
.wb-mark {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.wb-rarity-gem {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    flex-shrink: 0;
}
.wb-rarity-gem span { font-size: 0; }
.rarity-common .wb-rarity-gem { background: linear-gradient(145deg, #e2e6ea, #9aa1a8); }
.rarity-rare   .wb-rarity-gem { background: linear-gradient(145deg, #fde68a, #d97706); box-shadow: 0 2px 10px rgba(245,158,11,0.6); }
/* 1-of-1 founder gift cards — gold "Founder" label in place of the serial number */
.wb-founder-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff7c2, #ffd700 40%, #b8860b 70%, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 8px rgba(255,215,0,0.4);
}
.wb-card-art {
    position: relative;
    overflow: hidden;
    flex: 1;
}
.rarity-rare .wb-card-art,
.rarity-common .wb-card-art {
    position: absolute;
    inset: 0;
}
.wb-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.rarity-rare .wb-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,16,0.85) 0%, transparent 38%);
    z-index: 1;
}
.wb-card-footer {
    padding: 10px 14px 12px;
    z-index: 2;
    text-align: left;
}
.rarity-common .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top,
        rgba(20,22,28,0.97) 0%,
        rgba(20,22,28,0.86) 30%,
        rgba(20,22,28,0.62) 58%,
        rgba(20,22,28,0.32) 82%,
        transparent 100%);
    padding-top: 34px;
}
.rarity-rare .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: transparent;
}
.wb-card-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    line-height: 1.15;
}
.wb-card-series {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wb-card-rarity-label {
    display: inline-block;
    margin-top: 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}
.rarity-common .wb-card-rarity-label { background: rgba(255,255,255,0.10); color: #c7ccd1; }
.rarity-rare   .wb-card-rarity-label { background: rgba(245,158,11,0.18); color: #fde68a; border-color: rgba(253,230,138,0.4); }

/* Monthly Prize Wheel UR card — date stamp badge */
.wb-card-stamp {
    display: inline-block;
    margin-top: 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid rgba(245,158,11,0.5);
    background: rgba(245,158,11,0.15);
    color: #fde68a;
}

/* SR rarity — cool holo/prismatic frame, full art + foil sheen, one notch fancier than Rare */
.wb-card.rarity-sr {
    background: linear-gradient(155deg, #ddd6fe 0%, #a78bfa 30%, #6366f1 65%, #4338ca 100%);
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 24px rgba(139,92,246,0.5);
}
.rarity-sr .wb-card-art { position: absolute; inset: 0; }
.rarity-sr .wb-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,16,0.85) 0%, transparent 38%);
    z-index: 1;
}
.rarity-sr .wb-card-art::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(221,214,254,0.30) 42%,
        rgba(99,102,241,0.22) 50%,
        rgba(244,114,182,0.28) 58%,
        transparent 70%);
    mix-blend-mode: screen;
    z-index: 2;
    pointer-events: none;
}
.rarity-sr .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(30,20,55,0.55) 0%, transparent 100%);
    z-index: 3;
}
.rarity-sr .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: transparent;
    z-index: 3;
}
.rarity-sr .wb-rarity-gem {
    background: linear-gradient(145deg, #ede9fe, #8b5cf6 55%, #4c1d95);
    box-shadow: 0 2px 12px rgba(139,92,246,0.7);
    border-radius: 4px;
    transform: rotate(45deg);
    width: 18px;
    height: 18px;
}
.rarity-sr .wb-rarity-gem span { display:inline-block; transform: rotate(-45deg); }
.rarity-sr .wb-card-rarity-label { background: rgba(139,92,246,0.20); color: #ede9fe; border-color: rgba(221,214,254,0.4); }

/* SSR rarity — prismatic animated rainbow border + holographic hover shimmer */
.wb-card.rarity-ssr {
    background: linear-gradient(135deg,
        #00ffe7 0%, #00c8ff 20%, #5b6fff 45%, #a020ff 70%, #ff40d0 85%, #00ffe7 100%);
    background-size: 300% 300%;
    animation: ssr-prismatic 6s ease infinite;
    animation-play-state: paused;
    padding: 6px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6),
                0 0 36px rgba(0,200,255,0.55),
                0 0 80px rgba(160,32,255,0.45);
    contain: paint;
}
.wb-card.rarity-ssr.tcg-anim-in-view {
    animation-play-state: running;
}
@keyframes ssr-prismatic {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes tcg-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.7; }
}
/* Holographic shimmer overlay — position/color follows mouse via --mx/--my CSS vars set by JS */
.wb-card.rarity-ssr::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(
            ellipse at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%),
            rgba(255,255,255,0.38) 0%,
            transparent 55%
        ),
        linear-gradient(
            calc(var(--mx, 0.5) * 200deg + 30deg),
            transparent 10%,
            rgba(0, 245, 212, 0.25) 25%,
            rgba(0, 212, 255, 0.25) 38%,
            rgba(77, 150, 255, 0.25) 50%,
            rgba(124, 92, 255, 0.25) 62%,
            rgba(0, 245, 212, 0.25) 75%,
            transparent 88%
        );
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wb-card.rarity-ssr:hover::after { opacity: 1; }
.rarity-ssr .wb-card-art { position: absolute; inset: 0; }
.rarity-ssr .wb-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,8,20,0.88) 0%, transparent 40%);
    z-index: 1;
}
.rarity-ssr .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(15,5,35,0.65) 0%, transparent 100%);
    z-index: 3;
}
.rarity-ssr .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: transparent;
    z-index: 3;
}
.rarity-ssr .wb-rarity-gem {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    width: 22px;
    height: 22px;
    clip-path: none;
    animation: none;
}
/* Bright prismatic border pentagon — larger, sits behind ::after */
.rarity-ssr .wb-rarity-gem::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #ffffff, #e0fffc, #ededff, #ffe0ff, #e0fffc, #ffffff);
    background-size: 300% 300%;
    clip-path: polygon(50% 0%, 98% 35%, 79% 91%, 21% 91%, 2% 35%);
    filter: drop-shadow(0 0 8px rgba(0,212,255,0.8)) drop-shadow(0 0 4px rgba(160,32,255,0.5));
    animation: ssr-prismatic 6s ease infinite;
    animation-play-state: paused;
    z-index: 0;
}
/* SSR prismatic fill pentagon — sits on top of the border */
.rarity-ssr .wb-rarity-gem::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00ffe7, #00c8ff, #5b6fff, #a020ff, #ff40d0, #00ffe7);
    background-size: 300% 300%;
    clip-path: polygon(50% 0%, 98% 35%, 79% 91%, 21% 91%, 2% 35%);
    animation: ssr-prismatic 6s ease infinite;
    animation-play-state: paused;
    z-index: 1;
}
.wb-card.rarity-ssr.tcg-anim-in-view .wb-rarity-gem::before,
.wb-card.rarity-ssr.tcg-anim-in-view .wb-rarity-gem::after {
    animation-play-state: running;
}
.rarity-ssr .wb-rarity-gem span { display:inline-block; font-size: 0; position: relative; z-index: 2; }
.rarity-ssr .wb-card-rarity-label {
    background: linear-gradient(135deg, #00ffe7, #00c8ff, #5b6fff, #a020ff, #ff40d0);
    background-size: 300% 300%;
    animation: ssr-prismatic 6s ease infinite;
    animation-play-state: paused;
    color: #ffffff;
    border-color: rgba(0,200,255,0.4);
}
.wb-card.rarity-ssr.tcg-anim-in-view .wb-card-rarity-label {
    animation-play-state: running;
}
/* SSR flip card back in pack opening */
.tcg-pack-card-ssr {
    background: linear-gradient(135deg, #00f5d4, #00d4ff, #4d96ff, #7c5cff);
    background-size: 300% 300%;
    animation: ssr-prismatic 3s ease infinite;
    padding: 5px;
    box-shadow: 0 0 30px rgba(0,212,255,0.6), 0 0 55px rgba(124,92,255,0.35);
}

/* ── UR rarity — top tier, beyond SSR. Faster animated prismatic border
   plus a pulsing multi-color glow halo. ──────────────────────────────── */
.wb-card.rarity-ur {
    background: linear-gradient(135deg,
        #ffa030 0%, #ffa030 22%, #d43020 40%,
        #a00030 58%, #5c0040 78%, #ffa030 90%, #d43020 100%);
    background-size: 400% 400%;
    animation: ur-prismatic 5s ease infinite, ur-glow 3s ease-in-out infinite;
    animation-play-state: paused, paused;
    padding: 7px;
    contain: paint;
}
.wb-card.rarity-ur.tcg-anim-in-view {
    animation-play-state: running, running;
}
@keyframes ur-prismatic {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes ur-glow {
    0%, 100% {
        box-shadow: 0 12px 48px rgba(0,0,0,0.6),
                    0 0 30px rgba(192,16,46,0.5),
                    0 0 60px rgba(140,0,64,0.35),
                    0 0 100px rgba(92,0,64,0.25);
    }
    50% {
        box-shadow: 0 14px 60px rgba(0,0,0,0.65),
                    0 0 50px rgba(192,16,46,0.75),
                    0 0 95px rgba(140,0,64,0.55),
                    0 0 150px rgba(92,0,64,0.4);
    }
}
.rarity-ur .wb-card-art { position: absolute; inset: 0; }
.rarity-ur .wb-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,8,20,0.88) 0%, transparent 40%);
    z-index: 1;
}
/* Holographic shimmer overlay — follows mouse via --mx/--my (set by JS, shared with SSR) */
.wb-card.rarity-ur::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(
            ellipse at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%),
            rgba(255,255,255,0.4) 0%,
            transparent 55%
        ),
        linear-gradient(
            calc(var(--mx, 0.5) * 200deg + 30deg),
            transparent 8%,
            rgba(255, 144, 64, 0.3) 20%,
            rgba(192, 16, 46, 0.25) 35%,
            rgba(140, 0, 64, 0.25) 50%,
            rgba(92, 0, 64, 0.25) 65%,
            rgba(192, 16, 46, 0.3) 80%,
            transparent 95%
        );
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wb-card.rarity-ur:hover::after { opacity: 1; }
.rarity-ur .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(15,5,35,0.65) 0%, transparent 100%);
    z-index: 3;
}
.rarity-ur .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: transparent;
    z-index: 3;
}
.rarity-ur .wb-rarity-gem {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    width: 22px;
    height: 22px;
    clip-path: none;
    animation: none;
}
/* Bright near-white border hexagon — larger, sits behind ::after */
.rarity-ur .wb-rarity-gem::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #fff4e0, #ffd090, #ffb080, #ffd0c0, #fff4e0);
    background-size: 400% 400%;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    filter: drop-shadow(0 0 8px rgba(212,48,32,0.7)) drop-shadow(0 0 4px rgba(160,0,48,0.5));
    animation: ur-prismatic 5s ease infinite;
    animation-play-state: paused;
    z-index: 0;
}
/* UR gradient hexagon — sits on top of the border */
.rarity-ur .wb-rarity-gem::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ffa030, #ffa030, #d43020, #a00030, #5c0040);
    background-size: 400% 400%;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    animation: ur-prismatic 5s ease infinite;
    animation-play-state: paused;
    z-index: 1;
}
.wb-card.rarity-ur.tcg-anim-in-view .wb-rarity-gem::before,
.wb-card.rarity-ur.tcg-anim-in-view .wb-rarity-gem::after {
    animation-play-state: running;
}
.rarity-ur .wb-rarity-gem span { display:inline-block; font-size: 0; position: relative; z-index: 2; }
.rarity-ur .wb-card-rarity-label {
    background: linear-gradient(135deg, #ffa030, #ffa030, #d43020, #a00030, #5c0040);
    background-size: 300% 300%;
    animation: ur-prismatic 5s ease infinite;
    animation-play-state: paused;
    color: #ffffff;
    border-color: rgba(255,160,48,0.4);
}
.wb-card.rarity-ur.tcg-anim-in-view .wb-card-rarity-label {
    animation-play-state: running;
}
/* Hover-only containers (e.g. store search grid): freeze all UR/SSR animations until hovered */
[data-hover-anim-only] .wb-card.rarity-ur { animation-play-state: paused, paused !important; }
[data-hover-anim-only] .wb-card.rarity-ur:hover { animation-play-state: running, running !important; }
[data-hover-anim-only] .wb-card.rarity-ur .wb-rarity-gem::before,
[data-hover-anim-only] .wb-card.rarity-ur .wb-rarity-gem::after { animation-play-state: paused !important; }
[data-hover-anim-only] .wb-card.rarity-ur:hover .wb-rarity-gem::before,
[data-hover-anim-only] .wb-card.rarity-ur:hover .wb-rarity-gem::after { animation-play-state: running !important; }
[data-hover-anim-only] .wb-card.rarity-ur .wb-card-rarity-label { animation-play-state: paused !important; }
[data-hover-anim-only] .wb-card.rarity-ur:hover .wb-card-rarity-label { animation-play-state: running !important; }
[data-hover-anim-only] .wb-card.rarity-ssr { animation-play-state: paused, paused !important; }
[data-hover-anim-only] .wb-card.rarity-ssr:hover { animation-play-state: running, running !important; }
[data-hover-anim-only] .wb-card.rarity-ssr .wb-rarity-gem::before,
[data-hover-anim-only] .wb-card.rarity-ssr .wb-rarity-gem::after { animation-play-state: paused !important; }
[data-hover-anim-only] .wb-card.rarity-ssr:hover .wb-rarity-gem::before,
[data-hover-anim-only] .wb-card.rarity-ssr:hover .wb-rarity-gem::after { animation-play-state: running !important; }
[data-hover-anim-only] .wb-card.rarity-ssr .wb-card-rarity-label { animation-play-state: paused !important; }
[data-hover-anim-only] .wb-card.rarity-ssr:hover .wb-card-rarity-label { animation-play-state: running !important; }

/* ── 2026 Prismatic Limited Set ──────────────────────────────────────────────
   Add class wb-card--prismatic alongside any rarity class.
   The spinning conic-gradient ::before becomes the border (visible through
   the 7px padding gap). Most animations pause when off-screen via
   tcg-anim-in-view. The art light-sweep is the exception — it's hover +
   mouse-reactive only (via --mx/--my, same as SSR/UR) since a per-card
   animation loop on the art layer was the main lag source in big grids.
   ─────────────────────────────────────────────────────────────────────────── */
.wb-card--prismatic {
    background: #07070f !important;
    padding: 7px;
    animation: prismatic-outer-glow 6s ease-in-out infinite !important;
    animation-play-state: paused !important;
}
.wb-card--prismatic.tcg-anim-in-view {
    animation-play-state: running !important;
}
@keyframes prismatic-outer-glow {
    0%   { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(255,0,120,0.45),  0 0 70px rgba(80,0,220,0.2); }
    17%  { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(255,120,0,0.45),  0 0 70px rgba(200,0,0,0.2); }
    33%  { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(180,255,0,0.35),  0 0 70px rgba(0,180,0,0.2); }
    50%  { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(0,255,180,0.40),  0 0 70px rgba(0,180,200,0.2); }
    67%  { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(0,120,255,0.50),  0 0 70px rgba(80,0,255,0.2); }
    83%  { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(180,0,255,0.45),  0 0 70px rgba(255,0,180,0.2); }
    100% { box-shadow: 0 12px 48px rgba(0,0,0,0.75), 0 0 28px rgba(255,0,120,0.45),  0 0 70px rgba(80,0,220,0.2); }
}

/* Spinning washed-out holographic conic gradient — white stops between hues give a foil/CD look */
.wb-card--prismatic::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: conic-gradient(
        from 0deg,
        #ff9aaa,
        rgba(255,255,255,0.85),
        #ffcc88,
        rgba(255,255,255,0.85),
        #fff099,
        rgba(255,255,255,0.85),
        #99ffcc,
        rgba(255,255,255,0.85),
        #88ddff,
        rgba(255,255,255,0.85),
        #bb99ff,
        rgba(255,255,255,0.85),
        #ff99dd,
        rgba(255,255,255,0.85),
        #ff9aaa
    );
    animation: prismatic-border-spin 6s linear infinite;
    animation-play-state: paused;
    z-index: 0;
    pointer-events: none;
}
.wb-card--prismatic.tcg-anim-in-view::before {
    animation-play-state: running;
}
@keyframes prismatic-border-spin {
    to { transform: rotate(360deg); }
}

/* PR card art fills the full inner (same as SR/SSR/UR) */
.rarity-pr .wb-card-art { position: absolute; inset: 0; }
.rarity-pr .wb-card-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4,4,16,0.90) 0%, transparent 45%);
    z-index: 1;
}
.rarity-pr .wb-card-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(4,4,16,0.60) 0%, transparent 100%);
    z-index: 3;
}
.rarity-pr .wb-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: transparent;
    z-index: 3;
}
.wb-card--prismatic .wb-card-footer {
    padding-bottom: 26px;
}

/* Inner card — deep dark crystal */
.wb-card--prismatic .wb-card-inner {
    background: linear-gradient(150deg, #0b0b1c 0%, #070710 100%) !important;
    position: relative;
    z-index: 1;
}

/* Washed-but-bright scrolling name text */
.wb-card--prismatic .wb-card-name {
    background: linear-gradient(90deg,
        #ff9999 0%, #ffcc77 18%, #ffee88 35%,
        #88ffcc 50%, #88ccff 65%, #cc88ff 80%,
        #ff88cc 92%, #ff9999 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    filter: drop-shadow(0 0 4px rgba(200,180,255,0.6));
    animation: prismatic-text-scroll 4s linear infinite;
    animation-play-state: paused;
}
.wb-card--prismatic.tcg-anim-in-view .wb-card-name {
    animation-play-state: running;
}
@keyframes prismatic-text-scroll {
    to { background-position: 200% center; }
}

/* Series text, serial number, and WEEBEE mark — plain white */
.wb-card--prismatic .wb-card-series { color: rgba(255, 255, 255, 0.75) !important; }
.wb-card--prismatic .wb-card-serial  { color: rgba(255, 255, 255, 0.70) !important; }
.wb-card--prismatic .wb-mark         { color: rgba(255, 255, 255, 0.95) !important; }

/* Inline serial number span */
.wb-card-serial {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.5px;
}

/* Star gem override — same footprint as UR gem (22×22), no base gem chrome */
.wb-rarity-gem--star {
    clip-path: none !important;
    transform: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 15px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}
/* Rainbow primary star — hue-rotates at same 6s as the border spin */
.wb-card--prismatic .wb-rarity-gem--star {
    background: linear-gradient(90deg, #ff6060, #ffcc00, #66ff88, #00ccff, #cc88ff, #ff6060) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: prismatic-gem-cycle 6s linear infinite !important;
    animation-play-state: paused !important;
    z-index: 1 !important;
    font-size: 15px !important;
}
@keyframes prismatic-gem-cycle {
    from { filter: hue-rotate(0deg)   drop-shadow(0 0 4px rgba(200,120,255,0.9)); }
    to   { filter: hue-rotate(360deg) drop-shadow(0 0 4px rgba(200,120,255,0.9)); }
}
/* Washed rainbow background star */
.wb-card--prismatic .wb-rarity-gem--star::before {
    content: '★';
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: block !important;
    background: linear-gradient(90deg, #ffbbbb, #ffddaa, #ffffcc, #bbffdd, #bbddff, #ddbbff, #ffbbdd, #ffbbbb) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    animation: prismatic-text-scroll 6s linear infinite !important;
    animation-play-state: paused !important;
    z-index: 0 !important;
}
.wb-card--prismatic .wb-rarity-gem--star::after { display: none !important; }
.wb-card--prismatic.tcg-anim-in-view .wb-rarity-gem--star,
.wb-card--prismatic.tcg-anim-in-view .wb-rarity-gem--star::before { animation-play-state: running !important; }

/* Rarity label — soft pastel rainbow scrolls across the badge */
.wb-card--prismatic .wb-card-rarity-label {
    background: linear-gradient(90deg, #ffb3b3, #fff0a0, #b3ffcc, #b3e6ff, #e6b3ff, #ffb3b3) !important;
    background-size: 300% 100% !important;
    color: rgba(30,20,50,0.85) !important;
    border: none !important;
    animation: prismatic-label-cycle 6s linear infinite !important;
    animation-play-state: paused !important;
}
@keyframes prismatic-label-cycle {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}
.wb-card--prismatic.tcg-anim-in-view .wb-card-rarity-label { animation-play-state: running !important; }

/* Rainbow prismatic light sweep across the art — mouse-reactive only, same
   --mx/--my pattern as the SSR/UR holographic shimmer. No animation loop, so
   it costs nothing while the cursor isn't on the card. */
.wb-card--prismatic .wb-card-art::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        calc(var(--mx, 0.5) * 200deg + 30deg),
        transparent 10%,
        rgba(255, 60, 60,  0.22) 24%,
        rgba(255,200,  0,  0.22) 32%,
        rgba( 80,255,100,  0.20) 40%,
        rgba(  0,210,255,  0.22) 48%,
        rgba(100, 60,255,  0.22) 56%,
        rgba(255,  0,200,  0.20) 64%,
        transparent 88%
    ),
    radial-gradient(
        ellipse at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%),
        rgba(255,255,255,0.35) 0%,
        transparent 55%
    );
    mix-blend-mode: screen;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wb-card--prismatic:hover .wb-card-art::before { opacity: 1; }


/* "✦ Prismatic 2026" set stamp — pinned to the card's bottom-left corner */
.wb-prismatic-stamp {
    position: absolute;
    bottom: 9px;
    left: 12px;
    z-index: 4;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff9999, #ffcc77, #ffee88, #88ffcc, #88ccff, #cc88ff, #ff88cc, #ff9999);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 3px rgba(200,180,255,0.5));
    animation: prismatic-text-scroll 4s linear infinite;
    animation-play-state: paused;
}
.wb-card--prismatic.tcg-anim-in-view .wb-prismatic-stamp { animation-play-state: running; }

/* Floating sparkle particles */
.wb-prismatic-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
    border-radius: inherit;
}
.wb-sparkle {
    position: absolute;
    opacity: 0;
    animation: sparkle-float 4s ease-in-out infinite;
    animation-play-state: paused;
}
.wb-card--prismatic.tcg-anim-in-view .wb-sparkle { animation-play-state: running; }
@keyframes sparkle-float {
    0%   { transform: translateY(0)     scale(0.5); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 0.6; }
    100% { transform: translateY(-100px) scale(1.1); opacity: 0; }
}
.wb-sparkle:nth-child(1) { left:12%; bottom:22%; font-size: 9px; color:#ffffff; animation-delay:0s;    animation-duration:3.8s; }
.wb-sparkle:nth-child(2) { left:40%; bottom:35%; font-size:11px; color:#ffb3e6; animation-delay:0.9s;  animation-duration:4.2s; }
.wb-sparkle:nth-child(3) { left:68%; bottom:18%; font-size: 8px; color:#b3e6ff; animation-delay:1.7s;  animation-duration:3.6s; }
.wb-sparkle:nth-child(4) { left:22%; bottom:55%; font-size:10px; color:#e6b3ff; animation-delay:2.4s;  animation-duration:4.0s; }
.wb-sparkle:nth-child(5) { left:78%; bottom:42%; font-size: 9px; color:#ffffff; animation-delay:0.5s;  animation-duration:4.5s; }
.wb-sparkle:nth-child(6) { left:55%; bottom:62%; font-size: 8px; color:#ffe680; animation-delay:1.3s;  animation-duration:3.9s; }
.wb-sparkle:nth-child(7) { left:33%; bottom:10%; font-size:10px; color:#b3e6ff; animation-delay:2.0s;  animation-duration:4.3s; }
.wb-sparkle:nth-child(8) { left:62%; bottom:75%; font-size: 9px; color:#ffb3e6; animation-delay:3.1s;  animation-duration:3.7s; }

/* UR flip card back in pack opening */
.tcg-pack-card-ur {
    background: linear-gradient(135deg, #ffa030, #d43020, #a00030, #5c0040);
    background-size: 400% 400%;
    animation: ur-prismatic 2s ease infinite;
    padding: 6px;
    box-shadow: 0 0 40px rgba(192,16,46,0.6), 0 0 70px rgba(140,0,64,0.4);
}

.wb-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.wb-card-wrap { display:flex; flex-direction:column; align-items:center; gap:8px; }
.wb-card-caption { font-size:11px; color:var(--text-muted); text-align:center; max-width:220px; }

/* ── TCG Showcase Carousel ────────────────────────────────────── */
.tcg-carousel-viewport {
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}
.tcg-carousel-track {
    display: flex;
    gap: 18px;
    width: max-content;
    animation: tcg-carousel-scroll 70s linear infinite;
    pointer-events: none;
}
@keyframes tcg-carousel-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ── Pack Opening ─────────────────────────────────────────────── */
.tcg-flip-card { cursor: pointer; }
.tcg-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.tcg-flip-inner.flipped { transform: rotateY(180deg); }
.tcg-flip-front,
.tcg-flip-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.tcg-flip-back { transform: rotateY(0deg); }
.tcg-flip-front { transform: rotateY(180deg); }

/* ── Pack Opening — mobile stack mode ────────────────────────────
   Cards are layered in a single stack; the front card flips on tap,
   then slides away on a second tap to reveal the next one. */
.tcg-pack-stack {
    position: relative;
    width: 220px;
    height: 308px;
    margin: 0 auto;
}
.tcg-pack-stack .tcg-flip-card {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.tcg-pack-stack .tcg-flip-card.tcg-stack-exit {
    transform: translateX(160%) rotate(24deg) !important;
    opacity: 0;
}

/* ── TCG pack store — 2-column grid on narrow phones ──────────── */
@media (max-width: 860px) {
    .tcg-pack-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .tcg-pack-card { width: 100% !important; }
    .tcg-pack-card .wb-card {
        width: 100% !important; height: auto !important; aspect-ratio: 220 / 240;
        padding: 12px !important;
    }
    .tcg-pack-card .wb-card > div:first-child { font-size: 38px !important; }
    .tcg-pack-card .wb-card > div:nth-child(2) { font-size: 14px !important; }
    .tcg-pack-card .wb-card > div:nth-child(3) { font-size: 11px !important; }
}

/* ── TCG card grids — 2-column shrunk layout on narrow phones ──── */
@media (max-width: 860px) {
    .tcg-card-grid { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; justify-content: center !important; }
    .tcg-card-cell { width: 141px !important; }
    .tcg-card-scale-wrap { width: 141px; height: 197px; overflow: hidden; }
    .tcg-card-scale { transform: scale(0.64); transform-origin: top left; }
    .tcg-card-caption { font-size: 9px !important; }
    .tcg-dismantle-btn { font-size: 9px !important; padding: 3px 6px !important; }
}

.tcg-pack-card-sr {
    background: linear-gradient(155deg, #ddd6fe 0%, #a78bfa 30%, #6366f1 65%, #4338ca 100%);
    padding: 5px;
    box-shadow: 0 0 20px rgba(139,92,246,0.6);
}
.tcg-pack-card-rare {
    background: linear-gradient(155deg, #bfdbfe 0%, #3b82f6 50%, #1e3a8a 100%);
    padding: 5px;
    box-shadow: 0 0 14px rgba(59,130,246,0.4);
}
.tcg-pack-card-common {
    background: linear-gradient(155deg, #374151, #1f2937);
    padding: 5px;
    border: 1px solid #4b5563;
}
