/* ========================================
   COMPONENTS CSS - CRYSTAL CASCADE
   ========================================
   
   Reusable UI component classes.
   All sizing uses CSS variables from base.css
   All responsive overrides are in responsive.css
   
   CONTENTS:
   1. Typography
   2. Cards / Sections
   3. Tabs
   4. Buttons (extends buttons.css)
   5. Badges
   6. Icons
   7. Lists
   8. Forms/Inputs
   
   ======================================== */


/* ============================================================
   1. TYPOGRAPHY
   ============================================================ */

/* --- Text Sizes (use CSS variables) --- */
.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-md { font-size: var(--font-md); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }
.text-xxl { font-size: var(--font-xxl); }

/* --- Responsive Text Sizes (use clamp for mobile-friendly scaling) --- */
/* INCREASED minimums for better mobile readability */
.text-body { font-size: clamp(15px, 4vw, 18px); }
.text-body-lg { font-size: clamp(16px, 4.5vw, 20px); }
.text-power { font-size: clamp(16px, 4.2vw, 19px); }
.text-lore { font-size: clamp(15px, 4vw, 18px); }
.text-stat { font-size: clamp(20px, 5.5vw, 26px); }
.text-stat-label { font-size: clamp(13px, 3.5vw, 15px); }
.text-emoji-lg { font-size: clamp(32px, 10vw, 48px); }
.text-emoji-xl { font-size: clamp(40px, 12vw, 60px); }

/* --- Text Colors --- */
.text-white { color: #ffffff; }
.text-muted { color: var(--color-text-muted, #b090c8); }
.text-gold { color: var(--color-gold, #ffd700); }
.text-accent { color: #ffdd00; }
.text-success { color: var(--color-success, #44ff88); }
.text-danger { color: var(--color-danger, #ff6666); }
.text-blue { color: #66ccff; }
.text-pink { color: #ff88bb; }
.text-pink-hot { color: #ff66aa; }
.text-orange { color: #ffcc66; }
.text-orange-power { color: #ffaa66; }
.text-purple { color: #bb88ff; }
.text-purple-light { color: #c0b0d0; }
.text-purple-muted { color: #a090b8; }
.text-gray { color: #888888; }
.text-gray-light { color: #aaaaaa; }
.text-gray-dark { color: #666666; }

/* --- Text Styles --- */
.text-bold { font-weight: bold; }
.text-heavy { font-weight: 900; }
.text-italic { font-style: italic; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-uppercase { text-transform: uppercase; }
.text-shadow { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); }
.text-glow-gold { text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 1px 1px 2px #000; }
.text-glow-blue { text-shadow: 0 0 10px rgba(70, 150, 255, 0.5); }
.text-glow-pink { text-shadow: 0 0 10px rgba(255, 100, 170, 0.5); }
.text-glow-orange { text-shadow: 0 0 10px rgba(255, 170, 70, 0.5); }
.text-glow-purple { text-shadow: 0 0 10px rgba(187, 136, 255, 0.5); }

/* --- Line Height --- */
.leading-tight { line-height: 1.2; }
.leading-normal { line-height: 1.4; }
.leading-relaxed { line-height: 1.6; }


/* ============================================================
   UNIFIED SEMANTIC FONT SYSTEM
   ============================================================
   
   Master font classes that scale consistently across ALL modals
   and ALL device sizes. Use these classes instead of hardcoding
   font sizes with clamp() or px values.
   
   BREAKPOINT CATEGORIES:
   1. Tiny Mobile    : ≤375px    (iPhone 5, iPhone SE 2020)
   2. Small Mobile   : 376-767px (all other mobiles)
   3. Tablet         : 768-1023px
   4. Laptop         : 1024-1365px (13" laptops)
   5. Full HD        : 1366-1919px
   6. 2K             : 1920-2559px
   7. 4K/5K          : 2560px+
   
   SEMANTIC CLASSES:
   - .modal-title      : Main modal titles (GOLD STASH, TRAVEL, etc.)
   - .modal-subtitle   : Section subtitles (COLLECTIBLE GEMS, etc.)
   - .modal-body       : Regular body text / descriptions
   - .modal-helper     : Small helper text / captions
   - .modal-label      : Labels (YOUR GOLD, POWER, etc.)
   - .modal-value      : Display values (gold amount, counts)
   - .modal-btn-text   : Button text
   - .modal-tab-text   : Tab text
   
   ============================================================ */

/* === BASE DEFINITIONS (Tiny Mobile - Default) === */
/* iPhone 5 (320px) and iPhone SE 2020 (375px) */

.modal-title {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.modal-body {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.modal-helper {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.modal-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-value {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
}

.modal-btn-text {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-tab-text {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Power/Ability descriptions - special styling */
.modal-power-desc {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #ffcc88;
}

/* Location/Item names in lists */
.modal-item-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

/* Gem/Item counts */
.modal-count {
    font-size: 11px;
    font-weight: 700;
}


/* --- Section Headings --- */
.section-title {
    font-size: clamp(16px, 4.5vw, 22px);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================================
   SHOP GEM ITEM LAYOUT CLASSES
   ============================================================
   Used in Collection.js for shop gem purchase items.
   Layout classes only - font sizes come from semantic classes.
   ============================================================ */

/* Shop gem item info section */
.shop-gem-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(3px, 1vw, 8px);
    padding: clamp(4px, 1.5vw, 10px);
    grid-column: span 2;
    background: rgba(0,0,0,0.2);
    border-radius: clamp(6px, 1.5vw, 10px);
}

/* Shop gem buttons row */
.shop-gem-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3px, 0.8vw, 6px);
    margin-top: auto;
}

/* Shop gem lore button */
.shop-gem-lore-btn {
    height: clamp(36px, 9vw, 44px);
    background: linear-gradient(180deg, #4488cc, #3366aa);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #224488;
    transition: transform 0.1s, box-shadow 0.2s;
}

.shop-gem-lore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #224488;
}

/* Shop gem buy button - can afford state (gold) */
.shop-gem-buy-btn {
    height: clamp(36px, 9vw, 44px);
    background: linear-gradient(180deg, #ffbb55, #dd9922);
    color: #442200;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #aa7700;
    transition: transform 0.1s, box-shadow 0.2s;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.shop-gem-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #aa7700;
}

.shop-gem-buy-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #aa7700;
}

/* Shop gem buy button - cannot afford state (gray) */
.shop-gem-buy-btn.disabled {
    background: linear-gradient(180deg, #888, #666);
    color: #ddd;
    box-shadow: 0 3px 0 #444;
    text-shadow: none;
    cursor: not-allowed;
}

.shop-gem-buy-btn.disabled:hover,
.shop-gem-buy-btn.disabled:active {
    transform: none;
    box-shadow: 0 3px 0 #444;
}

/* Shop gem name styling */
.shop-gem-name {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.1;
}

/* Shop gem price styling */
.shop-gem-price {
    color: #FFD700;
    text-align: left;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255,215,0,0.6);
}

/* Shop gem card container */
.shop-gem-card {
    background: rgba(40, 25, 55, 0.95);
    border: clamp(2px, 0.5vw, 3px) solid #4a3560;
    border-radius: clamp(8px, 2vw, 12px);
    padding: clamp(8px, 2vw, 12px);
    transition: border-color 0.2s;
    position: relative;
}

/* Shop gem row layout */
.shop-gem-row {
    display: grid;
    grid-template-columns: clamp(75px, 23%, 110px) 1fr 1fr;
    gap: clamp(4px, 1.2vw, 8px);
}

/* Shop gem image container */
.shop-gem-img-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Shop gem image button */
.shop-gem-img-btn {
    height: clamp(75px, 22vw, 110px);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 2px solid #555;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
}

.shop-gem-img-btn:hover {
    transform: scale(1.05);
    border-color: #888;
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.shop-gem-img-btn:active {
    transform: scale(0.98);
}

/* Shop gem image inside button */
.shop-gem-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Shop gem fallback emoji */
.gem-fallback-emoji {
    font-size: 40px;
}

/* ============================================================
   SPECIMEN SHOP CARD CLASSES
   ============================================================ */

/* Specimen shop card container */
.specimen-shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(40, 25, 55, 0.9);
    border: 2px solid #4a3560;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.specimen-shop-card:hover {
    border-color: #7a5590;
    box-shadow: 0 0 15px rgba(120, 80, 180, 0.3);
}

/* Specimen name */
.specimen-shop-name {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
}

/* Specimen image button */
.specimen-shop-img-btn {
    width: clamp(80px, 22vw, 120px);
    height: clamp(80px, 22vw, 120px);
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(60,40,80,0.8), rgba(30,20,50,0.9));
    border: 3px solid #666;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.specimen-shop-img-btn:hover {
    transform: scale(1.08);
    border-color: #888;
    box-shadow: 0 0 20px rgba(255,215,0,0.4);
}

.specimen-shop-img-btn:active {
    transform: scale(0.95);
}

.specimen-shop-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Specimen owned badge */
.specimen-owned-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(180deg, #44cc44, #22aa22);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 1px #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Specimen price */
.specimen-shop-price {
    color: #FFD700;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255,215,0,0.6), 1px 1px 2px #000;
}

/* Specimen buttons row */
.specimen-shop-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
}

/* Specimen info button */
.specimen-info-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #4488cc, #3366aa);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 3px 0 #224488;
}

.specimen-info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #224488;
}

.specimen-info-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #224488;
}

/* Specimen buy button - can afford */
.specimen-buy-btn {
    padding: 8px 12px;
    background: linear-gradient(180deg, #ffbb55, #dd9922);
    color: #442200;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 3px 0 #aa7700;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.specimen-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #aa7700;
}

.specimen-buy-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #aa7700;
}

/* Specimen buy button - cannot afford */
.specimen-buy-btn.disabled {
    background: linear-gradient(180deg, #888, #666);
    color: #ddd;
    box-shadow: 0 3px 0 #444;
    text-shadow: none;
    cursor: not-allowed;
}

.specimen-buy-btn.disabled:hover,
.specimen-buy-btn.disabled:active {
    transform: none;
    box-shadow: 0 3px 0 #444;
}

/* ============================================================
   SHOP GRID GEM CARD CLASSES (for grid view)
   ============================================================ */

/* Shop grid gem card */
.shop-grid-gem-card {
    background: rgba(40, 25, 55, 0.95);
    border: 3px solid #4a3560;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.shop-grid-gem-card.owned {
    border-color: #4a8560;
}

/* Shop grid gem name */
.shop-grid-gem-name {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
}

/* Shop grid gem image button */
.shop-grid-gem-img-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 2px solid #555;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.shop-grid-gem-img-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(120,100,150,0.4);
}

.shop-grid-gem-img-btn:active {
    transform: scale(0.95);
}

.shop-grid-gem-img-btn img {
    width: 50%;
    height: 50%;
    object-fit: contain;
    pointer-events: none;
}

/* Shop grid gem owned count badge */
.shop-grid-gem-owned-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(20,10,30,0.95);
    border: 3px solid #ffaa00;
    color: #ffdd00;
    font-weight: 900;
    padding: 8px 14px;
    border-radius: 12px;
    text-shadow: 0 0 8px rgba(255,200,0,0.8), 1px 1px 2px #000;
    box-shadow: 0 0 15px rgba(255,170,0,0.5);
    pointer-events: none;
}

/* Shop grid gem price */
.shop-grid-gem-price {
    color: #FFD700;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255,215,0,0.6), 1px 1px 2px #000;
}

/* Shop grid gem buttons row */
.shop-grid-gem-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Shop grid gem info button */
.shop-grid-gem-info-btn {
    padding: 10px;
    background: linear-gradient(180deg, #4488cc, #3366aa);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #224488;
    transition: transform 0.1s, box-shadow 0.2s;
}

.shop-grid-gem-info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #224488;
}

.shop-grid-gem-info-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #224488;
}

/* Shop grid gem buy button - can afford */
.shop-grid-gem-buy-btn {
    padding: 10px;
    background: linear-gradient(180deg, #44cc44, #339933);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #226622;
    transition: transform 0.1s, box-shadow 0.2s;
}

.shop-grid-gem-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #226622;
}

.shop-grid-gem-buy-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #226622;
}

/* Shop grid gem buy button - cannot afford */
.shop-grid-gem-buy-btn.disabled {
    background: #555;
    color: #888;
    box-shadow: 0 3px 0 #333;
    cursor: not-allowed;
    opacity: 0.7;
}

.shop-grid-gem-buy-btn.disabled:hover,
.shop-grid-gem-buy-btn.disabled:active {
    transform: none;
    box-shadow: 0 3px 0 #333;
}

/* Gem fallback emoji small */
.gem-fallback-emoji-sm {
    font-size: 28px;
}

/* ============================================================
   SPECIMEN COLLECTION CARD CLASSES
   ============================================================ */

/* Specimen collection card */
.specimen-collection-card {
    background: rgba(40, 25, 55, 0.95);
    border: clamp(2px, 0.5vw, 3px) solid #4a3560;
    border-radius: clamp(8px, 2vw, 12px);
    padding: clamp(8px, 2vw, 12px);
    transition: border-color 0.2s;
    position: relative;
}

.specimen-collection-card.owned {
    border-color: #8866aa;
}

.specimen-collection-card.active {
    border-color: #00cc00;
}

/* Specimen collection row */
.specimen-collection-row {
    display: grid;
    grid-template-columns: clamp(75px, 23%, 110px) 1fr;
    gap: clamp(4px, 1.2vw, 8px);
    align-items: stretch;
}

/* Specimen image column */
.specimen-img-column {
    display: flex;
    flex-direction: column;
}

/* Specimen image button */
.specimen-img-btn {
    height: clamp(100px, 28vw, 140px);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 2px solid #555;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
}

.specimen-img-btn.active {
    border-color: #00cc00;
}

.specimen-img-btn:hover {
    transform: scale(1.05);
    border-color: #7a6590;
    box-shadow: 0 0 15px rgba(120,100,150,0.5);
}

.specimen-img-btn:active {
    transform: scale(0.98);
}

.specimen-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Specimen info section */
.specimen-info-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(2px, 0.6vw, 4px);
    padding: clamp(4px, 1vw, 8px);
    background: rgba(0,0,0,0.2);
    border-radius: clamp(6px, 1.5vw, 10px);
}

/* Specimen name */
.specimen-name {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.1;
}

.specimen-name.active {
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0,255,0,0.5);
}

/* Specimen buttons row */
.specimen-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(4px, 1vw, 6px);
    margin-top: auto;
}

/* Specimen lore button */
.specimen-lore-btn {
    height: clamp(34px, 8vw, 42px);
    background: linear-gradient(180deg, #4488cc, #3366aa);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #224488;
    transition: transform 0.1s, box-shadow 0.2s;
}

.specimen-lore-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #224488;
}

.specimen-lore-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #224488;
}

/* Specimen activate button */
.specimen-activate-btn {
    height: clamp(34px, 8vw, 42px);
    background: linear-gradient(180deg, #44cc44, #339933);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #226622;
    transition: transform 0.1s, box-shadow 0.2s;
}

.specimen-activate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #226622;
}

.specimen-activate-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #226622;
}

/* Specimen deactivate button */
.specimen-deactivate-btn {
    height: clamp(34px, 8vw, 42px);
    background: linear-gradient(180deg, #cc4444, #aa2222);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #662222;
    transition: transform 0.1s, box-shadow 0.2s;
}

.specimen-deactivate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #662222;
}

.specimen-deactivate-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #662222;
}

/* Specimen buy button - can afford */
.specimen-collection-buy-btn {
    height: clamp(34px, 8vw, 42px);
    background: linear-gradient(180deg, #ffbb55, #dd9922);
    color: #442200;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #aa7700;
    transition: transform 0.1s, box-shadow 0.2s;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.specimen-collection-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #aa7700;
}

.specimen-collection-buy-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #aa7700;
}

/* Specimen buy button - cannot afford */
.specimen-collection-buy-btn.disabled {
    background: linear-gradient(180deg, #888, #666);
    color: #bbb;
    box-shadow: 0 2px 0 #444;
    text-shadow: none;
    cursor: not-allowed;
}

.specimen-collection-buy-btn.disabled:hover,
.specimen-collection-buy-btn.disabled:active {
    transform: none;
    box-shadow: 0 2px 0 #444;
}

/* ============================================================
   SPECIMEN SHOP GRID CARD CLASSES
   ============================================================ */

/* Specimen shop grid card */
.specimen-shop-grid-card {
    background: rgba(40, 25, 55, 0.95);
    border: 3px solid #4a3560;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.specimen-shop-grid-card.owned {
    border-color: #00cc00;
}

/* Specimen shop grid image button */
.specimen-shop-grid-img-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 2px solid #555;
    cursor: pointer;
    padding: 0;
    position: relative;
    margin-bottom: 8px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.specimen-shop-grid-img-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(120,100,150,0.4);
}

.specimen-shop-grid-img-btn:active {
    transform: scale(0.95);
}

.specimen-shop-grid-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Specimen owned badge (green) */
.specimen-shop-owned-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(20,10,30,0.95);
    border: 3px solid #00cc00;
    color: #00ff00;
    font-weight: 900;
    padding: 8px 14px;
    border-radius: 12px;
    text-shadow: 0 0 8px rgba(0,255,0,0.8), 1px 1px 2px #000;
    box-shadow: 0 0 15px rgba(0,200,0,0.5);
    pointer-events: none;
}

/* Specimen shop buy button - owned state */
.specimen-shop-buy-btn-owned {
    padding: 10px;
    background: #2a5a2a;
    color: #88ff88;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: not-allowed;
    box-shadow: 0 3px 0 #333;
    opacity: 0.7;
}

/* ============================================================
   OWNED GEM DETAIL CLASSES
   ============================================================ */

/* Owned gem detail card */
.owned-gem-card {
    background: rgba(40, 25, 55, 0.95);
    border: clamp(2px, 0.5vw, 3px) solid #4a3560;
    border-radius: clamp(8px, 2vw, 12px);
    padding: clamp(8px, 2vw, 12px);
    transition: border-color 0.2s;
    position: relative;
}

/* Owned gem row - 2 column layout */
.owned-gem-row {
    display: grid;
    grid-template-columns: clamp(75px, 23%, 110px) 1fr;
    gap: clamp(4px, 1.2vw, 8px);
    align-items: stretch;
}

/* Owned gem image column */
.owned-gem-img-column {
    display: flex;
    flex-direction: column;
}

/* Owned gem image button */
.owned-gem-img-btn {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 2px solid #555;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
    min-height: clamp(75px, 22vw, 110px);
}

.owned-gem-img-btn:hover {
    transform: scale(1.05);
    border-color: #888;
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.owned-gem-img-btn:active {
    transform: scale(0.98);
}

.owned-gem-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Owned gem info section */
.owned-gem-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(4px, 1.2vw, 8px);
    padding: clamp(4px, 1.5vw, 10px);
    background: rgba(0,0,0,0.2);
    border-radius: clamp(6px, 1.5vw, 10px);
}

/* Owned gem name */
.owned-gem-name {
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.1;
}

/* Owned gem buttons row */
.owned-gem-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(4px, 1vw, 6px);
    margin-top: auto;
}

/* Owned gem lore button */
.owned-gem-lore-btn {
    height: clamp(38px, 10vw, 48px);
    background: linear-gradient(180deg, #4488cc, #3366aa);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #224488;
    transition: transform 0.1s, box-shadow 0.2s;
}

.owned-gem-lore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #224488;
}

.owned-gem-lore-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #224488;
}

/* Owned gem use button - has gems */
.owned-gem-use-btn {
    height: clamp(38px, 10vw, 48px);
    background: linear-gradient(180deg, #44cc44, #228822);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #115511;
    transition: transform 0.1s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.owned-gem-use-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #115511;
}

.owned-gem-use-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #115511;
}

/* Owned gem use button - no gems (buy more) */
.owned-gem-use-btn.empty {
    background: linear-gradient(180deg, #ffbb55, #dd9922);
    color: #442200;
    box-shadow: 0 3px 0 #aa7700;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.owned-gem-use-btn.empty:hover {
    box-shadow: 0 5px 0 #aa7700;
}

.owned-gem-use-btn.empty:active {
    box-shadow: 0 1px 0 #aa7700;
}

.section-title-lg {
    font-size: var(--font-xxl);
}

/* --- Labels --- */
.label {
    font-size: var(--font-xs);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

/* --- Paragraph Text --- */
.section-text {
    font-size: var(--font-md);
    color: #ddd;
    line-height: 1.5;
    text-align: center;
}

.section-text-sm {
    font-size: var(--font-sm);
    color: #aaa;
}


/* ============================================================
   2. CARDS / SECTIONS
   ============================================================ */

/* --- Base Card --- */
.card {
    background: rgba(100, 70, 140, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 2px solid rgba(150, 100, 200, 0.3);
}

.card-sm {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.card-lg {
    padding: var(--spacing-xl);
}

/* --- Themed Cards --- */
.card-gold {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.2) 0%, rgba(200, 150, 0, 0.1) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.card-blue {
    background: linear-gradient(135deg, rgba(70, 150, 255, 0.15) 0%, rgba(40, 100, 200, 0.1) 100%);
    border-color: rgba(70, 150, 255, 0.3);
}

.card-pink {
    background: linear-gradient(135deg, rgba(255, 100, 170, 0.15) 0%, rgba(200, 70, 140, 0.1) 100%);
    border-color: rgba(255, 100, 170, 0.3);
}

.card-orange {
    background: linear-gradient(135deg, rgba(255, 170, 70, 0.15) 0%, rgba(200, 130, 30, 0.1) 100%);
    border-color: rgba(255, 170, 70, 0.3);
}

.card-purple {
    background: linear-gradient(135deg, rgba(100, 70, 140, 0.4) 0%, rgba(60, 40, 100, 0.4) 100%);
    border-color: rgba(150, 100, 200, 0.3);
}

.card-danger {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.2) 0%, rgba(200, 50, 50, 0.2) 100%);
    border-color: rgba(255, 100, 100, 0.4);
}

/* --- Card Content Layout --- */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.card-content-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}


/* ============================================================
   3. TABS
   ============================================================ */

/* --- Tab Container --- */
.tabs {
    display: flex;
    gap: 0;
    justify-content: center;
    width: 100%;
    border-bottom: 2px solid #6a5580; /* Border line at bottom of tabs */
    margin-bottom: -2px; /* Pull content up to be flush */
}

.tabs-spaced {
    gap: var(--spacing-sm);
}

/* --- Individual Tab --- */
.tab {
    flex: 1;
    min-width: 0; /* Allow shrinking below content width */
    padding: clamp(6px, 1.5vw, 12px) clamp(2px, 0.5vw, 8px);
    font-size: clamp(11px, 2.8vw, 14px);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid #6a5580;
    border-bottom: 2px solid transparent; /* Flush with content border */
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: #5a4570;
    color: #aaa;
    transition: all 0.2s ease;
}

.tab:hover {
    background: #6a5580;
    color: #ccc;
}

.tab.active {
    background: linear-gradient(180deg, #dda522, #bb8811);
    border-color: #ffcc44;
    border-bottom-color: transparent; /* Hide bottom border so tab connects to content */
    color: #442200;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1; /* Active tab above border line */
}

/* Tab variants for different themes */
.tab.tab-purple.active {
    background: linear-gradient(180deg, #6644aa, #442266);
    border-color: #8866cc;
    color: #fff;
    text-shadow: none;
}

/* Legacy .tab.tab-gold.active removed - now using .tab-gold-active class */

/* --- Tab Content Container --- */
.tab-content {
    display: none;
    padding: var(--spacing-lg);
}

.tab-content.active {
    display: block;
}


/* ============================================================
   4. BUTTONS (extends buttons.css)
   ============================================================ */

/* --- Large Action Buttons --- */
.btn-lg {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-lg);
    border-radius: 25px;
}

.btn-xl {
    padding: calc(var(--spacing-lg) + 2px) calc(var(--spacing-xl) * 2);
    font-size: var(--font-lg);
    border-radius: 30px;
}

/* --- Themed Action Buttons --- */
.btn-blue {
    background: linear-gradient(180deg, #55aaff, #3388dd);
    color: white;
    border: none;
    box-shadow: 0 5px 0 #2266aa, 0 8px 15px rgba(0, 0, 0, 0.3);
}

.btn-blue:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-blue:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #2266aa;
}

.btn-pink {
    background: linear-gradient(180deg, #ff77aa, #dd4488);
    color: white;
    border: none;
    box-shadow: 0 5px 0 #aa3366, 0 8px 15px rgba(0, 0, 0, 0.3);
}

.btn-pink:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-pink:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #aa3366;
}

.btn-orange {
    background: linear-gradient(180deg, #ffbb55, #dd9922);
    color: #442200;
    border: none;
    box-shadow: 0 5px 0 #aa7700, 0 8px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-orange:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-orange:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #aa7700;
}

.btn-green {
    background: linear-gradient(180deg, #22cc22, #00aa00);
    color: white;
    border: 2px solid #00ff00;
    box-shadow: 0 5px 0 #004400, 0 8px 15px rgba(0, 0, 0, 0.3);
}

.btn-green:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-green:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #004400;
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-sm);
}

.btn-geode {
    background: linear-gradient(180deg, #a855f7, #7c3aed);
    color: white;
    border: 3px solid #c084fc;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 0 #5b21b6, 0 0 20px rgba(168, 85, 247, 0.5);
}

.btn-geode:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-geode:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #5b21b6;
}

.btn-purple {
    background: linear-gradient(180deg, #6c5ce7, #4834d4);
    color: white;
    border: 2px solid #a29bfe;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.5);
}

.btn-purple:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-purple:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #4834d4;
}

.btn-teal {
    background: linear-gradient(180deg, #00b894, #00a884);
    color: white;
    border: 2px solid #55efc4;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.5);
}

.btn-teal:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-teal:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #00a884;
}

.btn-danger {
    background: linear-gradient(180deg, #ff5544, #ff4400);
    color: white;
    border: 2px solid #ff6600;
    box-shadow: 0 4px 0 #aa2200;
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #aa2200;
}

.btn-full {
    width: 100%;
}


/* ============================================================
   5. BADGES
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: var(--font-xs);
    font-weight: bold;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-gold {
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.badge-green {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.badge-purple {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
}

.badge-level {
    background: linear-gradient(135deg, #5544aa, #332266);
    border: 1px solid #7766bb;
    color: #fff;
    padding: 4px 10px;
}

.badge-current {
    background: linear-gradient(135deg, #44aa44, #226622);
    border: 1px solid #66cc66;
    color: #fff;
}


/* ============================================================
   6. ICONS
   ============================================================ */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-md {
    width: 32px;
    height: 32px;
}

.icon-lg {
    width: 48px;
    height: 48px;
}

.icon-xl {
    width: 64px;
    height: 64px;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-glow {
    filter: drop-shadow(0 0 8px currentColor);
}

.icon-glow-gold {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}


/* ============================================================
   7. LISTS
   ============================================================ */

.list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #5a3d6b;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #7d5a8f;
}

.list-item.selected {
    border-color: #ffdd00;
    background: rgba(255, 221, 0, 0.1);
}


/* ============================================================
   8. DISPLAY VALUES (Large numbers, stats)
   ============================================================ */

.display-value {
    font-size: var(--font-xxl);
    font-weight: 900;
    line-height: 1;
}

.display-value-xl {
    font-size: calc(var(--font-xxl) * 1.5);
}

.display-gold {
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 2px 2px 0 #aa8800;
}


/* ============================================================
   9. HIGHLIGHT / PILL
   ============================================================ */

.pill {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-weight: bold;
    color: #fff;
}


/* ============================================================
   10. SPACING UTILITIES
   ============================================================ */

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }


/* ============================================================
   11. FLEX UTILITIES
   ============================================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-start { align-items: flex-start; }
.flex-end { align-items: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }


/* ============================================================
   12. PADDING UTILITIES
   ============================================================ */

.p-0 { padding: 0; }
.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.px-sm { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-lg { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }

.py-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }


/* ============================================================
   13. BORDER & ROUNDED UTILITIES
   ============================================================ */

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 50%; }

.border-gold { border: 2px solid rgba(255, 215, 0, 0.5); }
.border-purple { border: 2px solid rgba(150, 100, 200, 0.5); }
.border-success { border: 2px solid rgba(68, 255, 136, 0.5); }


/* ============================================================
   14. BACKGROUND UTILITIES
   ============================================================ */

.bg-dark { background: rgba(0, 0, 0, 0.3); }
.bg-darker { background: rgba(0, 0, 0, 0.5); }
.bg-purple { background: rgba(100, 70, 140, 0.3); }
.bg-purple-dark { background: rgba(60, 40, 80, 0.6); }
.bg-gold { background: rgba(255, 215, 0, 0.15); }
.bg-success { background: rgba(100, 255, 100, 0.15); }


/* ============================================================
   15. WIDTH & SIZING UTILITIES
   ============================================================ */

.w-full { width: 100%; }
.w-auto { width: auto; }
.min-w-0 { min-width: 0; }
.overflow-hidden { overflow: hidden; }


/* ============================================================
   12. SHOP GRID SYSTEM
   ============================================================ */

.shop-grid-container {
    padding: var(--spacing-lg);
}

.shop-subtabs {
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0;
}

.shop-subtabs .tab {
    flex: 1;
    max-width: 150px;
    border-radius: var(--radius-sm);
    border: 2px solid;
}

.shop-subtabs .tab.tab-purple {
    background: linear-gradient(to bottom, #9070a8, #7050a0);
    border-color: #b090c8;
    color: white;
    box-shadow: 0 2px 0 #5030a0;
}

.shop-subtabs .tab.tab-purple.active {
    background: linear-gradient(to bottom, #9070a8, #7050a0);
    border-color: #ddbbff;
    color: white;
}


/* ============================================================
   13. GOLD PACKAGES (Buy Gold Tab)
   ============================================================ */

.gold-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    align-items: start;
}

.gold-package {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.gold-package-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(40, 25, 55, 0.95);
    border: 3px solid #4a3560;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.1s;
}

.gold-package-card:hover {
    transform: scale(1.02);
}

.gold-package-card.popular {
    border-color: #ff8844;
    background: rgba(50, 35, 65, 0.95);
    box-shadow: 0 0 15px rgba(255, 136, 68, 0.4);
}

.gold-package-card.best-value {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(60, 45, 80, 0.95) 0%, rgba(45, 30, 55, 0.95) 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.gold-package-card.bonus {
    border-color: #5a7560;
}

.gold-package-img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.gold-package-bonus {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: #44aa44;
    color: white;
    font-size: var(--font-xs);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.gold-package-bonus.orange {
    background: #ff8844;
}

.gold-package-bonus.gold {
    background: linear-gradient(180deg, #ffd700, #dda520);
    color: #442200;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gold-package-bonus.purple {
    background: #9944cc;
}

.gold-package-bonus.blue {
    background: #4488cc;
}

.gold-package-featured {
    grid-column: span 2;
}

.gold-package-featured .gold-package-card {
    width: 50%;
}

.gold-package-price {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: #22aa22;
    color: white;
    font-size: var(--font-md);
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 4px;
}

.gold-package-amount {
    font-size: var(--font-lg);
    color: #ffdd00;
    text-align: center;
    font-weight: bold;
}

.gold-package-label {
    font-size: var(--font-sm);
    color: #aaaaaa;
    margin-top: -2px;
}


/* ============================================================
   16. STASH & GEM INFO COMPONENTS
   ============================================================
   Used in Stash.js, Collection.js for gem/power displays
   ============================================================ */

/* Gem info container (when viewing gem details) */
.gem-info-box {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2.5vw, 15px);
    background: linear-gradient(135deg, rgba(60,40,80,0.6) 0%, rgba(40,25,60,0.6) 100%);
    border-radius: var(--radius-md);
    padding: clamp(8px, 2.5vw, 14px);
    border: 1px solid rgba(150,100,200,0.3);
}

/* Gem icon display */
.gem-icon {
    width: clamp(36px, 12vw, 55px);
    height: clamp(36px, 12vw, 55px);
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
    flex-shrink: 0;
}

/* Clean gem intro box (Stash default view) */
.gem-intro-box {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 16px);
    padding: 0;
}

.gem-intro-icon {
    width: clamp(40px, 11vw, 55px);
    height: clamp(40px, 11vw, 55px);
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
    flex-shrink: 0;
}

.gem-intro-text {
    font-size: clamp(14px, 3.8vw, 17px);
    color: #e0e0e0;
    line-height: 1.5;
}

/* Highlight text colors */
.text-highlight-gold {
    color: #ffd700;
    font-weight: 600;
}

.text-highlight-cyan {
    color: #66ddff;
    font-weight: 600;
}

.gem-icon-sm {
    width: clamp(24px, 7vw, 36px);
    height: clamp(24px, 7vw, 36px);
    object-fit: contain;
}

.gem-icon-lg {
    width: clamp(40px, 10vw, 60px);
    height: clamp(40px, 10vw, 60px);
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
}

/* Stat display boxes */
.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    min-width: 60px;
}

.stat-box-row {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Power description box */
.power-box {
    background: linear-gradient(135deg, rgba(80,60,100,0.9) 0%, rgba(60,40,80,0.9) 100%);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,200,0,0.4);
    text-align: center;
}

/* Discovery stat cards */
.discovery-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(30,20,40,0.4));
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(150,100,200,0.3);
}

/* Info section with icon and text */
.info-row {
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 10px);
}

/* Promo/special card */
.promo-card {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(100,60,150,0.3) 0%, rgba(60,30,100,0.3) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(150,100,200,0.3);
    text-align: center;
}


/* ============================================================
   17. ACHIEVEMENT & BADGE COMPONENTS
   ============================================================ */

/* Level badge (bronze/silver/gold) */
.level-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: var(--font-xs);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.level-badge-bronze {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
    border: 1px solid #daa520;
}

.level-badge-silver {
    background: linear-gradient(135deg, #e8e8e8, #a0a0a0);
    color: #333;
    border: 1px solid #d0d0d0;
}

.level-badge-gold {
    background: linear-gradient(135deg, #d4a84b, #b8923f);
    color: #fff;
    border: 1px solid #c9a044;
}

/* Progress bar */
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    border-radius: 3px;
}


/* ============================================================
   18. STASH TAB STYLES
   ============================================================ */

.stash-tab-active {
    background: linear-gradient(180deg, #6644aa 0%, #442266 100%) !important;
    border-color: #8866cc !important;
    color: #fff !important;
}

.stash-tab-inactive {
    background: rgba(60,40,80,0.6) !important;
    border-color: rgba(100,80,140,0.4) !important;
    color: #aaa !important;
}


/* ============================================================
   19. DISCOVERIES PANEL COMPONENTS
   ============================================================ */

.discovery-section {
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 2px solid;
}

/* Space between discovery sections */
.discovery-section + .discovery-section {
    margin-top: var(--spacing-lg);
}

.discovery-section-gold {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(180,140,0,0.1) 100%);
    border-color: rgba(255,215,0,0.3);
}

.discovery-section-geode {
    background: linear-gradient(135deg, rgba(150,100,255,0.15) 0%, rgba(100,60,180,0.1) 100%);
    border-color: rgba(150,100,255,0.3);
}

.discovery-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.discovery-header-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
}

/* Gold icon gets a glow, geode doesn't need it */
.discovery-section-gold .discovery-header-icon {
    filter: drop-shadow(0 0 6px rgba(255, 200, 0, 0.6));
}

.discovery-section-geode .discovery-header-icon {
    filter: none;
}

.discovery-header-text {
    display: flex;
    flex-direction: column;
}

.discovery-header-title {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: bold;
}

.discovery-header-subtitle {
    font-size: clamp(14px, 3.8vw, 17px);
    color: var(--color-text-muted);
}

.discovery-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.discovery-stat {
    background: rgba(0,0,0,0.3);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    text-align: center;
}

.discovery-stat-value {
    font-size: clamp(24px, 7vw, 32px);
    font-weight: bold;
}

.discovery-stat-label {
    font-size: clamp(14px, 3.8vw, 17px);
    color: var(--color-text-muted);
}

.discovery-bonus-notice {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(100,255,100,0.15);
    border-radius: var(--radius-sm);
    text-align: center;
    color: #88ff88;
    font-size: var(--font-sm);
}


/* ============================================================
   20. STASH ITEM SELECTED STATE
   ============================================================ */

.stash-item-selected {
    border-color: #ffd700 !important;
}


/* ============================================================
   21. USE POWER BUTTON STATES
   ============================================================ */

/* btn-use-power styles are in buttons.css */
/* These are modifier classes only */

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

.btn-use-power-enabled {
    opacity: 1;
    cursor: pointer;
}


/* ============================================================
   GEM POWER DISPLAY (Stash modal)
   ============================================================ */

.gem-power-display {
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.gem-power-text {
    font-size: clamp(16px, 4.2vw, 20px);
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

/* Power label inline with text */
.gem-power-label {
    font-weight: 800;
    color: #7ecfff;
    letter-spacing: 1px;
}


/* ============================================================
   22. MODAL TITLE WITH ICON
   ============================================================ */

.modal-title-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
}

.modal-title-icon {
    width: clamp(24px, 7vw, 36px);
    height: clamp(24px, 7vw, 36px);
    object-fit: contain;
}

.modal-title-icon-lg {
    font-size: 40px;
}


/* ============================================================
   23. STASH GEM IMAGE STYLES
   ============================================================ */

.stash-gem-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.stash-gold-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.stash-gem-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gem-color, #ffffff);
    box-shadow: 0 0 10px var(--gem-color, #ffffff);
}

/* Speed indicator colors */
.speed-slow { color: #ffaa00; }
.speed-normal { color: #00ff00; }
.speed-fast { color: #ff4444; }


/* ============================================================
   24. BUY GOLD BUTTON (in stash)
   ============================================================ */

.btn-buy-gold {
    background: linear-gradient(to bottom, #ffcc00, #cc9900);
    color: #442200;
    border: 2px solid #ffdd44;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: var(--font-md);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #aa7700;
}


/* ============================================================
   25. GOLD INFO DISPLAY (when gold selected in stash)
   ============================================================ */

.gold-info-title {
    font-size: clamp(20px, 6vw, 28px);
    color: #FFD700;
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

.gold-info-subtitle {
    font-size: var(--font-md);
    color: #e0e0e0;
    margin-bottom: var(--spacing-lg);
}


/* ============================================================
   26. GRID UTILITIES
   ============================================================ */

.grid-span-full {
    grid-column: 1 / -1;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}


/* ============================================================
   27. EMPTY STATE / PLACEHOLDER
   ============================================================ */

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--spacing-xl);
}


/* ============================================================
   28. EMOJI / ICON SIZES
   ============================================================ */

.emoji-sm { font-size: 28px; }
.emoji-md { font-size: 40px; }
.emoji-lg { font-size: 48px; }
.emoji-xl { font-size: 64px; }
.emoji-no-pointer { pointer-events: none; }


/* ============================================================
   29. INLINE INFO STYLES
   ============================================================ */

.info-highlight {
    font-size: var(--font-sm);
    color: #c0b0d0;
}

.info-highlight-value {
    color: #ffd700;
    font-weight: bold;
}

.info-highlight-special {
    color: #ff88ff;
    font-weight: bold;
}


/* ============================================================
   30. SECTION HEADERS (Detail Views)
   ============================================================ */

.detail-title {
    font-size: clamp(20px, 5.5vw, 28px);
    font-weight: bold;
    color: #00ff44;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Lore article header - left aligned, no background box */
.lore-article-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.lore-article-icon {
    width: clamp(36px, 10vw, 50px);
    height: clamp(36px, 10vw, 50px);
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
    flex-shrink: 0;
}

.lore-article-icon-fallback {
    font-size: clamp(28px, 8vw, 40px);
}

.lore-article-title {
    font-size: clamp(22px, 6vw, 30px);
    font-weight: bold;
    color: #ffcc00;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.4);
}

/* Detail view container - clean padding only */
#specimen-detail-view {
    padding: var(--spacing-lg);
    margin: 0;
}

/* When detail view is active, restore top border on modal panel */
#collection-modal.detail-active .stash-panel {
    border-top: 4px solid #7d5a8f;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

/* YouTube video embed container */
.lore-video-container {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.lore-youtube-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* YouTube native app container (when iframe doesn't work) */
.youtube-native-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.btn-youtube-external {
    position: absolute;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #fff;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-youtube-external:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-youtube-external:active {
    transform: scale(0.98);
}

/* Lore article text - left aligned with proper paragraphs */
.lore-article-text {
    font-size: clamp(15px, 4vw, 18px);
    color: #e0e0e0;
    line-height: 1.7;
    text-align: left;
    margin-bottom: var(--spacing-lg);
    padding: 0 clamp(10px, 3vw, 16px);
}

.lore-article-text p {
    margin: 0 0 clamp(16px, 4vw, 24px) 0;
}

.lore-article-text p:last-child {
    margin-bottom: 0;
}

/* Specimen Large Image (for RARE tab lore pages) */
.specimen-image-container {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 30px rgba(150,100,200,0.3);
    border: 2px solid rgba(150,100,200,0.4);
}

.specimen-large-image {
    width: 100%;
    height: auto;
    display: block;
}

.specimen-image-fallback {
    text-align: center;
    padding: 60px;
    font-size: 60px;
}


/* ============================================================
   31. LORE DETAIL VIEW COMPONENTS
   ============================================================ */

.lore-header {
    background: linear-gradient(135deg, rgba(80,60,100,0.9) 0%, rgba(60,40,80,0.9) 100%);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,200,0,0.4);
    margin-bottom: var(--spacing-lg);
}

.lore-power-text {
    font-size: clamp(15px, 3.8vw, 17px);
    color: #ffcc00;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
}

.lore-image-container {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.3);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    max-height: 180px;
}

.lore-image-container-desktop {
    padding: 20px;
    max-height: 250px;
}

.lore-image {
    max-width: 60%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
}

.lore-image-desktop {
    max-width: 50%;
}

.lore-description {
    font-size: clamp(15px, 3.8vw, 18px);
    color: #ccc;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.lore-rarity-box {
    font-size: clamp(15px, 3.8vw, 17px);
    color: #ffdd00;
    font-weight: bold;
    text-align: center;
    background: rgba(0,0,0,0.3);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}


/* ============================================================
   32. PROMO CARD (Magicka Academy, etc.)
   ============================================================ */

.promo-card {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(100,60,150,0.3) 0%, rgba(60,30,100,0.3) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(150,100,200,0.3);
    text-align: center;
}

.promo-card-text {
    font-size: clamp(14px, 3.5vw, 16px);
    color: #bb99dd;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.btn-promo-purple {
    background: linear-gradient(180deg, #8855cc 0%, #6633aa 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: clamp(15px, 3.8vw, 17px);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #4422aa, 0 0 15px rgba(136,85,204,0.4);
}

/* Compact promo card (above article) */
.promo-card-compact {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.btn-promo-purple-sm {
    background: linear-gradient(180deg, #8855cc 0%, #6633aa 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 8px 16px;
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #4422aa;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-promo-purple-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #4422aa;
}

.btn-promo-purple-sm:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #4422aa;
}


/* ============================================================
   33. ERROR / ALERT MODALS
   ============================================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.error-modal-box {
    background: linear-gradient(135deg, #3a1a1a, #250a0a);
    border: 3px solid #cc4444;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
}

.error-modal-content {
    padding: var(--spacing-xl);
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
}

.error-title {
    font-size: clamp(18px, 5vw, 22px);
    font-weight: bold;
    color: #ff6666;
    margin-bottom: var(--spacing-lg);
}

.error-message {
    font-size: var(--font-md);
    color: #ccc;
    margin-bottom: var(--spacing-xl);
}

.btn-error-close {
    padding: 12px 30px;
    background: linear-gradient(180deg, #666, #444);
    color: #ddd;
    border: none;
    border-radius: 10px;
    font-size: var(--font-md);
    font-weight: bold;
    cursor: pointer;
}


/* ============================================================
   34. SUCCESS MODAL
   ============================================================ */

.success-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
}

.success-title {
    font-size: clamp(24px, 6vw, 28px);
    font-weight: bold;
    color: #44ff44;
    margin-bottom: var(--spacing-sm);
}

.success-message {
    font-size: var(--font-md);
    color: #aaffaa;
    margin-bottom: var(--spacing-lg);
}

.success-submessage {
    font-size: var(--font-sm);
    color: #88cc88;
    margin-bottom: var(--spacing-xl);
}

.success-modal-box {
    background: linear-gradient(135deg, #1a3a1a, #0a250a);
    border: 3px solid #44cc44;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,200,0,0.3);
    animation: successPop 0.4s ease-out;
}

.btn-success-continue {
    padding: 14px 40px;
    background: linear-gradient(180deg, #44cc44, #339933);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: var(--font-lg);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #226622;
}


/* ============================================================
   35. BUTTON TEXT SIZES
   ============================================================ */

.btn-text-sm {
    font-size: clamp(10px, 2.5vw, 13px);
    font-weight: bold;
}


/* ============================================================
   36. TICKET/UNLOCK BUTTON CONTENT
   ============================================================ */

.ticket-icon {
    font-size: clamp(20px, 5vw, 28px);
    margin-right: 6px;
}

.ticket-text {
    font-size: clamp(14px, 3.5vw, 18px);
}

.ticket-gold-icon {
    width: clamp(22px, 5.5vw, 28px);
    height: clamp(22px, 5.5vw, 28px);
    object-fit: contain;
    filter: drop-shadow(0 0 3px #FFD700);
    margin-left: 6px;
}


/* ============================================================
   37. ACHIEVEMENT GEM DISPLAY
   ============================================================ */

.achievement-gem-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.achievement-gem-placeholder {
    width: 45px;
    height: 45px;
    background: #666;
    border-radius: 50%;
}

.achievement-gem-name {
    font-size: var(--font-xs);
    text-align: center;
    line-height: 1.2;
}

.achievement-gem-name-exotic {
    color: #e0c0ff;
}

.achievement-gem-name-normal {
    color: #c0b0d0;
}

.achievement-gem-count {
    font-size: var(--font-lg);
    color: #ffd700;
    font-weight: bold;
}


/* ============================================================
   38. RANK BADGE IMAGE
   ============================================================ */

.rank-badge-img {
    width: 256px;
    height: 256px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
}


/* ============================================================
   39. ACHIEVEMENT SECTION LABELS
   ============================================================ */

.achievement-section-label {
    font-size: var(--font-md);
    color: #c0a0ff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ============================================================
   40. GOLD STATS DISPLAY
   ============================================================ */

.gold-stats-icon {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px #ffd700);
}

.gold-stats-label {
    font-size: var(--font-md);
    color: #ffc107;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gold-stats-value {
    font-size: clamp(28px, 7vw, 36px);
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}


/* ============================================================
   41. GEM IMAGE/BUTTON IN GRIDS
   ============================================================ */

.gem-btn-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.gem-fallback-emoji {
    font-size: 42px;
    pointer-events: none;
}

.gem-fallback-emoji-sm {
    font-size: 28px;
    pointer-events: none;
}


/* ============================================================
   42. INVENTORY COUNT BADGE
   ============================================================ */

.inventory-count-badge {
    background: linear-gradient(135deg, rgba(40,20,60,0.98), rgba(20,10,30,0.98));
    border: 2px solid #ff88aa;
    color: #ffddee;
    font-size: clamp(18px, 4.5vw, 24px);
    font-weight: 900;
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2.5vw, 16px);
    border-radius: clamp(8px, 2vw, 12px);
    text-shadow: 0 0 8px rgba(255,136,170,0.8);
    text-align: center;
}


/* ============================================================
   43. BUTTON INNER TEXT (for labeled buttons)
   ============================================================ */

.btn-inner-text {
    font-size: clamp(12px, 3.2vw, 15px);
    font-weight: bold;
}


/* ============================================================
   44. INLINE MESSAGES (Location unlock, etc.)
   ============================================================ */

.inline-msg-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    margin-bottom: var(--spacing-md);
}

.inline-msg-title-purple {
    color: #aa88ff;
}

.inline-msg-title-blue {
    color: #88aaff;
}

.inline-msg-text {
    font-size: var(--font-md);
    color: #ddd;
    margin-bottom: var(--spacing-sm);
}

.inline-msg-subtext {
    font-size: var(--font-sm);
    color: #ccc;
}

.inline-msg-detail {
    font-size: var(--font-sm);
    color: #aaa;
    margin-top: var(--spacing-sm);
}


/* ============================================================
   45. TAB STATES (Active/Inactive for Collection tabs)
   ============================================================ */

/* Base inactive tab state */
.tab-inactive {
    background: linear-gradient(180deg, #3a2850 0%, #2a1c3a 100%) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    border-color: #6a5580 !important;
    text-shadow: none !important;
}

/* Gold tab active - Golden amber style */
.tab-gold-active {
    background: linear-gradient(180deg, #dda522, #bb8811) !important;
    color: #442200 !important;
    border-color: #ffcc44 !important;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3) !important;
}

/* Gems tab active - Pink/magenta style */
.tab-gems-active {
    background: linear-gradient(180deg, #ff77aa, #dd4488) !important;
    color: white !important;
    border-color: #ff88bb !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* Rare tab active - Purple/violet style */
.tab-rare-active {
    background: linear-gradient(180deg, #9966cc, #7744aa) !important;
    color: white !important;
    border-color: #bb88dd !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
}

/* Rare tab active */
.tab-rare-active {
    background: linear-gradient(to bottom, #5a3d7a, #3d2a5a);
    color: #da70d6;
    border-color: #7a5a9a;
    text-shadow: 0 0 10px rgba(218, 112, 214, 0.5);
}

/* Sub-tab states for Stash */
.subtab-specimens-active {
    background: linear-gradient(to bottom, #9070a8, #7050a0);
    color: white;
    border-color: #b090c8;
    box-shadow: 0 2px 0 #5030a0;
    opacity: 1;
}

.subtab-specimens-inactive {
    background: linear-gradient(to bottom, #5a4570, #4a3560);
    color: #aa88cc;
    border-color: #6a5580;
    box-shadow: none;
    opacity: 0.85;
}

.subtab-gems-active {
    background: linear-gradient(to bottom, #44aa88, #338866);
    color: white;
    border-color: #66ccaa;
    box-shadow: 0 2px 0 #226644;
    opacity: 1;
}

.subtab-gems-inactive {
    background: linear-gradient(to bottom, #225544, #114433);
    color: #88ccaa;
    border-color: #336655;
    box-shadow: none;
    opacity: 0.85;
}


/* ============================================================
   46. EMPTY GRID MESSAGES
   ============================================================ */

.grid-empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 30px;
}

.grid-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}


/* ============================================================
   47. PURCHASE CONFIRMATION MODAL
   ============================================================ */

.purchase-title {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: bold;
    color: #00ff44;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 10px;
}

.purchase-info-box {
    background: linear-gradient(135deg, rgba(80,60,100,0.9) 0%, rgba(60,40,80,0.9) 100%);
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255,200,0,0.4);
}

.purchase-info-text {
    font-size: 15px;
    color: #ffcc00;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
}

.purchase-gold-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.purchase-gold-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(255,200,0,0.8));
}

.purchase-gold-amount {
    font-size: 28px;
    color: #FFD700;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(255,215,0,0.8), 2px 2px 0 #aa8800;
}

.purchase-gold-label {
    font-size: 16px;
    color: #ffdd88;
    font-weight: bold;
}

.purchase-image-container {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-specimen-image {
    max-width: 60%;
    max-height: 250px;
    width: auto;
    height: auto;
    display: block;
}

.purchase-description {
    font-size: clamp(14px, 3.5vw, 17px);
    color: #ccc;
    line-height: 1.6;
    text-align: center;
}


/* ============================================================
   48. SPECIMEN/GEM PLACEHOLDERS
   ============================================================ */

.gem-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gem-placeholder-icon {
    font-size: 32px;
}

.gem-placeholder-icon-lg {
    font-size: 36px;
}

.gem-placeholder-icon-xl {
    font-size: 60px;
}

.power-label {
    color: #ffaa66;
}


/* ============================================================
   49. CONTROLS SPACING
   ============================================================ */

.mute-btn-spaced {
    margin-left: 10px;
}


/* ============================================================
   50. ACHIEVEMENT PROGRESS BARS
   ============================================================ */

.achievement-progress-container {
    width: 90%;
    margin-top: 5px;
}

.achievement-progress-bar-bg {
    background: rgba(0,0,0,0.4);
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}

.achievement-progress-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

.achievement-progress-bar-max {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    height: 10px;
    border-radius: 5px;
}

.achievement-progress-text {
    font-size: 10px;
    text-align: center;
    margin-top: 3px;
}

.achievement-progress-text-gold {
    color: #ffd700;
}

.achievement-progress-text-muted {
    color: #aaa;
}

/* Achievement gem item card */
.achievement-gem-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 10px;
    padding: 10px 5px 8px 5px;
}

/* Achievement exotic gems section header */
.achievement-exotic-header {
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px 10px 8px 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(200, 150, 255, 0.3);
}

/* Achievement separator line */
.achievement-separator {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(200, 150, 255, 0.4) 50%, transparent 100%);
    margin: 15px 0;
}

/* Achievement gold stats card */
.achievement-gold-stat {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Collector rank badge in achievements */
.collector-rank-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.collector-rank-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c8a0ff;
}

.collector-rank-badge {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Gold stats styling */
.gold-stats-icon {
    width: 40px;
    height: 40px;
}

.gold-stats-label {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffd700;
}

.gold-stats-value {
    font-size: 24px;
    font-weight: 900;
    color: #ffd700;
}

/* Achievement gem count - make it responsive */
.achievement-gem-count {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}


/* ============================================================
   52. FLOATING AUDIO CONTROL
   ============================================================ */

.floating-audio-control {
    position: fixed;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: linear-gradient(135deg, rgba(80, 40, 120, 0.95) 0%, rgba(40, 20, 60, 0.95) 100%);
    border: 2px solid #9966cc;
    border-radius: 30px;
    padding: 8px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(153, 102, 204, 0.4);
    animation: audioControlPulse 2s ease-in-out infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-audio-control.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-20px);
}

@keyframes audioControlPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(153, 102, 204, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(153, 102, 204, 0.6); }
}

.audio-control-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-control-label {
    font-size: clamp(12px, 3vw, 14px);
    font-weight: bold;
    color: #e0c0ff;
    white-space: nowrap;
}

.audio-control-btn {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border: none;
    border-radius: 50%;
    background: linear-gradient(180deg, #6644aa 0%, #442288 100%);
    color: white;
    font-size: clamp(14px, 4vw, 18px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 3px 0 #331166;
}

.audio-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #331166;
}

.audio-control-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #331166;
}

.audio-back-btn {
    background: linear-gradient(180deg, #4488cc 0%, #2266aa 100%) !important;
    box-shadow: 0 3px 0 #113366 !important;
}

.audio-back-btn:hover {
    box-shadow: 0 5px 0 #113366 !important;
}

.audio-stop-btn {
    background: linear-gradient(180deg, #cc4444 0%, #aa2222 100%) !important;
    box-shadow: 0 3px 0 #661111 !important;
}

.audio-stop-btn:hover {
    box-shadow: 0 5px 0 #661111 !important;
}

.video-stopped-placeholder {
    background: rgba(0,0,0,0.5);
    color: #888;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    border-radius: 8px;
}

/* ============================================================
   TAP TO RESUME AUDIO INDICATOR (iOS audio unlock)
   ============================================================ */

.tap-to-resume-audio-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 24px 32px;
    border-radius: 16px;
    z-index: 99998;
    text-align: center;
    border: 2px solid rgba(255, 200, 0, 0.6);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    animation: tapResumeAppear 0.3s ease-out, tapResumePulse 2s ease-in-out infinite;
    pointer-events: none;
}

.tap-resume-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: tapResumeIconPulse 1s ease-in-out infinite;
}

.tap-resume-text {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes tapResumeAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes tapResumePulse {
    0%, 100% {
        border-color: rgba(255, 200, 0, 0.6);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    }
    50% {
        border-color: rgba(255, 215, 0, 1);
        box-shadow: 0 0 40px rgba(255, 200, 0, 0.3);
    }
}

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


