
:root {
    /* Surfaces — classy neutral base */
    --bg-dark: #0a0d14;
    --bg-darker: #060810;
    --bg-app: #0a0d14;
    --bg-card: #111621;
    --bg-elevated: #1a1f2e;
    --bg-glass: rgba(10, 13, 20, 0.72);

    /* Borders — subtle by default, strong on focus/hover */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Typography */
    --text-primary: #f2f4f8;
    --text-secondary: #a0a6b3;
    --text-muted: #6b7280;

    /* Neon accents — reserved for CTAs, S-tier, focus, active state only */
    --neon-cyan: #00d9ff;
    --neon-cyan-soft: rgba(0, 217, 255, 0.35);
    --neon-magenta: #ff006e;
    --neon-purple: #8338ec;
    --neon-yellow: #ffbe0b;
    --accent-success: #22c55e;

    /* Tier gradients — keep saturated, these ARE the accent */
    --tier-s: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --tier-a: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    --tier-b: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    --tier-c: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --tier-d: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --tier-f: linear-gradient(135deg, #6c757d 0%, #495057 100%);

    /* Motion */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* PERFORMANCE: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Animated Grid Background — softened for classy base */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: gridPulse 8s ease-in-out infinite;
    will-change: opacity;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.4; }
}

/* Glowing Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    animation: float 24s ease-in-out infinite;
    will-change: transform;
}

.glow-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--neon-cyan);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--neon-magenta);
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

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

.hero h1 {
    font-family: 'Inter', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
    position: relative;
    line-height: 1.2;
}

/* Glitch Effect on Hover */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch:hover::before,
.glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glitch:hover::before {
    animation: glitch 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch:hover::after {
    animation: glitch 0.3s infinite reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-1px, 0); }
    40% { transform: translate(1px, 0); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 0); }
    100% { transform: translate(0, 0); }
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Header Toggles */
.header-toggles {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.1);
}

.theme-toggle:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.3);
}

.theme-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(15deg);
}

/* Theme transition for smooth switching */
.grid-bg,
.glow-orb,
.hero h1,
.subtitle,
.theme-toggle,
.degen-toggle,
#coinInput,
.search-results,
.search-item,
.search-name,
.search-symbol,
.secondary-btn,
.coin-pool h2,
.coin-grid,
.coin,
.coin-text,
.tier-content,
.footer,
.footer p,
.footer a,
.notification-toast,
.undo-toast,
.undo-toast-message,
.confirm-modal,
.confirm-modal-message,
.confirm-modal-btn {
    transition: background-color 0.4s ease,
                border-color 0.4s ease,
                color 0.4s ease,
                box-shadow 0.4s ease,
                opacity 0.4s ease;
}

/* Light Mode Styles — muted slate, not a blinding white */
body.light-mode {
    background: #d6dce4;
    color: #1a1f2e;
}

body.light-mode .grid-bg {
    background-image:
        linear-gradient(rgba(26, 31, 46, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 31, 46, 0.05) 1px, transparent 1px);
}

body.light-mode .glow-orb {
    opacity: 0.04;
}

body.light-mode .hero h1 {
    background: linear-gradient(135deg, #0077b6, #7209b7, #3a0ca3);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
}

body.light-mode .subtitle {
    color: rgba(26, 26, 46, 0.85);
}

body.light-mode .theme-toggle,
body.light-mode .degen-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 119, 182, 0.3);
}

body.light-mode .theme-toggle:hover,
body.light-mode .degen-toggle:hover {
    background: rgba(0, 119, 182, 0.1);
    border-color: rgba(0, 119, 182, 0.6);
}

body.light-mode .degen-toggle {
    color: rgba(26, 26, 46, 0.8);
}

body.light-mode #coinInput {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 119, 182, 0.3);
    color: #1a1a2e;
}

body.light-mode #coinInput:focus {
    border-color: #0077b6;
    background: rgba(0, 119, 182, 0.1);
    box-shadow: 0 0 20px rgba(0, 119, 182, 0.2);
}

body.light-mode #coinInput::placeholder {
    color: rgba(26, 26, 46, 0.6);
}

body.light-mode .search-results {
    background: #e8ecf2;
    border-color: rgba(0, 119, 182, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .search-item:hover {
    background: rgba(0, 119, 182, 0.1);
}

body.light-mode .search-name {
    color: #1a1a2e;
}

body.light-mode .search-symbol {
    color: #0077b6;
}

body.light-mode .secondary-btn {
    background: #e8ecf2;
    border-color: rgba(0, 119, 182, 0.25);
    color: #0077b6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-mode .secondary-btn:hover {
    background: rgba(0, 119, 182, 0.1);
    border-color: #0077b6;
    color: #1a1a2e;
}

body.light-mode .coin-pool h2 {
    color: #0077b6;
}

body.light-mode .coin-grid {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 119, 182, 0.2);
}

body.light-mode .coin-grid:empty::after {
    color: rgba(26, 26, 46, 0.3);
}

body.light-mode .coin:hover {
    background: rgba(0, 119, 182, 0.1);
    box-shadow: 0 0 20px rgba(0, 119, 182, 0.2);
}

body.light-mode .coin-text {
    color: #1a1a2e;
}

body.light-mode .tier-content {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .tier-content.drag-over {
    background: rgba(0, 119, 182, 0.1);
    border-color: #0077b6;
    box-shadow: inset 0 0 30px rgba(0, 119, 182, 0.1);
}

body.light-mode .tier-content.empty {
    border: 2px dashed rgba(26, 26, 46, 0.15);
    background: rgba(26, 26, 46, 0.02);
}

body.light-mode .tier-content.empty::after {
    color: rgba(26, 26, 46, 0.3);
}

body.light-mode .footer {
    border-top-color: rgba(0, 119, 182, 0.2);
}

body.light-mode .footer p {
    color: rgba(26, 26, 46, 0.6);
}

body.light-mode .footer a {
    color: #0077b6;
}

body.light-mode .footer a:hover {
    color: #7209b7;
}

body.light-mode .notification-toast {
    background: linear-gradient(135deg, #0077b6, #7209b7);
}

body.light-mode .undo-toast {
    background: #e8ecf2;
    border-color: #7209b7;
}

body.light-mode .undo-toast-message {
    color: #1a1a2e;
}

body.light-mode .confirm-modal {
    background: #e8ecf2;
    border-color: #0077b6;
}

body.light-mode .confirm-modal-message {
    color: #1a1a2e;
}

body.light-mode .confirm-modal-btn.cancel {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(26, 26, 46, 0.3);
    color: rgba(26, 26, 46, 0.8);
}

body.light-mode ::-webkit-scrollbar-track {
    background: #c4cad3;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0077b6, #7209b7);
}

body.light-mode .category-tabs {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 119, 182, 0.1);
}

body.light-mode .category-tab {
    background: #e4e9f0;
    border-color: rgba(0, 119, 182, 0.15);
    color: rgba(26, 26, 46, 0.75);
}

body.light-mode .category-tab:hover {
    background: rgba(0, 119, 182, 0.1);
    border-color: rgba(0, 119, 182, 0.5);
    color: #1a1a2e;
}

body.light-mode .category-tab.active {
    background: linear-gradient(135deg, #0077b6, #7209b7);
    border-color: #0077b6;
    color: #fff;
}

body.light-mode .category-loading {
    color: rgba(26, 26, 46, 0.5);
}

body.light-mode .coin-add-btn {
    background: linear-gradient(135deg, #0077b6, #7209b7);
}

/* Degen Toggle (moved from degen-toggle-wrapper) */

.degen-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 190, 11, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 190, 11, 0.1);
}

.degen-toggle:hover {
    background: rgba(255, 190, 11, 0.1);
    border-color: rgba(255, 190, 11, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 190, 11, 0.3);
}

.degen-toggle.active {
    background: linear-gradient(135deg, var(--neon-yellow), var(--neon-magenta));
    border-color: var(--neon-yellow);
    color: #000;
    box-shadow: 0 6px 25px rgba(255, 190, 11, 0.6);
}

.degen-toggle.active:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 190, 11, 0.8);
}

.toggle-icon {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

.degen-toggle.active .toggle-icon {
    animation: spin 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Controls — sticky glass bar */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 1s ease-out 0.2s backwards;
    isolation: isolate;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 14px 16px;
    margin-left: -16px;
    margin-right: -16px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    transition: box-shadow 0.2s ease, background 0.3s ease;
}

.controls.is-stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

body.light-mode .controls {
    background: rgba(214, 220, 228, 0.82);
    border-bottom-color: rgba(26, 31, 46, 0.1);
}

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

.input-zone {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}

.search-wrapper {
    flex: 1;
    position: relative;
}

#coinInput {
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-transform: none;
}

#coinInput:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

#coinInput.input-highlight {
    animation: inputPulse 0.5s ease-in-out 3;
    border-color: var(--neon-yellow);
    box-shadow: 0 0 25px rgba(255, 190, 11, 0.5);
}

@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 190, 11, 0.3);
        border-color: var(--neon-yellow);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 190, 11, 0.7);
        border-color: #f97316;
    }
}

#coinInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
    text-transform: none;
}

/* Search Results Dropdown */
.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 217, 255, 0.2);
    /* PERFORMANCE: Using solid background instead of expensive backdrop-filter */
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s ease, transform 0.1s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateX(4px);
}

.search-item.no-results {
    cursor: default;
    color: rgba(255, 255, 255, 0.5);
    justify-content: center;
}

.search-item.no-results:hover {
    background: transparent;
    transform: none;
}

.search-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
}

.search-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-name {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.search-symbol {
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.5);
}

.neon-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.neon-btn:hover::before {
    left: 100%;
}

.neon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.6);
}

.neon-btn:active {
    transform: translateY(0);
}

.neon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.neon-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.export-btn {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
}

.share-btn {
    background: linear-gradient(135deg, #1DA1F2, #14171A);
}

.share-btn:hover {
    box-shadow: 0 6px 25px rgba(29, 161, 242, 0.6);
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-success), #0e7490);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.45);
}

.submit-btn:hover {
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.6);
}

/* Which primary action shows per view mode: visitors submit, the
   reviewer (and verdict viewers) share */
body.mode-builder .share-btn {
    display: inline-flex;
}

body.mode-review .submit-btn,
body.mode-verdict .submit-btn {
    display: none;
}

.copy-link-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.copy-link-btn:hover {
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.6);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.secondary-btn {
    padding: 16px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Inter', monospace;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.secondary-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--neon-cyan);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.3), inset 0 0 30px rgba(0, 217, 255, 0.1);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

/* Coin Pool */
.coin-pool {
    margin-bottom: 60px;
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.coin-pool h2 {
    font-family: 'Inter', monospace;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 24px;
    color: var(--neon-cyan);
    text-transform: uppercase;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    isolation: isolate;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
}

.category-tab:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.2);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-color: var(--neon-cyan);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

.category-tab.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.5);
}

.tab-icon {
    font-size: 16px;
}

.tab-text {
    white-space: nowrap;
}

/* Category Loading State */
.category-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.category-error {
    flex-direction: column;
    gap: 16px;
    color: rgba(255, 150, 150, 0.9);
}

.retry-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

body.light-mode .category-error {
    color: rgba(200, 50, 50, 0.9);
}

/* Category Coin Add Button */
.coin-add-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: white;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.4);
}

.coin:hover .coin-add-btn {
    opacity: 1;
}

.coin-add-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.6);
}

.coin-add-btn:disabled {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    cursor: default;
    opacity: 1;
}

.coin-add-btn:disabled:hover {
    transform: none;
}

/* Category Coin Already Added State */
.category-coin.already-added {
    opacity: 0.5;
    cursor: default;
}

.category-coin.already-added:hover {
    transform: none;
    box-shadow: none;
}

.category-coin.already-added .coin-add-btn {
    opacity: 1;
}

/* Category coin is not draggable */
.category-coin {
    cursor: pointer;
}

.coin-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    min-height: 140px;
    position: relative;
    justify-content: center;
    contain: layout style;
}

.coin-grid:empty::after {
    content: 'All coins ranked. Your tier list is below.';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    letter-spacing: 1px;
    text-align: center;
    max-width: 300px;
}

/* First-visit hint rendered when the portfolio has no coins yet */
.pool-empty-state {
    width: 100%;
    text-align: center;
    padding: 28px 16px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.pool-empty-state strong {
    color: var(--text-primary);
    letter-spacing: 1px;
}

body.light-mode .pool-empty-state {
    color: rgba(26, 31, 46, 0.6);
}

body.light-mode .pool-empty-state strong {
    color: #1a1f2e;
}

.coin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    animation: coinAppear 0.3s ease-out backwards;
    will-change: transform;
    backface-visibility: hidden; /* PERFORMANCE: Better GPU compositing */
    -webkit-backface-visibility: hidden;
}

.coin:hover {
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.coin-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Remove Solana filter - CoinMarketCap logos are already accurate */

.coin-text {
    white-space: nowrap;
    pointer-events: none;
}

.coin-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.coin:hover .coin-remove {
    opacity: 1;
}

.coin-remove:hover {
    transform: scale(1.2);
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.coin-remove.confirm {
    width: auto;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    opacity: 1;
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from { box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4); }
    to { box-shadow: 0 2px 12px rgba(239, 68, 68, 0.8); }
}

.coin.removing {
    animation: coinRemove 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes coinRemove {
    to {
        opacity: 0;
        transform: scale(0.8) rotate(5deg);
    }
}

@keyframes coinAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.coin:hover .coin-logo {
    transform: scale(1.1);
}

.coin:active,
.coin.dragging {
    cursor: grabbing;
    opacity: 0.7;
    transform: scale(1.05);
}

/* Touch dragging for mobile */
.coin.touch-dragging {
    opacity: 0.9;
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 217, 255, 0.5);
    transition: none;
    will-change: left, top, transform;
}

/* Insertion indicators for reordering */
.coin.insert-before,
.coin.insert-after {
    position: relative;
}

.coin.insert-before::before,
.coin.insert-after::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: var(--neon-cyan);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    animation: insertPulse 0.5s ease-in-out infinite alternate;
    z-index: 10;
}

.coin.insert-before::before {
    left: -8px;
}

.coin.insert-after::after {
    right: -8px;
}

@keyframes insertPulse {
    from {
        opacity: 0.7;
        box-shadow: 0 0 8px var(--neon-cyan);
    }
    to {
        opacity: 1;
        box-shadow: 0 0 15px var(--neon-cyan), 0 0 25px var(--neon-cyan);
    }
}

/* Tier List */
.tier-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 1s ease-out 0.6s backwards;
    contain: layout style; /* PERFORMANCE: Isolate repaints */
}

.tier-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: slideInRight 0.5s ease-out backwards;
    content-visibility: auto; /* PERFORMANCE: Skip rendering off-screen rows */
    contain-intrinsic-size: 0 110px;
}

.tier-row:nth-child(1) { animation-delay: 0.1s; }
.tier-row:nth-child(2) { animation-delay: 0.2s; }
.tier-row:nth-child(3) { animation-delay: 0.3s; }
.tier-row:nth-child(4) { animation-delay: 0.4s; }
.tier-row:nth-child(5) { animation-delay: 0.5s; }
.tier-row:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tier-row:hover {
    transform: translateX(4px);
}

.tier-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 10px;
    position: relative;
    overflow: hidden;
}

.tier-s .tier-label { background: var(--tier-s); }
.tier-a .tier-label { background: var(--tier-a); }
.tier-b .tier-label { background: var(--tier-b); }
.tier-c .tier-label { background: var(--tier-c); }
.tier-d .tier-label { background: var(--tier-d); }
.tier-f .tier-label { background: var(--tier-f); }

.tier-letter {
    font-family: 'Inter', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.tier-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 4px;
    opacity: 0.9;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
}

.tier-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-family: 'Inter', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.tier-count:not(.empty) {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.4);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.tier-count.empty {
    opacity: 0.4;
}

.tier-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid transparent;
    min-height: 110px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    contain: layout style; /* PERFORMANCE: Isolate repaints */
}

.tier-content.drag-over {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 30px rgba(0, 217, 255, 0.2);
}

.tier-content.empty {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.01);
}

.tier-content.empty::after {
    content: '⟵ Drag coins here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Inter', monospace;
    font-size: 13px;
    letter-spacing: 2px;
    pointer-events: none;
    white-space: nowrap;
    animation: emptyPulse 3s ease-in-out infinite;
}

@keyframes emptyPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.tier-content.empty.drag-over::after {
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tier-row {
        grid-template-columns: 80px 1fr;
    }

    .tier-label {
        padding: 16px 4px;
    }

    .tier-letter {
        font-size: 2rem;
    }

    .tier-name {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .tier-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.65rem;
        margin-top: 6px;
    }

    .tier-content {
        padding: 12px 8px;
        gap: 4px;
        min-height: 90px;
    }

    .tier-content.empty::after {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .controls {
        flex-direction: column;
        position: static;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: none;
    }

    .input-zone {
        width: 100%;
    }

    .actions {
        width: 100%;
        justify-content: stretch;
    }

    .secondary-btn {
        flex: 1;
    }

    .header-toggles {
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
    }

    .theme-icon {
        font-size: 20px;
    }

    .degen-toggle {
        font-size: 11px;
        padding: 10px 16px;
    }

    /* Category tabs mobile */
    .category-tabs {
        gap: 8px;
        padding: 6px;
    }

    .category-tab {
        padding: 10px 14px;
        font-size: 9px;
        gap: 6px;
    }

    .tab-icon {
        font-size: 14px;
    }

    /* Smaller coins on mobile */
    .coin {
        padding: 8px;
        gap: 4px;
    }

    .coin-logo {
        width: 48px;
        height: 48px;
    }

    .coin-text {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .coin-grid {
        gap: 8px;
        padding: 16px;
        min-height: 100px;
    }

    .coin-remove {
        width: 22px;
        height: 22px;
        font-size: 14px;
        top: -6px;
        right: -6px;
    }

    .coin-remove.confirm {
        font-size: 9px;
        padding: 3px 6px;
    }

    /* Always show add button on mobile */
    .category-coin .coin-add-btn {
        opacity: 1;
        width: 24px;
        height: 24px;
        font-size: 16px;
        top: -6px;
        right: -6px;
        pointer-events: auto;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .tier-row {
        grid-template-columns: 60px 1fr;
    }

    .tier-label {
        padding: 10px 3px;
    }

    .tier-letter {
        font-size: 1.5rem;
    }

    .tier-name {
        font-size: 0.5rem;
        letter-spacing: 0;
    }

    .tier-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.6rem;
        padding: 0 4px;
        margin-top: 4px;
    }

    .coin-logo {
        width: 40px;
        height: 40px;
    }

    .coin-text {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .coin {
        padding: 6px;
    }

    .tier-content {
        padding: 10px 6px;
        min-height: 80px;
    }

    /* Category tabs extra small */
    .category-tabs {
        gap: 6px;
        padding: 4px;
    }

    .category-tab {
        padding: 8px 10px;
        font-size: 8px;
        gap: 4px;
    }

    .tab-icon {
        font-size: 12px;
    }

    .tab-text {
        display: none;
    }

    .category-loading {
        font-size: 14px;
        padding: 30px;
    }
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.notification-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.5);
}

.notification-toast.warning {
    background: linear-gradient(135deg, var(--neon-yellow), #f97316);
    color: #1a1a2e;
    box-shadow: 0 8px 32px rgba(255, 190, 11, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
}

/* Mobile touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Prevent text selection during drag */
    .coin {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Better touch targets on mobile */
    .coin {
        min-width: 60px;
        min-height: 70px;
    }

    /* Always show remove button on touch devices */
    .coin .coin-remove {
        opacity: 0.7;
    }

    /* Always show add button on touch devices - smaller size */
    .category-coin .coin-add-btn {
        opacity: 0.9;
        width: 24px;
        height: 24px;
        font-size: 16px;
        top: -6px;
        right: -6px;
    }

    /* Allow tapping on category coins */
    .category-coin,
    .search-item {
        touch-action: manipulation;
    }

    /* Improve scrolling on mobile while allowing drag */
    .tier-content {
        touch-action: pan-y;
    }

    /* Allow tapping on coin grid */
    .coin-grid {
        touch-action: pan-y pinch-zoom;
    }
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    border-top: 2px solid rgba(0, 217, 255, 0.2);
    animation: fadeIn 1s ease-out 0.8s backwards;
}

.footer p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    margin: 0;
}

.footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.footer a:hover {
    color: var(--neon-magenta);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}

/* ACCESSIBILITY: Focus-visible styles for keyboard navigation */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--neon-cyan);
    outline-offset: 2px;
}

.neon-btn:focus-visible,
.secondary-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 217, 255, 0.4);
}

.theme-toggle:focus-visible,
.degen-toggle:focus-visible {
    outline: 3px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.category-tab:focus-visible {
    outline: 3px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

#coinInput:focus-visible {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.3), 0 0 20px rgba(0, 217, 255, 0.3);
}

.coin:focus-visible {
    outline: 3px solid var(--neon-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    background: rgba(0, 217, 255, 0.15);
}

.coin.keyboard-selected {
    outline: 3px dashed var(--neon-magenta);
    outline-offset: 2px;
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.5);
    background: rgba(255, 0, 110, 0.15);
}

.tier-content:focus-visible,
.coin-grid:focus-visible {
    outline: 3px solid var(--neon-cyan);
    outline-offset: -3px;
}

.coin-remove:focus-visible,
.coin-add-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    opacity: 1;
}

.search-item:focus-visible {
    outline: none;
    background: rgba(0, 217, 255, 0.2);
    box-shadow: inset 0 0 0 2px var(--neon-cyan);
}

.confirm-modal-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.undo-toast-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.footer a:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
}

/* Light mode focus styles */
body.light-mode *:focus-visible {
    outline-color: #0077b6;
}

body.light-mode .coin:focus-visible,
body.light-mode .coin.keyboard-selected {
    box-shadow: 0 0 20px rgba(0, 119, 182, 0.4);
}

body.light-mode .coin.keyboard-selected {
    outline-color: #7209b7;
    box-shadow: 0 0 25px rgba(114, 9, 183, 0.4);
    background: rgba(114, 9, 183, 0.1);
}

/* PERFORMANCE: Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .grid-bg,
    .glow-orb,
    .hero h1,
    .coin,
    .coin-logo {
        animation: none !important;
        transition: none !important;
    }

    .glow-orb {
        display: none; /* Hide expensive blur elements entirely */
    }
}

/* PERFORMANCE: Optimize animations for touch devices */
@media (hover: none) and (pointer: coarse) {
    .coin:hover {
        transform: none; /* Disable hover effects on touch */
    }

    .coin:hover .coin-logo {
        animation: none;
    }
}

/* MOBILE: Landscape orientation handling */
@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding: 20px;
    }

    .hero {
        margin-bottom: 30px;
    }

    .hero h1 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        margin-bottom: 10px;
    }

    .subtitle {
        font-size: clamp(0.8rem, 1.5vw, 1rem);
    }

    .header-toggles {
        position: static;
        margin-bottom: 15px;
        justify-content: center;
    }

    .controls {
        margin-bottom: 20px;
        gap: 10px;
    }

    .input-zone {
        min-width: 200px;
    }

    .coin-pool {
        margin-bottom: 30px;
    }

    .coin-pool h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .category-tabs {
        gap: 6px;
        padding: 6px;
        margin-bottom: 15px;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 9px;
    }

    .coin-grid {
        padding: 12px;
        min-height: 80px;
        gap: 10px;
    }

    .coin {
        padding: 8px;
        gap: 4px;
    }

    .coin-logo {
        width: 40px;
        height: 40px;
    }

    .coin-text {
        font-size: 10px;
    }

    .tier-list {
        gap: 8px;
    }

    .tier-row {
        grid-template-columns: 70px 1fr;
    }

    .tier-label {
        padding: 12px 4px;
    }

    .tier-letter {
        font-size: 1.5rem;
    }

    .tier-name {
        font-size: 0.55rem;
        letter-spacing: 0.5px;
    }

    .tier-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.55rem;
        margin-top: 4px;
    }

    .tier-content {
        padding: 8px;
        min-height: 70px;
        gap: 6px;
    }

    .tier-content .coin {
        padding: 4px;
    }

    .tier-content .coin-logo {
        width: 36px;
        height: 36px;
    }

    .tier-content .coin-text {
        font-size: 9px;
    }

    .footer {
        margin-top: 30px;
        padding: 20px 0;
    }

    .footer p {
        font-size: 14px;
    }

    /* Hide decorative elements in landscape to save space */
    .glow-orb {
        display: none;
    }
}

/* Extra small landscape (phones) */
@media (max-height: 400px) and (orientation: landscape) {
    .hero {
        margin-bottom: 15px;
    }

    .hero h1 {
        font-size: 1rem;
    }

    .subtitle {
        display: none; /* Hide subtitle on very small landscape */
    }

    .controls {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .actions {
        flex-wrap: nowrap;
    }

    .neon-btn,
    .secondary-btn {
        padding: 10px 16px;
        font-size: 10px;
    }

    .tier-row {
        grid-template-columns: 50px 1fr;
    }

    .tier-content {
        min-height: 50px;
    }
}

/* Undo Toast */
.undo-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(10, 14, 39, 0.98);
    border: 2px solid var(--neon-purple);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(131, 56, 236, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10002;
}

.undo-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.undo-toast.hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.undo-toast-message {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.undo-toast-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 6px;
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.undo-toast-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.5);
}

/* Confirmation Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px); /* PERFORMANCE: Reduced blur */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-modal-overlay.visible {
    opacity: 1;
}

.confirm-modal-overlay.hiding {
    opacity: 0;
}

.confirm-modal {
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3), 0 0 80px rgba(131, 56, 236, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.visible .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-modal-overlay.hiding .confirm-modal {
    transform: scale(0.9) translateY(20px);
}

.confirm-modal-message {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin: 0 0 28px 0;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

.confirm-modal-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.confirm-modal-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.confirm-modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.confirm-modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.confirm-modal-btn.confirm {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.confirm-modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.6);
}

/* Mobile responsive for toast and modal */
@media (max-width: 480px) {
    .undo-toast {
        bottom: 20px;
        padding: 12px 16px;
        gap: 12px;
        width: calc(100% - 32px);
        max-width: none;
    }

    .undo-toast-message {
        font-size: 14px;
    }

    .undo-toast-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .confirm-modal {
        padding: 24px 20px;
        margin: 16px;
        width: calc(100% - 32px);
    }

    .confirm-modal-message {
        font-size: 16px;
    }

    .confirm-modal-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .confirm-modal-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* ============================================
   S-TIER CONFETTI ANIMATION
   ============================================ */

@keyframes confetti-burst {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) rotate(var(--spin)) scale(0.5);
        opacity: 0;
    }
}

.confetti-particle {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ============================================
   SKELETON LOADERS
   ============================================ */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.coin-skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    pointer-events: none;
}

.coin-skeleton-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}

.coin-skeleton-text {
    width: 40px;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}

@media (max-width: 768px) {
    .coin-skeleton-logo { width: 48px; height: 48px; }
    .coin-skeleton-text { width: 32px; }
}

body.light-mode .coin-skeleton-logo,
body.light-mode .coin-skeleton-text {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.09) 50%,
        rgba(0, 0, 0, 0.04) 100%
    );
    background-size: 200% 100%;
}

/* ============================================
   BUTTON LOADING / SUCCESS STATES
   ============================================ */

@keyframes spin-btn {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin-btn 0.7s linear infinite;
    vertical-align: middle;
}

.neon-btn.is-loading,
.secondary-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.neon-btn.is-success,
.secondary-btn.is-success {
    background: linear-gradient(135deg, var(--accent-success), #16a34a) !important;
    pointer-events: none;
}

.btn-check {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ============================================
   COIN + TIER HOVER DEPTH
   ============================================ */

.coin:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 14px rgba(0, 217, 255, 0.18);
}

.tier-row:hover {
    transform: translateX(4px) translateY(-1px);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   EMPTY STATES
   ============================================ */

.tier-content.empty::before {
    content: '';
    position: absolute;
    top: calc(50% - 24px);
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.35'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0.45;
}

.tier-content.empty::after {
    content: 'Drag coins here';
    top: calc(50% + 14px);
}

body.light-mode .tier-content.empty::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>");
    opacity: 0.4;
}

/* Initial-load helper panel shown above tier-list when nothing ranked */
/* Banner shown when viewing a submitted portfolio or a published verdict */
.mode-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 24px;
    padding: 14px 20px;
    border: 1px dashed var(--border-medium);
    border-radius: 14px;
    text-align: center;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    letter-spacing: 0.5px;
    animation: fadeIn 0.4s var(--ease-smooth);
}

.mode-banner[hidden] {
    display: none;
}

.mode-banner strong {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 2px;
}

body.mode-review .mode-banner {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.08), rgba(131, 56, 236, 0.08));
    border-color: var(--neon-cyan-soft);
}

body.mode-verdict .mode-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(0, 217, 255, 0.06));
    border-color: rgba(34, 197, 94, 0.4);
}

.mode-banner-cta {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--neon-cyan-soft);
    border-radius: 8px;
    color: var(--neon-cyan);
    font-family: 'Inter', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mode-banner-cta:hover {
    background: var(--neon-cyan);
    color: #0a0d14;
    transform: translateY(-1px);
}

body.light-mode .mode-banner {
    color: rgba(26, 31, 46, 0.7);
}

body.light-mode .mode-banner strong {
    color: #1a1f2e;
}

body.light-mode.mode-review .mode-banner {
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.08), rgba(114, 9, 183, 0.08));
    border-color: rgba(0, 119, 182, 0.35);
}

body.light-mode.mode-verdict .mode-banner {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(0, 119, 182, 0.06));
    border-color: rgba(22, 163, 74, 0.4);
}

body.light-mode .mode-banner-cta {
    border-color: rgba(0, 119, 182, 0.4);
    color: #0077b6;
}

body.light-mode .mode-banner-cta:hover {
    background: #0077b6;
    color: #e8ecf2;
}

.tier-helper {
    padding: 24px 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.06), rgba(131, 56, 236, 0.06));
    border: 1px dashed var(--border-medium);
    border-radius: 14px;
    text-align: center;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    letter-spacing: 0.5px;
    display: none;
}

.tier-helper.visible {
    display: block;
    animation: fadeIn 0.4s var(--ease-smooth);
}

.tier-helper strong {
    color: var(--text-primary);
    font-weight: 700;
}

body.light-mode .tier-helper {
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.06), rgba(114, 9, 183, 0.06));
    color: rgba(26, 26, 46, 0.7);
}

body.light-mode .tier-helper strong {
    color: #1a1a2e;
}

/* ============================================
   "ALREADY ADDED" CATEGORY COIN STATE
   ============================================ */

.category-coin.already-added {
    opacity: 0.55;
    filter: grayscale(70%);
    cursor: default;
}

.category-coin.already-added:hover {
    transform: none;
    box-shadow: none;
    filter: grayscale(70%);
}

.category-coin.already-added::after {
    content: '✓ Added';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 10px;
    pointer-events: none;
    z-index: 2;
    text-transform: uppercase;
}

/* ============================================
   TIER DISTRIBUTION STRIP
   ============================================ */

.tier-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
}

.tier-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.15s ease, background 0.15s ease;
}

.tier-summary-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.tier-summary-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    color: #fff;
    font-family: 'Inter', monospace;
    font-size: 11px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tier-summary-item[data-tier="S"] .tier-summary-letter { background: var(--tier-s); }
.tier-summary-item[data-tier="A"] .tier-summary-letter { background: var(--tier-a); }
.tier-summary-item[data-tier="B"] .tier-summary-letter { background: var(--tier-b); }
.tier-summary-item[data-tier="C"] .tier-summary-letter { background: var(--tier-c); }
.tier-summary-item[data-tier="D"] .tier-summary-letter { background: var(--tier-d); }
.tier-summary-item[data-tier="F"] .tier-summary-letter { background: var(--tier-f); }

.tier-summary-count {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 14px;
    text-align: center;
}

.tier-summary-total {
    margin-left: auto;
    padding-left: 14px;
    border-left: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .tier-summary { font-size: 12px; gap: 6px; padding: 10px 12px; }
    .tier-summary-item { padding: 3px 7px; }
    .tier-summary-total { margin-left: 0; width: 100%; text-align: center; padding-left: 0; border-left: none; border-top: 1px solid var(--border-subtle); padding-top: 8px; margin-top: 4px; }
}

body.light-mode .tier-summary {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 119, 182, 0.12);
    color: rgba(26, 26, 46, 0.7);
}

body.light-mode .tier-summary-item {
    background: rgba(232, 236, 242, 0.85);
}

body.light-mode .tier-summary-count { color: #1a1a2e; }

/* ============================================
   KEYBOARD-SHORTCUT HELP MODAL
   ============================================ */

.shortcut-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    z-index: 50;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.shortcut-hint.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.shortcut-hint:hover {
    color: var(--text-primary);
    border-color: var(--neon-cyan-soft);
    transform: translateY(-1px);
}

.shortcut-hint-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
}

.shortcut-hint-close:hover { color: var(--text-primary); }

.help-modal-overlay,
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 20px 20px;
    z-index: 10004;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.help-modal-overlay.visible,
.cmd-palette-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.help-modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(-10px);
    transition: transform 0.2s ease;
}

.help-modal-overlay.visible .help-modal { transform: translateY(0); }

.help-modal h2 {
    font-family: 'Inter', monospace;
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.help-steps {
    margin: 0 0 24px;
    padding-left: 20px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.help-steps li {
    padding: 4px 0;
}

.help-steps strong {
    color: var(--text-primary);
}

.help-modal h2.help-shortcuts-title {
    margin-top: 4px;
}

.help-shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.help-shortcut-row:last-child { border-bottom: none; }

.help-shortcut-keys {
    display: inline-flex;
    gap: 4px;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

body.light-mode .help-modal {
    background: #e8ecf2;
    border-color: rgba(0, 119, 182, 0.2);
}

body.light-mode kbd {
    background: #d6dce4;
    color: #1a1f2e;
    border-color: rgba(0, 0, 0, 0.18);
}

/* ============================================
   COMMAND PALETTE
   ============================================ */

.cmd-palette {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    transform: translateY(-10px);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.cmd-palette-overlay.visible .cmd-palette { transform: translateY(0); }

.cmd-palette-input {
    width: 100%;
    padding: 18px 22px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

.cmd-palette-input::placeholder { color: var(--text-muted); }

.cmd-palette-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 6px 0;
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.cmd-palette-item:hover,
.cmd-palette-item.active {
    background: rgba(0, 217, 255, 0.08);
}

.cmd-palette-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
}

.cmd-palette-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cmd-palette-name {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
}

.cmd-palette-symbol {
    color: var(--neon-cyan);
    font-family: 'Inter', monospace;
    font-size: 11px;
    letter-spacing: 1px;
}

.cmd-palette-hint {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cmd-palette-hint kbd {
    min-width: 22px;
    height: 20px;
    font-size: 10px;
}

.cmd-palette-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.cmd-palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.cmd-palette-footer .cmd-palette-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.light-mode .cmd-palette {
    background: #e8ecf2;
    border-color: rgba(0, 119, 182, 0.2);
}

body.light-mode .cmd-palette-item:hover,
body.light-mode .cmd-palette-item.active {
    background: rgba(0, 119, 182, 0.08);
}

/* ============================================
   TOAST STACKING CONTAINER
   ============================================ */

#toastStack {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 10005;
    pointer-events: none;
    max-width: min(90vw, 460px);
    width: max-content;
}

#toastStack > * {
    pointer-events: auto;
}

/* Remove old fixed-positioning on toasts so they flow in the stack */
#toastStack .undo-toast,
#toastStack .notification-toast {
    position: relative;
    bottom: auto;
    top: auto;
    left: auto;
    right: auto;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.25s var(--ease-smooth), opacity 0.25s var(--ease-smooth);
}

#toastStack .undo-toast.visible,
#toastStack .notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

#toastStack .undo-toast.hiding,
#toastStack .notification-toast.hiding {
    transform: translateY(8px);
    opacity: 0;
}

/* ============================================
   STAGGERED ENTRANCE CASCADE (primes main sections)
   ============================================ */

.hero         { animation: fadeInDown 0.7s var(--ease-bounce) both; animation-delay: 0s; }
.controls     { animation: fadeIn 0.6s var(--ease-smooth) both; animation-delay: 0.1s; }
.coin-pool    { animation: fadeIn 0.6s var(--ease-smooth) both; animation-delay: 0.2s; }
.tier-list    { animation: fadeIn 0.6s var(--ease-smooth) both; animation-delay: 0.32s; }
.tier-summary { animation: fadeIn 0.5s var(--ease-smooth) both; animation-delay: 0.44s; }
.footer       { animation: fadeIn 0.5s var(--ease-smooth) both; animation-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
    .hero, .controls, .coin-pool, .tier-list, .tier-summary, .footer {
        animation: none !important;
    }
    .coin-skeleton-logo, .coin-skeleton-text { animation: none !important; }
    .btn-spinner { animation: none !important; }
    .tier-content.empty::after { animation: none !important; }
}
