/* ============================================
   BLORPS App - Marketplace Styles
   Listings, Trading Cards
   ============================================ */

/* ============================================
   Lending / For Hire Overlay — Warm roe orange
   ============================================ */
.lending-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 161, 87, 0.14) 0%,
        rgba(5, 24, 40, 0.78) 40%,
        rgba(5, 24, 40, 0.88) 100%
    );
    backdrop-filter: blur(3px) saturate(1.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
    overflow: hidden;
}

/* Soft warm caustic */
.lending-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 30% at 30% 20%, rgba(255, 214, 168, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 25% at 70% 70%, rgba(255, 161, 87, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: caustic-drift 9s ease-in-out infinite;
}

/* Outer ripple ring */
.lending-overlay::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    border: 1.5px solid rgba(255, 214, 168, 0.55);
    border-radius: 50%;
    animation: ripple-out 3s ease-out infinite;
    pointer-events: none;
}

/* Icon — soft warm disc */
.lending-overlay .lending-icon-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* Halo */
.lending-overlay .lending-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1.5px solid rgba(255, 214, 168, 0.55);
    border-radius: 50%;
    animation: halo-pulse 2.5s ease-in-out infinite;
}

/* Solid disc behind the icon */
.lending-overlay .lending-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 30%,
        rgba(255, 161, 87, 0.22) 0%,
        rgba(20, 12, 6, 0.92) 70%);
    border: 1px solid rgba(255, 214, 168, 0.4);
    border-radius: 50%;
}

.lending-overlay .lending-icon {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    color: #ffd6a8;
    filter: drop-shadow(0 0 8px rgba(255, 161, 87, 0.6));
    animation: drift-bob 2.8s ease-in-out infinite;
}

.lending-overlay .lending-icon svg {
    width: 100%;
    height: 100%;
}

/* Status label */
.lending-overlay .lending-label {
    font-family: var(--font-display, 'Lilita One', cursive);
    font-size: 11px;
    font-weight: 700;
    color: #ffe6c8;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 4px 14px;
    background: rgba(255, 161, 87, 0.14);
    border: 1px solid rgba(255, 214, 168, 0.5);
    border-radius: 999px;
    text-shadow: 0 0 8px rgba(255, 161, 87, 0.5);
}

/* Price display */
.lending-overlay .lending-price {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #ffd6a8;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(255, 161, 87, 0.45);
    margin-top: 6px;
}

/* Card styling when lending - removed outer glow to match other card types */

/* Cancel Listing Button */
.lending-overlay .cancel-listing-btn {
    pointer-events: auto;
    padding: 6px 14px;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffd6a8;
    background: rgba(255, 161, 87, 0.12);
    border: 1px solid rgba(255, 214, 168, 0.45);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.lending-overlay .cancel-listing-btn:hover,
.lending-overlay .cancel-listing-btn:active,
.lending-overlay .cancel-listing-btn:focus {
    background: rgba(255, 161, 87, 0.22);
    border-color: rgba(255, 214, 168, 0.7);
    box-shadow: 0 0 12px rgba(255, 161, 87, 0.35);
    transform: translateX(-50%) !important;
}

.lending-overlay .cancel-listing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: translateX(-50%) !important;
}

/* Lending overlay animations */
@keyframes lending-pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.01);
    }
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .expeditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mining-layout,
    .raid-layout,
    .breeding-layout,
    .tavern-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Sidebar is now controlled by hamburger menu in responsive.css */

    .main-content {
        margin-left: 0;
    }

    .app-header {
        padding: 0 16px;
    }

    .search-box {
        display: none;
    }

    .token-balances {
        gap: 16px;
    }

    .content-area {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px 14px;
    }

    .expeditions-grid {
        grid-template-columns: 1fr;
    }

    .modal-blorps {
        grid-template-columns: repeat(2, 1fr);
        max-height: 400px;
    }
}

/* ============================================
   Header Actions (Deposit/Withdraw)
   ============================================ */
.header-actions {
    display: flex;
    gap: 10px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.header-action-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.header-action-btn.deposit {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: var(--green-light);
}

.header-action-btn.deposit:hover {
    background: rgba(74, 222, 128, 0.25);
    border-color: var(--green-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.2),
        0 0 16px rgba(74, 222, 128, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-action-btn.withdraw {
    background: rgba(107, 207, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--blue-light);
}

.header-action-btn.withdraw:hover {
    background: rgba(107, 207, 255, 0.25);
    border-color: var(--blue-main);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================
   Marketplace Styles
   ============================================ */
.marketplace-tabs {
    display: flex;
    gap: 8px;
}

.mp-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.mp-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mp-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--border-active);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mp-tab:hover::before {
    opacity: 1;
}

.mp-tab.active {
    background: linear-gradient(135deg, var(--green-main), var(--green-dark));
    border-color: var(--green-main);
    color: var(--purple-dark);
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4), var(--glow-green);
    transform: translateY(-2px);
}

.mp-section {
    display: none;
}

.mp-section.active {
    display: block;
}

.marketplace-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    width: 110px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.price-input:focus {
    border-color: var(--border-active);
}

.price-filter .price-token {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
/* "Show more" container spans the full grid width so the button sits
   centered below the last row of cards. */
.marketplace-more {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 16px 0 8px;
}

/* ============================================
   Marketplace Listing Cards - Premium Collectibles
   ============================================ */
.listing-card {
    background: linear-gradient(145deg, rgba(30, 32, 48, 0.95), rgba(20, 22, 36, 0.98));
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Animated border gradient overlay */
.listing-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Corner shine effect */
.listing-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    transform: rotate(25deg);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.6s ease;
}

.listing-card:hover::after {
    transform: rotate(25deg) translateX(100%);
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.listing-card:hover::before {
    opacity: 1;
}

/* ============================================
   Legendary Card Styling - Gold/Yellow Theme
   ============================================ */
.listing-card[data-rarity="legendary"] {
    border-color: rgba(255, 217, 61, 0.3);
    background: linear-gradient(145deg,
        rgba(45, 40, 25, 0.98),
        rgba(30, 28, 20, 0.98));
}

.listing-card[data-rarity="legendary"]::before {
    background: linear-gradient(135deg,
        rgba(255, 217, 61, 0.5),
        rgba(255, 180, 50, 0.2) 25%,
        transparent 50%,
        rgba(255, 217, 61, 0.2) 75%,
        rgba(255, 200, 60, 0.4));
    animation: legendaryShimmer 3s ease-in-out infinite;
}

@keyframes legendaryShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.listing-card[data-rarity="legendary"]:hover {
    border-color: rgba(255, 217, 61, 0.6);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 217, 61, 0.25),
        inset 0 0 30px rgba(255, 217, 61, 0.05);
}

/* ============================================
   Epic Card Styling - Pink/Magenta Theme
   ============================================ */
.listing-card[data-rarity="epic"] {
    border-color: rgba(255, 107, 205, 0.3);
    background: linear-gradient(145deg,
        rgba(45, 25, 40, 0.98),
        rgba(30, 20, 28, 0.98));
}

.listing-card[data-rarity="epic"]::before {
    background: linear-gradient(135deg,
        rgba(255, 107, 205, 0.4),
        rgba(200, 80, 180, 0.15) 30%,
        transparent 50%,
        rgba(255, 107, 205, 0.15) 70%,
        rgba(255, 150, 220, 0.3));
    animation: epicPulse 4s ease-in-out infinite;
}

@keyframes epicPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

.listing-card[data-rarity="epic"]:hover {
    border-color: rgba(255, 107, 205, 0.6);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(255, 107, 205, 0.2),
        inset 0 0 25px rgba(255, 107, 205, 0.05);
}

/* ============================================
   Rare Card Styling - Blue Theme
   ============================================ */
.listing-card[data-rarity="rare"] {
    border-color: rgba(107, 207, 255, 0.25);
    background: linear-gradient(145deg,
        rgba(25, 35, 50, 0.98),
        rgba(20, 25, 38, 0.98));
}

.listing-card[data-rarity="rare"]::before {
    background: linear-gradient(135deg,
        rgba(107, 207, 255, 0.35),
        rgba(80, 160, 220, 0.1) 35%,
        transparent 55%,
        rgba(107, 207, 255, 0.15));
}

.listing-card[data-rarity="rare"]:hover {
    border-color: rgba(107, 207, 255, 0.5);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(107, 207, 255, 0.15);
}

/* ============================================
   Common Card Styling - Neutral/Subtle
   ============================================ */
.listing-card[data-rarity="common"] {
    border-color: rgba(150, 150, 150, 0.15);
    background: linear-gradient(145deg,
        rgba(35, 35, 42, 0.98),
        rgba(25, 25, 32, 0.98));
}

.listing-card[data-rarity="common"]::before {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08),
        transparent 50%);
}

.listing-card[data-rarity="common"]:hover {
    border-color: rgba(150, 150, 150, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Card Image/Showcase Area
   ============================================ */
.listing-image {
    position: relative;
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

/* Rarity-specific backgrounds */
.listing-card[data-rarity="legendary"] .listing-image {
    background: radial-gradient(ellipse at center, rgba(255, 217, 61, 0.12) 0%, transparent 70%),
                linear-gradient(180deg, rgba(255, 217, 61, 0.05) 0%, transparent 50%);
}

.listing-card[data-rarity="epic"] .listing-image {
    background: radial-gradient(ellipse at center, rgba(255, 107, 205, 0.1) 0%, transparent 70%),
                linear-gradient(180deg, rgba(255, 107, 205, 0.04) 0%, transparent 50%);
}

.listing-card[data-rarity="rare"] .listing-image {
    background: radial-gradient(ellipse at center, rgba(107, 207, 255, 0.08) 0%, transparent 70%),
                linear-gradient(180deg, rgba(107, 207, 255, 0.03) 0%, transparent 50%);
}

.listing-card[data-rarity="common"] .listing-image {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
                linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 50%);
}

.listing-image svg {
    width: 110px;
    height: 110px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
    position: relative;
    z-index: 2;
}

.listing-card:hover .listing-image svg {
    transform: scale(1.08) translateY(-4px);
}

/* Legendary glow effect on blorp */
.listing-card[data-rarity="legendary"]:hover .listing-image svg {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4))
            drop-shadow(0 0 20px rgba(255, 217, 61, 0.3));
}

.listing-card[data-rarity="epic"]:hover .listing-image svg {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4))
            drop-shadow(0 0 15px rgba(255, 107, 205, 0.25));
}

/* ============================================
   Rarity Badge Styling
   ============================================ */
.listing-rarity {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.listing-rarity.legendary {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.4), rgba(255, 180, 50, 0.2));
    color: #ffd93d;
    border: 1px solid rgba(255, 217, 61, 0.4);
    box-shadow: 0 0 12px rgba(255, 217, 61, 0.35);
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.5);
    animation: legendaryBadgePulse 2s ease-in-out infinite;
}

@keyframes legendaryBadgePulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 217, 61, 0.35); }
    50% { box-shadow: 0 0 20px rgba(255, 217, 61, 0.5); }
}

.listing-rarity.epic {
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.4), rgba(200, 80, 180, 0.2));
    color: #ff6bcd;
    border: 1px solid rgba(255, 107, 205, 0.4);
    box-shadow: 0 0 10px rgba(255, 107, 205, 0.3);
    text-shadow: 0 0 6px rgba(255, 107, 205, 0.5);
}

.listing-rarity.rare {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.35), rgba(80, 160, 220, 0.15));
    color: #6bcfff;
    border: 1px solid rgba(107, 207, 255, 0.35);
    box-shadow: 0 0 8px rgba(107, 207, 255, 0.25);
}

.listing-rarity.common {
    background: rgba(100, 100, 110, 0.3);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 100, 110, 0.3);
}

/* ============================================
   Card Info Section
   ============================================ */
.listing-info {
    padding: 16px 18px 18px;
    position: relative;
}

.listing-info h4 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.listing-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.listing-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex: 1;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.listing-stats .stat:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.1);
}

.listing-stats .stat svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.listing-stats .stat.bp svg {
    color: #ff6b6b;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.4));
}

.listing-stats .stat.tp svg {
    stroke: #4ecdc4;
    filter: drop-shadow(0 0 4px rgba(78, 205, 196, 0.4));
}

.listing-stats .stat-value {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.listing-stats .stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-left: -2px;
}

/* Rarity-specific stat styling */
.listing-card[data-rarity="legendary"] .listing-stats .stat {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 183, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.2);
}

.listing-card[data-rarity="legendary"] .listing-stats .stat.bp svg {
    color: #ffd700;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

.listing-card[data-rarity="legendary"] .listing-stats .stat.tp svg {
    stroke: #ffb700;
    filter: drop-shadow(0 0 6px rgba(255, 183, 0, 0.5));
}

.listing-card[data-rarity="epic"] .listing-stats .stat {
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.15), rgba(168, 85, 247, 0.05));
    border-color: rgba(255, 107, 205, 0.2);
}

.listing-card[data-rarity="epic"] .listing-stats .stat.bp svg {
    color: #ff6bcd;
    filter: drop-shadow(0 0 5px rgba(255, 107, 205, 0.5));
}

.listing-card[data-rarity="epic"] .listing-stats .stat.tp svg {
    stroke: #a855f7;
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
}

.listing-card[data-rarity="rare"] .listing-stats .stat {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(56, 189, 248, 0.05));
    border-color: rgba(59, 130, 246, 0.2);
}

.listing-card[data-rarity="rare"] .listing-stats .stat.bp svg {
    color: #3b82f6;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
}

.listing-card[data-rarity="rare"] .listing-stats .stat.tp svg {
    stroke: #38bdf8;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5));
}

.listing-stats .stat-icon {
    font-size: 11px;
    opacity: 0.8;
}

/* Price Display */
.listing-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.listing-price .price-amount {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--green-main);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.25);
}

.listing-price .price-token {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-light);
    opacity: 0.7;
}

/* Rarity-specific price colors */
.listing-card[data-rarity="legendary"] .listing-price .price-amount {
    color: #ffd93d;
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.3);
}

.listing-card[data-rarity="epic"] .listing-price .price-amount {
    color: #ff6bcd;
    text-shadow: 0 0 20px rgba(255, 107, 205, 0.25);
}

.listing-card[data-rarity="rare"] .listing-price .price-amount {
    color: #6bcfff;
    text-shadow: 0 0 20px rgba(107, 207, 255, 0.25);
}

.listing-seller {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-family: monospace;
    opacity: 0.7;
}

/* ============================================
   Marketplace Buy Button
   ============================================ */
.marketplace-buy-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--green-main) 0%, #3bc974 100%);
    border: none;
    border-radius: 12px;
    color: var(--purple-dark);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.25);
}

.marketplace-buy-btn .btn-text {
    position: relative;
    z-index: 2;
}

.marketplace-buy-btn .btn-shine {
    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;
}

.marketplace-buy-btn:hover .btn-shine {
    left: 100%;
}

.marketplace-buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
}

.marketplace-buy-btn:active {
    transform: translateY(-1px);
}

/* Legendary Buy Button */
.blorp-card-wrapper.legendary .marketplace-buy-btn {
    background: linear-gradient(135deg, #ffd700 0%, #f0c030 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.blorp-card-wrapper.legendary .marketplace-buy-btn:hover {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.45);
}

/* Epic Buy Button */
.blorp-card-wrapper.epic .marketplace-buy-btn {
    background: linear-gradient(135deg, #ff6bcd 0%, #e05ab8 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 205, 0.3);
}

.blorp-card-wrapper.epic .marketplace-buy-btn:hover {
    box-shadow: 0 8px 30px rgba(255, 107, 205, 0.45);
}

/* Rare Buy Button */
.blorp-card-wrapper.rare .marketplace-buy-btn {
    background: linear-gradient(135deg, #6bcfff 0%, #55b8e8 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(107, 207, 255, 0.3);
}

.blorp-card-wrapper.rare .marketplace-buy-btn:hover {
    box-shadow: 0 8px 30px rgba(107, 207, 255, 0.45);
}

/* Common Buy Button */
.blorp-card-wrapper.common .marketplace-buy-btn {
    background: linear-gradient(135deg, #8a8a9a 0%, #707080 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(100, 100, 120, 0.25);
}

.blorp-card-wrapper.common .marketplace-buy-btn:hover {
    box-shadow: 0 8px 25px rgba(100, 100, 120, 0.35);
}

/* ============================================
   Buy Button (Listing Cards) - Rarity-Themed
   ============================================ */
.buy-btn {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--green-main), #3bc974);
    border: none;
    border-radius: 12px;
    color: var(--purple-dark);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.35);
}

/* Legendary Buy Button */
.listing-card[data-rarity="legendary"] .buy-btn {
    background: linear-gradient(135deg, #ffd93d, #f0c030);
    color: #2d1b4e;
}

.listing-card[data-rarity="legendary"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(255, 217, 61, 0.4);
}

/* Epic Buy Button */
.listing-card[data-rarity="epic"] .buy-btn {
    background: linear-gradient(135deg, #ff6bcd, #e05ab8);
    color: #2d1b4e;
}

.listing-card[data-rarity="epic"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 205, 0.35);
}

/* Rare Buy Button */
.listing-card[data-rarity="rare"] .buy-btn {
    background: linear-gradient(135deg, #6bcfff, #55b8e8);
    color: #1a1a2e;
}

.listing-card[data-rarity="rare"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(107, 207, 255, 0.35);
}

/* Common Buy Button */
.listing-card[data-rarity="common"] .buy-btn {
    background: linear-gradient(135deg, #8a8a9a, #707080);
    color: #fff;
}

.listing-card[data-rarity="common"] .buy-btn:hover {
    box-shadow: 0 6px 20px rgba(100, 100, 120, 0.3);
}

/* ============================================
   Listing Actions (Edit/Cancel)
   ============================================ */
.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.edit-listing-btn,
.cancel-listing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 110px;
}

.edit-listing-btn svg,
.cancel-listing-btn svg {
    width: 14px;
    height: 14px;
}

.edit-listing-btn {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.15), rgba(107, 207, 255, 0.08));
    border: 1px solid rgba(107, 207, 255, 0.3);
    color: var(--blue-light);
}

.edit-listing-btn:hover {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.25), rgba(107, 207, 255, 0.15));
    border-color: rgba(107, 207, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 207, 255, 0.2);
}

.cancel-listing-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.cancel-listing-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.12));
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

/* ============================================
   Marketplace Cards - Extended Blorp Card Style
   ============================================ */
.blorp-card-wrapper.marketplace-card {
    width: 100%;
    cursor: pointer;
}

.blorp-card-wrapper.marketplace-card .blorp-card-inner {
    min-height: 380px;
}

.blorp-card-wrapper.marketplace-card .blorp-card-stats {
    margin-bottom: 0;
}

/* Marketplace Footer Section */
.marketplace-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Price Section */
.marketplace-footer .price-section {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.marketplace-footer .price-amount {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--green-main);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
    letter-spacing: -0.5px;
}

.marketplace-footer .price-token {
    font-size: 13px;
    font-weight: 700;
    color: var(--green-light);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rarity-specific price colors */
.blorp-card-wrapper.legendary .marketplace-footer .price-amount {
    color: #ffd700;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.blorp-card-wrapper.legendary .marketplace-footer .price-token {
    color: #ffb700;
}

.blorp-card-wrapper.epic .marketplace-footer .price-amount {
    color: #ff6bcd;
    text-shadow: 0 0 25px rgba(255, 107, 205, 0.35);
}

.blorp-card-wrapper.epic .marketplace-footer .price-token {
    color: #ff99dd;
}

.blorp-card-wrapper.rare .marketplace-footer .price-amount {
    color: #6bcfff;
    text-shadow: 0 0 25px rgba(107, 207, 255, 0.35);
}

.blorp-card-wrapper.rare .marketplace-footer .price-token {
    color: #99dfff;
}

/* Seller Info */
.marketplace-footer .seller-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.marketplace-footer .seller-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marketplace-footer .seller-address {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Price tag glow effect */
.listing-price .price-amount,
.merc-price .price-amount {
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

/* ============================================
   Marketplace v2 — DirectListings UI
   ============================================
   Built on the thirdweb MarketplaceV3 proxy (DirectListings plugin).
   Older rules above (.marketplace-grid, .listing-form, etc.) belong to a
   prior mocked marketplace and are kept until that markup is fully
   removed. Class names below are namespaced so they don't collide.
*/

.page-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.marketplace-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.marketplace-toolbar .marketplace-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.marketplace-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(14, 38, 56, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marketplace-filter:hover {
    color: var(--text-main);
    border-color: rgba(127, 234, 245, 0.4);
}

.marketplace-filter.is-active {
    background: linear-gradient(135deg, rgba(45, 212, 233, 0.18), rgba(95, 168, 214, 0.12));
    border-color: rgba(127, 234, 245, 0.6);
    color: var(--text-main);
    box-shadow: 0 0 14px rgba(127, 234, 245, 0.2);
}

.marketplace-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.marketplace-filter-sort select {
    min-width: 110px;
}

.marketplace-meta-sep {
    opacity: 0.5;
}

#marketplace .marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    background: none;
    padding: 0;
    border: 0;
    border-radius: 0;
}

.marketplace-card {
    background: linear-gradient(165deg,
        rgba(14, 38, 56, 0.95) 0%,
        rgba(5, 24, 40, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

/* Filter logic toggles `card.hidden` to filter listings. The `display:
   flex` above overrides the [hidden] attribute's default `display: none`,
   so we need to restore it explicitly — otherwise hidden cards still
   take grid cells and the filters look like no-ops. */
.marketplace-card[hidden] {
    display: none;
}

.marketplace-card:hover {
    transform: translateY(-3px);
    border-color: rgba(127, 234, 245, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 16px rgba(127, 234, 245, 0.1);
}

.marketplace-card-art {
    aspect-ratio: 1 / 1;
    background: #0a1828;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.marketplace-card-art svg {
    width: 130%;
    height: 130%;
    object-fit: contain;
}
/* Backend-rendered PNG already fills its 800x800 canvas tightly, so 100%
   keeps the salmon inside the card. Dark-navy bg shows through during the
   network fetch so cards look intentional, not broken, before paint. */
.marketplace-card-art-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0a1828;
}

.marketplace-card-art-placeholder {
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    animation: marketplace-art-pulse 2s ease-in-out infinite;
}

@keyframes marketplace-art-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.marketplace-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.marketplace-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marketplace-card-token {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.marketplace-card-seller {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
}

.marketplace-card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marketplace-card-price-amount {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--green-light);
}

.marketplace-card-price-currency {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Listing expiry hint — empty when contract gave us no endTimestamp,
   shows "Expires in 2h" / "Expires in 3d" / "Expired" otherwise. */
.marketplace-card-expiry {
    padding: 4px 0 6px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.marketplace-card-expiry:empty {
    display: none;
}

.marketplace-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-dim);
}

.marketplace-empty p {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-muted);
}

.marketplace-empty-hint {
    font-family: var(--font-body) !important;
    font-size: 13px !important;
    color: var(--text-dim) !important;
}

/* ============================================
   Generic Buttons + Form Inputs (used by the
   marketplace List modal — kept here for now,
   move to components.css later if reused.)
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-main), var(--green-dark));
    color: #051828;
    box-shadow: 0 4px 14px rgba(45, 212, 233, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 212, 233, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(127, 234, 245, 0.6);
    box-shadow: 0 0 0 3px rgba(45, 212, 233, 0.1);
}

.form-hint {
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.modal-content-narrow {
    max-width: 480px !important;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================
   List-a-Salmon visual picker
   ============================================ */
.list-salmon-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.list-salmon-picker-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 16px;
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
}

.list-salmon-picker-hint {
    font-size: 11px;
    opacity: 0.7;
    max-width: 280px;
    line-height: 1.4;
}

.list-salmon-picker-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(14, 38, 56, 0.6);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    transition: all 0.18s ease;
    overflow: hidden;
    font-family: inherit;
}

.list-salmon-picker-card:hover {
    border-color: rgba(127, 234, 245, 0.35);
    transform: translateY(-2px);
}

.list-salmon-picker-card.is-selected {
    border-color: var(--green-main);
    box-shadow: 0 0 0 2px rgba(45, 212, 233, 0.18);
}

.list-salmon-picker-art {
    aspect-ratio: 1 / 1;
    background: #0a1828;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.list-salmon-picker-art svg {
    width: 130%;
    height: 130%;
    object-fit: contain;
}

.list-salmon-picker-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 8px 10px;
    background: rgba(0, 0, 0, 0.25);
    /* Override the parent <button>'s default text-align: center so class
       name + stats read left-aligned (matches marketplace card layout). */
    text-align: left;
}

.list-salmon-picker-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.list-salmon-picker-id {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.list-salmon-picker-rarity {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    line-height: 1.4;
}

.list-salmon-picker-class {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.list-salmon-picker-class-logo {
    width: 12px;
    height: 12px;
    object-fit: contain;
    flex: none;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px;
}

.list-salmon-picker-faction {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 9px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.list-salmon-picker-faction-logo {
    width: 12px;
    height: 12px;
    object-fit: contain;
    flex: none;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px;
}

.list-salmon-picker-stats {
    display: flex;
    gap: 10px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.list-salmon-picker-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Box-constrain the emoji icons so ⚔ and ⌛ render at the same visual
   size despite their different intrinsic glyph metrics. */
.list-salmon-picker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    font-size: 11px;
    line-height: 1;
    opacity: 0.75;
}

.list-salmon-picker-card.is-selected .list-salmon-picker-id {
    color: var(--green-light);
}

/* ============================================
   Advanced filter bar (class, rarity, BP, TP)
   ============================================ */
.marketplace-advanced-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    background: rgba(14, 38, 56, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.marketplace-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marketplace-filter-field > span:first-child {
    font-weight: 600;
}

.marketplace-filter-range {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.marketplace-filter-range > span:first-child {
    margin-right: 4px;
}

.marketplace-range-sep {
    color: var(--text-dim);
    font-size: 12px;
}

.form-input-sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
}

.form-input-num {
    width: 72px;
    -moz-appearance: textfield;
}

/* Mobile layout for the advanced filter row. The default flex-wrap puts
   Class/Faction/Rarity selects on one line and BP/TP ranges on the next,
   but on narrow viewports the 4 number inputs in BP+TP get squeezed and
   look cramped. Stack each filter field on its own row instead, and
   stretch range inputs to fill so they're tappable. */
@media (max-width: 600px) {
    .marketplace-advanced-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .marketplace-filter-field {
        width: 100%;
    }
    .marketplace-filter-field select {
        width: 100%;
    }
    .marketplace-filter-range {
        flex-wrap: wrap;
    }
    .marketplace-filter-range > span:first-child {
        flex-basis: 100%;
        margin-bottom: 4px;
    }
    .marketplace-filter-range .form-input-num {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}

.form-input-num::-webkit-outer-spin-button,
.form-input-num::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ============================================
   Card meta + stats (class, rarity, BP, TP)
   ============================================ */
.marketplace-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.marketplace-card-class {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.marketplace-card-class-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px;
}

/* Faction row under the class+seller line. Same shape as
   .premint-salmon-faction but lives in the marketplace stylesheet so
   either CSS file can be loaded independently. */
.marketplace-card-faction {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.marketplace-card-faction-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px;
}

.marketplace-card-rarity {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.marketplace-card-stats {
    display: flex;
    gap: 14px;
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.marketplace-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* Fixed-size box so ⚔ vs ⌛ render at uniform visual height regardless of
   the underlying emoji font's intrinsic glyph dimensions. */
.marketplace-card-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 12px;
    line-height: 1;
    opacity: 0.75;
}
