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

:root {
    /* Modern Dark Theme - Minimal & Clean */
    --bg: #0a0a0a;
    --surface: #141414;
    --elevated: #1a1a1a;
    --border: #2a2a2a;
    --text: #ffffff;
    --text-dim: #a3a3a3;
    --text-muted: #6b7280;
    --accent: #3b82f6;
    --accent-dim: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Enhanced Colors */
    --stat-positive: #00d084;
    --stat-requirement: #ff8c42;
    --stat-info: #17a2b8;
    --activity-mining: #8d6e63;
    --activity-fishing: #42a5f5;
    --activity-farming: #66bb6a;
    --activity-foraging: #ab47bc;
    --activity-hacking: #ff7043;
    
    /* Rarity Colors */
    --legendary: #ff6b35;
    --epic: #9c27b0;
    --rare: #2196f3;
    --uncommon: #4caf50;
    --common: #757575;
}

[data-theme="light"] {
    --bg: #ffffff;
    --surface: #f9fafb;
    --elevated: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-dim: #6b7280;
    --text-muted: #9ca3af;
    --accent: #3b82f6;
    --accent-dim: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, rgba(14, 14, 14, 0.95) 100%);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 16px 16px;
    z-index: 999999;
    transition: all 0.3s;
}

[data-theme="light"] .header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.98) 100%);
}

body[data-theme="light"] {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%) !important;
}

[data-theme="light"] .welcome {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%) !important;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

[data-theme="light"] .quick-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%) !important;
}

[data-theme="light"] .quick-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
}

[data-theme="light"] .detail-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 48px;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-image {
    height: 36px;
    width: auto;
    transition: all 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    font-weight: 400;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.theme-option {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s;
}

.theme-option.active {
    background: var(--accent);
    color: white;
}

.stats {
    display: none !important;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-value {
    color: var(--text);
    font-weight: 500;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 24px;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--surface) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-radius: 16px;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 104px;
    transition: background-color 0.3s;
    overflow: hidden;
}

.search-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--accent);
}

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

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}

.filter {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 6px 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.filter:hover {
    background: var(--border);
}

.filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.items {
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px;
}

.items::-webkit-scrollbar {
    width: 4px;
}

.items::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.item:hover {
    background: var(--elevated);
}

.item.selected {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.item-icon {
    width: 32px;
    height: 32px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    background-repeat: no-repeat;
    flex-shrink: 0;
    overflow: hidden;
    image-rendering: pixelated;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.2;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-type {
    font-size: 11px;
    color: var(--text-dim);
}

.item-level {
    font-size: 10px;
    background: var(--stat-info);
    color: white;
    padding: 1px 4px;
    border-radius: 0;
    font-weight: 500;
}

.rarity-indicator {
    width: 3px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.rarity-0 { background: var(--common); }
.rarity-1 { background: var(--uncommon); }
.rarity-2 { background: var(--rare); }
.rarity-3 { background: var(--epic); }
.rarity-4 { background: var(--legendary); }

/* Main Content */
.welcome {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-radius: 16px;
    border: 1px solid var(--border);
    height: fit-content;
    overflow: hidden;
    transition: background-color 0.3s;
}

.welcome h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome p {
    color: var(--text-dim);
    margin-bottom: 32px;
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.welcome-stat {
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(102, 126, 234, 0.03) 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.welcome-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
    opacity: 0.6;
}

.welcome-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(102, 126, 234, 0.08) 100%);
}

.welcome-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
}

.welcome-stat-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Item Detail */
.detail {
    display: none;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    height: fit-content;
    overflow: hidden;
    transition: background-color 0.3s;
}

.detail.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(20, 20, 20, 0.9) 100%);
}

.detail-icon {
    width: 64px;
    height: 64px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    background-repeat: no-repeat;
    flex-shrink: 0;
    overflow: hidden;
    image-rendering: pixelated;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-description {
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.4;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.badge.rarity {
    border-color: var(--accent);
    color: var(--accent);
}

.badge.item-level {
    background: var(--stat-info);
    border-color: var(--stat-info);
    color: white;
}

.compare-btn {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.compare-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
}

.compare-header-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.compare-header-btn:hover {
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.detail-content {
    flex: 1;
    padding: 24px;
}

/* Stats Display */
.stats-section {
    margin-bottom: 24px;
}

.stats-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-title.positive::before {
    content: "●";
    color: var(--stat-positive);
}

.stats-title.requirement::before {
    content: "●";
    color: var(--stat-requirement);
}

.stats-title.activity::before {
    content: "●";
    color: var(--activity-mining);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card.positive {
    border-left: 3px solid var(--stat-positive);
}

.stat-card.requirement {
    border-left: 3px solid var(--stat-requirement);
}

.stat-card.info {
    border-left: 3px solid var(--stat-info);
}

.stat-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.stat-value.positive {
    color: var(--stat-positive);
}

.stat-value.requirement {
    color: var(--stat-requirement);
}

.stat-value.info {
    color: var(--stat-info);
}

/* Activity sections */
.activity-section {
    background: var(--elevated);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid var(--activity-mining);
}

.activity-section.fishing {
    border-left-color: var(--activity-fishing);
}

.activity-section.farming {
    border-left-color: var(--activity-farming);
}

.activity-section.foraging {
    border-left-color: var(--activity-foraging);
}

.activity-section.hacking {
    border-left-color: var(--activity-hacking);
}

.activity-section.chest {
    border-left-color: var(--warning);
}

.activity-section.combat {
    border-left-color: var(--danger);
}

.activity-section.quest {
    border-left-color: var(--accent);
}

.activity-section.other {
    border-left-color: var(--text-dim);
}

.activity-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-requirements {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.drop-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drop-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drop-item-icon {
    width: 24px;
    height: 24px;
    background: var(--elevated);
    border: 1px solid var(--border);
    background-repeat: no-repeat;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.reward-item-icon {
    width: 32px;
    height: 32px;
    background: var(--elevated);
    border: 1px solid var(--border);
    background-repeat: no-repeat;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.reward-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.reward-item-text {
    font-weight: 500;
    color: var(--text);
}

.drop-chance {
    background: rgba(0, 208, 132, 0.2);
    color: var(--stat-positive);
    border: 1px solid rgba(0, 208, 132, 0.3);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.drop-rolls {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
    padding: 2px 6px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
    text-align: center;
    cursor: help;
}

.drop-rolls:hover {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.5);
}

/* Nested Loot Table Styling */
.nested-table-container {
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 8px;
    background: var(--surface);
}

.nested-table-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    background: var(--elevated);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.nested-table-header:hover {
    background: rgba(59, 130, 246, 0.1);
}

.nested-table-header.collapsed {
    border-bottom: none;
}

.expand-arrow {
    margin-left: auto;
    color: var(--text-dim);
    font-size: 12px;
    transition: transform 0.2s;
}

.nested-items {
    padding: 8px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.nested-drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin-bottom: 4px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    font-size: 12px;
}

.nested-drop-item:last-child {
    margin-bottom: 0;
}

.drop-item-icon.nested {
    width: 20px;
    height: 20px;
}

.drop-chance.nested {
    background: rgba(0, 208, 132, 0.15);
    color: var(--stat-positive);
    border: 1px solid rgba(0, 208, 132, 0.2);
    padding: 1px 4px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 500;
    min-width: 35px;
    text-align: center;
}


/* Tabs */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
    overflow-x: auto;
}

.detail-tab {
    background: none;
    border: none;
    padding: 12px 16px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.detail-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.detail-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(0, 123, 255, 0.05);
}

.tab-content {
    display: none;
    padding: 24px;
    flex: 1;
}

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

/* Loading/Error States */
.loading, .error {
    padding: 32px;
    text-align: center;
    color: var(--text-dim);
}

.error {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 8px;
        gap: 16px;
        margin-top: 0;
    }
    
    .sidebar {
        position: static;
        order: 2;
        width: 100%;
        max-width: none;
        padding: 16px;
        margin: 0;
    }
    
    .search-section {
        margin-bottom: 16px;
    }
    
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
    }
    
    .filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .filter {
        padding: 8px 12px;
        font-size: 13px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .items {
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .welcome {
        order: 1;
        padding: 16px;
        margin: 0;
    }
    
    .detail {
        padding: 16px;
        margin: 0;
    }
    
    .detail-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    /* Improve item grid on mobile */
    .item {
        padding: 12px;
        min-height: 60px;
    }
    
    .item-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .item-name {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .item-meta {
        font-size: 12px;
    }

    .header-controls {
        flex-direction: column;
        gap: 12px;
    }

    .stats {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .landing-title {
        font-size: 32px;
    }
    
    .landing-logo {
        height: 56px;
    }
    
    .welcome {
        padding: 24px;
    }
    
    .quick-start-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Compare Modal Styles */
.compare-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.compare-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 90%;
    max-width: 1400px;
    max-height: 95%;
    overflow-y: auto;
}

/* Armor Set Builder Specific Styles */
.armor-sets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.armor-sets-row {
    display: contents;
}

.armor-set {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.armor-set h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--accent);
    font-weight: 600;
}

.equipment-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.equipment-slot {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.equipment-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equipment-slot:hover {
    border-color: var(--accent);
    background: var(--elevated);
    transform: translateY(-2px);
}

.equipment-slot:hover::before {
    opacity: 1;
}

.equipment-slot.filled {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(80, 200, 120, 0.1) 100%);
    position: relative;
}

.equipment-slot.filled::after {
    content: '×';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.equipment-slot.filled:hover::after {
    opacity: 1;
}

.slot-sprite {
    width: 40px;
    height: 40px;
    background: var(--elevated);
    border-radius: 6px;
    margin: 0 auto 8px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.slot-sprite.has-item {
    border-color: var(--accent);
    background: var(--elevated);
}

.slot-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slot-item {
    font-size: 12px;
    color: var(--text);
    line-height: 1.2;
    word-break: break-word;
}

.set-stats {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.set-stats h4 {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.stat-totals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 12px;
}

.stat-total {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.stat-total:last-child {
    border-bottom: none;
}

.item-selector {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.selector-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.selector-controls input,
.selector-controls select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

.selector-controls input {
    flex: 1;
}

.selector-controls button {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.selector-controls button:hover {
    background: var(--elevated);
    border-color: var(--accent);
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.equipment-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.equipment-item:hover {
    background: var(--elevated);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.equipment-item-icon {
    width: 32px;
    height: 32px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

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

.equipment-item-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.equipment-item-type {
    color: var(--text-dim);
    font-size: 11px;
}

/* Armor Set Comparison Styles */
.armor-set-comparison {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    grid-column: 1 / -1;
}

.armor-set-comparison h3 {
    margin-bottom: 16px;
    text-align: center;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.comparison-row:hover {
    background: var(--elevated);
    transform: translateY(-1px);
}

.comparison-row.set1-better {
    border-left: 3px solid var(--success);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(80, 200, 120, 0.05) 100%);
}

.comparison-row.set2-better {
    border-left: 3px solid var(--danger);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(239, 83, 80, 0.05) 100%);
}

.comparison-row.tied {
    border-left: 3px solid var(--text-dim);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(153, 153, 168, 0.05) 100%);
}

.stat-name {
    font-weight: 600;
    color: var(--text);
}

.stat-values {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.set1-value {
    background: var(--elevated);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    text-align: center;
}

.set2-value {
    background: var(--elevated);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    text-align: center;
}

.comparison-icon {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent);
}

.stat-difference {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    min-width: 50px;
}

.set1-better .stat-difference {
    color: var(--success);
    background: rgba(80, 200, 120, 0.1);
}

.set2-better .stat-difference {
    color: var(--danger);
    background: rgba(239, 83, 80, 0.1);
}

@media (max-width: 1024px) {
    .armor-sets-container {
        grid-template-columns: 1fr;
    }
    
    .equipment-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-totals {
        grid-template-columns: 1fr;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .stat-values {
        justify-content: space-around;
    }
}

.compare-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--elevated), var(--surface));
    border-radius: 16px 16px 0 0;
}

.compare-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
}

.close-compare {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-compare:hover {
    color: var(--text);
    background: var(--border);
    transform: scale(1.1);
}

.compare-body {
    padding: 32px;
}

.weapon-selector {
    margin-bottom: 20px;
}

#weapon-search {
    width: 100%;
    padding: 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

#weapon-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.weapon-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--elevated);
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--elevated);
}

.weapon-list::-webkit-scrollbar {
    width: 6px;
}

.weapon-list::-webkit-scrollbar-track {
    background: var(--elevated);
}

.weapon-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.weapon-item {
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.weapon-item:hover {
    background: var(--surface);
    padding-left: 20px;
}

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

.weapon-item:hover {
    background: var(--bg);
}

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

.comparison-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.weapon-comparison {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.comparison-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--bg);
    border-radius: 4px;
}

.stat-comparison.better {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid var(--success);
}

.stat-comparison.worse {
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid var(--danger);
}

/* Smart Landing Page Styles */
.landing-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.landing-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #f093fb, transparent);
    opacity: 0.6;
}

.landing-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}

.landing-logo {
    height: 64px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 8px 32px rgba(102, 126, 234, 0.3));
}

.landing-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 48px;
    font-weight: 400;
    color: var(--text);
    margin: 0;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.landing-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 48px rgba(102, 126, 234, 0.4));
}

.landing-header p {
    font-size: 1.2rem;
    color: var(--text-dim);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.quick-start, .popular-searches, .help-section {
    margin-bottom: 40px;
}

.quick-start h2, .popular-searches h2, .help-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text);
}

.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.quick-card {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(20, 20, 20, 0.9) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(26, 26, 26, 0.95) 100%);
}

[data-theme="light"] .quick-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.quick-card-icon {
    font-size: 2.5rem;
    margin: 0 auto 16px;
    min-height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.quick-card:hover .quick-card-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.beta-badge {
    background: var(--accent);
    color: white;
    padding: 8px 6px;
    border-radius: 16px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    align-self: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    min-height: 28px;
    min-width: 32px;
    max-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.quick-card:has(.beta-badge) {
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(102, 126, 234, 0.08) 100%);
    border: 2px solid var(--accent);
    position: relative;
}

.quick-card:has(.beta-badge) .quick-card-title {
    font-size: 1.3rem;
    color: var(--accent);
    text-align: center;
}

.quick-card-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.4;
}

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

.search-suggestion {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-suggestion:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.help-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.help-content {
    flex: 1;
}

.help-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.help-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Enhanced Recipe Styles */
.recipe-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 0px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.recipe-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.recipe-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.recipe-station {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: capitalize;
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 0px;
    display: inline-block;
    margin-top: 4px;
}

.materials-title {
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text);
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.material-item:hover {
    border-color: var(--accent);
    background: var(--elevated);
}

.material-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-clickable:hover {
    border-color: var(--accent) !important;
    background: var(--elevated) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.material-clickable .material-name {
    color: var(--accent);
    font-weight: 500;
}

.material-highlighted {
    border-color: var(--positive) !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.material-highlighted .material-name {
    color: var(--positive) !important;
    font-weight: 600 !important;
}

.product-info {
    transition: all 0.2s ease;
}

.product-info:hover {
    color: var(--accent) !important;
    transform: translateX(2px);
}

.recipe-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.material-icon {
    width: 24px;
    height: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
}

.material-info {
    flex: 1;
    min-width: 0;
}

.material-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-quantity {
    font-size: 0.8rem;
    color: var(--stat-positive);
    font-weight: 600;
}

/* Search Enhancements */
.search-highlight {
    background: rgba(59, 130, 246, 0.3);
    color: var(--accent);
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.search-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.search-suggestion-item:hover {
    background: var(--surface);
}

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

.search-section {
    position: relative;
}

/* Performance indicators */
.loading-progress {
    width: 100%;
    height: 2px;
    background: var(--surface);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 8px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* Pixelbay Price Display Components */
.pixelbay-price-display {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.pixelbay-price-display:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price-source {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.pixelbay-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.pixelbay-icon-small {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.price-age {
    font-size: 12px;
    color: var(--text-dim);
    cursor: help;
}

.price-main {
    margin: 12px 0;
}

.current-price {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.price-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
}

.price-trend.trend-up {
    background: rgba(34, 197, 94, 0.1);
    color: var(--positive);
}

.price-trend.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--negative);
}

.price-trend.trend-stable {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-dim);
}

.price-details {
    margin-top: 6px;
}

.price-details small {
    color: var(--text-dim);
    font-size: 13px;
}

.price-comparison {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.comparison-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.comparison-note {
    text-align: center;
}

.comparison-note small {
    color: var(--text-dim);
    font-size: 11px;
}

.price-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.price-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.price-action-btn:hover {
    background: var(--elevated);
    border-color: var(--accent);
    color: var(--accent);
}

/* Compact Price Display */
.pixelbay-price-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
}

.compact-price {
    font-weight: 600;
}

.compact-trend {
    font-size: 11px;
}

.compact-trend.trend-up {
    color: var(--positive);
}

.compact-trend.trend-down {
    color: var(--negative);
}

.compact-trend.trend-stable {
    color: var(--text-dim);
}

/* Loading States */
.pixelbay-price-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--text-dim);
    font-size: 14px;
}

.pixelbay-price-loading.compact {
    padding: 8px;
    font-size: 12px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Unavailable/Error States */
.pixelbay-price-unavailable,
.pixelbay-price-error {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pixelbay-price-unavailable.compact,
.pixelbay-price-error.compact {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.unavailable-icon,
.error-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.unavailable-text,
.error-text {
    margin-bottom: 12px;
}

.unavailable-text span,
.error-text span {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.unavailable-text small,
.error-text small {
    color: var(--text-dim);
    font-size: 13px;
}

/* Price History Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.price-history-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.price-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--elevated);
    border-bottom: 1px solid var(--border);
}

.price-history-header h3 {
    margin: 0;
    color: var(--text);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--surface);
    color: var(--text);
}

.price-history-content {
    padding: 20px;
    overflow-y: auto;
}

.price-history-chart {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--elevated);
    border-radius: 8px;
}

.simple-chart {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 100px;
    padding: 8px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent), var(--accent-dim));
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    transition: opacity 0.2s ease;
    cursor: help;
}

.chart-bar:hover {
    opacity: 0.8;
}

.price-history-table {
    overflow-x: auto;
}

.price-history-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.price-history-table th,
.price-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.price-history-table th {
    background: var(--elevated);
    font-weight: 600;
    color: var(--text);
}

.price-history-table td {
    color: var(--text);
}

.price-history-table tr:hover {
    background: var(--surface);
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .price-footer {
        flex-direction: column;
    }
    
    .price-history-modal {
        width: 95%;
        margin: 10px;
    }
    
    .price-history-header,
    .price-history-content {
        padding: 16px;
    }
    
    .simple-chart {
        height: 80px;
    }
}

/* Integration with existing item detail tabs */
.tab-content .pixelbay-price-display {
    margin: 0;
    margin-top: 16px;
}

/* Price display in item grid/list */
.item-card .pixelbay-price-compact,
.search-result .pixelbay-price-compact {
    margin-top: 8px;
}

/* Price display in tooltips */
.equipment-tooltip .pixelbay-price-compact {
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* PWA Install Button */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

/* Update Notification */
.update-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--elevated);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-icon {
    font-size: 16px;
    animation: spin 2s linear infinite;
}

.update-text {
    color: var(--text);
    font-weight: 500;
}

.update-btn {
    background: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-btn:hover {
    background: var(--accent-dim);
}

.update-dismiss {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.update-dismiss:hover {
    background: var(--surface);
    color: var(--text);
}

/* Network Status */
.network-status {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    animation: slideInUp 0.3s ease;
}

.network-offline {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.network-online {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

/* Install Welcome */
.install-welcome {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.welcome-content {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

.welcome-content h3 {
    margin-bottom: 12px;
    color: var(--text);
}

.welcome-content p {
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.5;
}

.welcome-content button {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-content button:hover {
    background: var(--accent-dim);
}

/* PWA-specific styles */
[data-pwa-installed="true"] .pwa-install-btn {
    display: none !important;
}

[data-pwa-installed="true"] body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Drag and Drop Enhancements */
.equipment-item[draggable="true"] {
    cursor: grab;
    transition: all 0.2s ease;
}

.equipment-item[draggable="true"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.equipment-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.equipment-slot {
    position: relative;
    transition: all 0.3s ease;
}

.equipment-slot.drag-over {
    border-color: var(--success) !important;
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(16, 185, 129, 0.1) 100%);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.equipment-slot.drag-invalid {
    border-color: var(--danger) !important;
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(239, 68, 68, 0.1) 100%);
    animation: shake 0.5s ease-in-out;
}

.equipment-slot.equipment-success {
    border-color: var(--success) !important;
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(16, 185, 129, 0.2) 100%);
    animation: successPulse 0.6s ease-in-out;
}

.equipment-slot.equipment-invalid {
    border-color: var(--danger) !important;
    background: linear-gradient(135deg, var(--elevated) 0%, rgba(239, 68, 68, 0.2) 100%);
    animation: errorPulse 0.6s ease-in-out;
}

/* Touch Drag Enhancements */
.equipment-item.touch-hold {
    animation: touchHold 0.5s ease-in-out forwards;
}

.equipment-item.touch-dragging {
    opacity: 0.7;
    transform: scale(1.1);
    z-index: 1000;
    pointer-events: none;
}

.equipment-slot.touch-dragging {
    opacity: 0.7;
    transform: scale(1.05);
    z-index: 1000;
}

.drag-preview {
    position: fixed;
    background: var(--elevated);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    pointer-events: none;
    user-select: none;
}

.preview-icon {
    width: 24px;
    height: 24px;
    background: var(--surface);
    border-radius: 4px;
    flex-shrink: 0;
}

.preview-name {
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drag-image {
    background: var(--elevated) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.drag-item-icon {
    width: 24px;
    height: 24px;
    background: var(--surface);
    border-radius: 4px;
    flex-shrink: 0;
}

.drag-item-name {
    font-weight: 600;
    white-space: nowrap;
}

/* Enhanced Equipment Slots */
.equipment-slot.filled {
    position: relative;
}

.equipment-slot.filled::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    border: 1px solid var(--elevated);
}

.equipment-slot.filled .slot-sprite {
    border-color: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Improved Equipment List */
.equipment-item {
    position: relative;
    overflow: hidden;
}

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

.equipment-item:hover::before {
    left: 100%;
}

.equipment-item[draggable="true"]::after {
    content: '⋮⋮';
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--text-dim);
    font-size: 10px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.equipment-item[draggable="true"]:hover::after {
    opacity: 1;
}

/* Animations */
@keyframes touchHold {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-4px);
    }
    40%, 80% {
        transform: translateX(4px);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes errorPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Authentication UI */
.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #4752c4, #3c45a5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.user-info {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 99999;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: var(--surface);
    border-color: var(--accent);
}

.dropdown-arrow {
    font-size: 10px;
    color: var(--text-dim);
    transition: transform 0.2s ease;
}

.user-info.open .dropdown-arrow {
    transform: rotate(180deg);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--elevated);
    color: var(--text);
    border-color: var(--accent);
}

/* Account Menu Dropdown */
.account-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    min-width: 180px;
    overflow: hidden;
}

.account-menu-item {
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-menu-item:hover {
    background: var(--elevated);
}

.account-menu-item.logout {
    color: var(--error);
}

.account-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.account-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Save Build Button */
.save-build-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.save-build-btn:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.save-build-btn.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid #3b82f6;
    color: white;
}

.save-build-btn.blue:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Chat System Styles */
.chats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.chats-header h3 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.chat-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-dim);
    font-size: 14px;
}

.chats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.chat-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.chat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.chat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.chat-participant {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.chat-user-info h4 {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.chat-user-info .chat-username {
    color: var(--text-dim);
    font-size: 12px;
    margin: 0;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-dim);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background: var(--success);
}

.status-indicator.offline {
    background: var(--text-dim);
}

.status-indicator.unread {
    background: var(--accent);
    animation: pulse 2s infinite;
}

.status-indicator.completed {
    background: #22c55e;
}

.status-text.completed {
    color: #22c55e;
    font-weight: 600;
}

.completion-time {
    color: #22c55e;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.chat-preview {
    margin-bottom: 12px;
}

.chat-last-message {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-last-message.unread {
    color: var(--text);
    font-weight: 500;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.chat-timestamp {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-message-count {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.chat-message-count.unread {
    background: var(--accent);
    color: white;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.chat-action-btn:hover {
    background: var(--elevated);
    border-color: var(--accent);
    color: var(--text);
}

.chat-action-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.chat-action-btn.primary:hover {
    background: var(--accent-dim);
}

.chat-no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
}

.chat-no-messages .no-chats-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-no-messages h4 {
    color: var(--text);
    margin-bottom: 8px;
}

.chat-no-messages p {
    font-size: 14px;
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

/* Animation for status indicators */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .chat-stats {
        align-self: stretch;
        justify-content: space-between;
    }
}

/* Chat Modal Styles */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.chat-title-section h3 {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.chat-participants {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
}

.participant-info {
    color: var(--text-dim);
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-chat:hover {
    background: var(--surface);
    color: var(--text);
}

.chat-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-listing-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.chat-listing-info {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.chat-listing-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-listing-sprite {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.chat-listing-details {
    display: flex;
    flex-direction: column;
}

.chat-listing-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text);
    font-weight: 600;
}

.chat-listing-details p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.chat-created {
    font-size: 12px !important;
    color: var(--text-dim) !important;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    height: 0; /* Force flex item to respect parent height */
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: min-content;
}

.chat-message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.chat-message.own-message {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.chat-message.other-message {
    align-self: flex-start;
    background: var(--elevated);
    color: var(--text);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    font-size: 0.7rem;
}

.message-content {
    line-height: 1.4;
    word-wrap: break-word;
}

.offer-message {
    background: var(--warning) !important;
    border-color: var(--warning) !important;
    color: var(--background) !important;
}

.offer-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.offer-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}

.offer-status-badge.pending {
    background: var(--warning);
    color: var(--background);
}

.offer-status-badge.accepted {
    background: var(--success);
    color: white;
}

.offer-status-badge.declined {
    background: var(--danger);
    color: white;
}

.offer-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.accept-offer-btn, .decline-offer-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.accept-offer-btn {
    background: var(--success);
    color: white;
}

.accept-offer-btn:hover {
    background: var(--success-dim);
}

.decline-offer-btn {
    background: var(--danger);
    color: white;
}

.decline-offer-btn:hover {
    background: var(--danger-dim);
}

.chat-input-section {
    border-top: 1px solid var(--border);
    background: var(--elevated);
}

.message-input-container {
    padding: 16px 24px;
}

.chat-message-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 12px;
}

.chat-message-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.chat-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.offer-form {
    border-top: 1px solid var(--border);
    background: var(--background);
    padding: 20px 24px;
}

.offer-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.offer-form-header h4 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.close-offer-form {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-offer-form:hover {
    background: var(--surface);
    color: var(--text);
}

.offer-form-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offer-input-row {
    display: flex;
    gap: 16px;
    align-items: end;
}

.offer-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.offer-input-group label {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
}

.offer-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 0.875rem;
}

.offer-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.offer-total {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text);
    white-space: nowrap;
}

.offer-message-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

.offer-message-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.offer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-style: italic;
}

/* Responsive chat modal */
@media (max-width: 768px) {
    .chat-modal-content {
        width: 95%;
        height: 90vh;
    }
    
    .chat-header {
        padding: 16px 20px;
    }
    
    .chat-participants {
        flex-direction: column;
        gap: 8px;
    }
    
    .chat-listing-section,
    .chat-messages-container,
    .message-input-container,
    .offer-form {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .offer-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chat-input-actions,
    .offer-actions {
        flex-direction: column;
    }
}

/* Item Selection and Picker Styles */
.selected-item-container {
    background: var(--elevated);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.selected-item-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: left 0.5s ease;
}

.selected-item-container:hover {
    border-color: var(--accent);
    background: var(--surface);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.selected-item-container:hover::before {
    left: 100%;
}

.selected-item-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.selected-item-sprite {
    width: 32px;
    height: 32px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.selected-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.selected-item-name {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-item-category {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: capitalize;
}

.item-picker-arrow {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.selected-item-container:hover .item-picker-arrow {
    transform: translateY(1px);
}

/* Item Picker Modal */
.item-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999997;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.item-picker-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.item-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.item-picker-header h3 {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.close-item-picker {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-item-picker:hover {
    background: var(--surface);
    color: var(--text);
}

.item-picker-search-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.item-picker-search {
    width: 100%;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.875rem;
}

.item-picker-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.item-picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.item-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.item-picker-item {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-picker-item:hover {
    border-color: var(--accent);
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-sprite {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.item-name {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-category {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: capitalize;
}

/* Responsive item picker */
@media (max-width: 768px) {
    .item-picker-modal-content {
        width: 95%;
        height: 90vh;
    }
    
    .item-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .item-picker-header,
    .item-picker-search-section,
    .item-picker-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Save Build Modal */
.save-build-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.save-build-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
}

.save-build-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.save-build-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.close-save-build {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-save-build:hover {
    background: var(--surface);
    color: var(--text);
}

.save-build-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.save-build-form input,
.save-build-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.save-build-form input:focus,
.save-build-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.save-build-form textarea {
    min-height: 80px;
    max-height: 120px;
}

.public-build-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.public-build-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.best-in-slot-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    background: var(--elevated);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    margin: 8px 0;
}

.best-in-slot-option span {
    color: var(--accent);
    font-weight: 500;
}

.best-in-slot-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.save-build-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.cancel-save,
.confirm-save {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-save {
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.cancel-save:hover {
    background: var(--elevated);
    color: var(--text);
}

.confirm-save {
    background: var(--accent);
    color: white;
    border: none;
}

.confirm-save:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
}

/* User Builds Section */
.user-builds-section {
    display: none;
    margin: 20px 0;
    padding: 20px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.user-builds-section h3 {
    margin: 0 0 16px 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.user-build-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.user-build-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.user-build-card.best-in-slot-build {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border-color: rgba(245, 158, 11, 0.3);
}

.user-build-card.best-in-slot-build:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.build-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.build-card-header h4 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.build-card-actions {
    display: flex;
    gap: 8px;
}

.load-build-btn,
.delete-build-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-build-btn {
    background: var(--accent);
    color: white;
    border: none;
}

.load-build-btn:hover {
    background: var(--accent-dim);
}

.delete-build-btn {
    background: var(--surface);
    color: var(--error);
    border: 1px solid var(--border);
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-build-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.build-description {
    margin: 8px 0;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 60px;
    overflow: hidden;
}

.bis-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.manage-bis-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.manage-bis-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.build-type {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.build-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.build-visibility {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-builds {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    padding: 40px 20px;
    font-style: italic;
}

/* Account Modal */
.account-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.account-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.account-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.account-modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.close-account-modal {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-account-modal:hover {
    background: var(--surface);
    color: var(--text);
}

.account-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Account Info Styles */
.account-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.large-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.account-details h4 {
    margin: 0 0 4px 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.account-email {
    margin: 0 0 4px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.account-provider {
    margin: 0;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.account-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.account-stat .stat-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.account-stat .stat-value {
    font-size: 16px;
    color: var(--text);
    font-weight: 600;
}

/* Danger Zone */
.danger-zone {
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 20px;
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h4 {
    margin: 0 0 8px 0;
    color: var(--error);
    font-size: 16px;
    font-weight: 600;
}

.danger-zone p {
    margin: 0 0 16px 0;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
}

.delete-account-btn {
    background: var(--error);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-account-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* User Builds Container */
.user-builds-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Build Sharing UI */
.share-build-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.share-build-btn:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.share-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.share-dialog-content {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
}

.share-dialog-content h3 {
    margin-bottom: 16px;
    color: var(--text);
    text-align: center;
}

.share-dialog-content p {
    color: var(--text-dim);
    margin-bottom: 20px;
    text-align: center;
}

.share-url-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.share-url-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 13px;
    font-family: monospace;
}

.copy-btn {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--accent-dim);
}

.close-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 24px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
}

.close-btn:hover {
    background: var(--elevated);
    border-color: var(--accent);
}

.build-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.build-message-success {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.build-message-error {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.build-message-info {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

/* Export/Import Buttons */
.build-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-btn, .import-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover, .import-btn:hover {
    background: var(--elevated);
    border-color: var(--accent);
    color: var(--accent);
}

.build-url-preview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-family: monospace;
    font-size: 11px;
    color: var(--text-dim);
    word-break: break-all;
    max-height: 100px;
    overflow-y: auto;
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
    .equipment-slot {
        min-height: 100px;
        padding: 12px;
    }
    
    .equipment-item {
        padding: 16px;
        min-height: 60px;
    }
    
    .drag-preview {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .equipment-item.touch-hold {
        animation-duration: 0.3s;
    }
    
    .share-dialog-content {
        padding: 24px;
        margin: 12px;
    }
    
    .share-url-container {
        flex-direction: column;
    }
    
    .build-actions {
        flex-direction: column;
    }
    
    .share-build-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* Mobile Builder Layout */
    .builder-body {
        flex-direction: column;
        overflow-y: auto;
    }
    
    .item-list-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 40vh;
    }
    
    .equipment-grid-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
    }
    
    .equipment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .grid-slot-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .slot-label {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .grid-slot {
        width: 60px;
        height: 60px;
    }
    
    .comparison-panel {
        margin: 16px 0;
        padding: 16px;
    }
    
    .builder-modal-content {
        width: 95vw;
        height: 95vh;
        max-width: none;
        max-height: none;
    }
    
    /* Mobile Header - Hide everything except theme toggle */
    .header {
        padding: 8px 16px;
    }
    
    .header-content {
        justify-content: space-between;
        gap: 8px;
    }
    
    .logo {
        min-width: auto;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .logo-image {
        width: 28px;
        height: 28px;
    }
    
    .header-controls {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    /* Hide non-essential buttons on small screens */
    .community-builds-btn,
    .marketplace-btn {
        display: none;
    }
    
    /* Make theme toggle smaller */
    .theme-toggle {
        padding: 1px;
        font-size: 10px;
        margin: 0;
    }
    
    .theme-option {
        padding: 3px 6px;
    }
    
    /* Keep auth section visible but make it compact */
    .auth-section {
        margin-right: 0;
    }
    
    .login-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-btn::after {
        content: "Discord";
    }
    
    /* User profile adjustments */
    .user-name {
        display: none;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        order: -1; /* Show first */
    }
    
    .hamburger {
        width: 20px;
        height: 2px;
        background: var(--text);
        margin: 2px 0;
        transition: 0.3s;
        border-radius: 1px;
    }
    
    .mobile-menu-btn.active .hamburger:nth-child(1) {
        transform: rotate(-45deg) translate(-4px, 4px);
    }
    
    .mobile-menu-btn.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active .hamburger:nth-child(3) {
        transform: rotate(45deg) translate(-4px, -4px);
    }
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999998;
    backdrop-filter: blur(10px);
}

.mobile-menu-content {
    position: absolute;
    top: 80px; /* Below header */
    left: 16px;
    right: 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mobile-menu-item {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-menu-item:hover {
    background: var(--surface);
}

.mobile-menu-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

/* Additional Mobile Improvements */
@media (max-width: 768px) {
    /* Better touch targets */
    .item {
        min-height: 48px;
    }
    
    .filter {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    button, .button {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .login-btn, .theme-option {
        min-height: 40px;
    }
    
    /* Improve modal sizing on mobile */
    .modal-content {
        width: 95% !important;
        height: 95vh !important;
        margin: 2.5vh auto !important;
    }
    
    /* Better scrolling on mobile */
    .items {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    /* Improve tab navigation on mobile */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        flex-shrink: 0;
        min-width: 120px;
    }
}

/* Database Stats Section */
.database-stats {
    display: flex !important;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    padding: 0 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-width: 120px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--success));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.stat-number {
    font-family: 'Press Start 2P', monospace;
    font-size: 22px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Update header auth section positioning */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.auth-section {
    margin-right: 0;
}

/* Community Builds Button */
.community-builds-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.community-builds-btn:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Responsive improvements for landing page */
@media (max-width: 768px) {
    .quick-start-grid {
        grid-template-columns: 1fr;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-header h1 {
        font-size: 2rem;
    }
    
    /* Mobile stats layout */
    .database-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    
    .stat-card {
        min-width: auto;
        padding: 16px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .search-suggestions {
        justify-content: center;
    }

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

/* New Compact Builder Styles */
.builder-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.builder-modal-content {
    background: var(--elevated);
    margin: 80px auto 2% auto;
    padding: 0;
    width: 95%;
    max-width: 1400px;
    height: calc(100vh - 120px);
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.builder-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
}

.builder-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.builder-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-builder {
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-builder:hover {
    background: var(--danger-hover);
}

.builder-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Item List Panels */
.item-list-panel {
    flex: 1 1 300px;
    min-width: 300px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.panel-header h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

/* Distinctive styling for armor set headers */
.current-armor-header {
    background: linear-gradient(135deg, var(--elevated), rgba(34, 197, 94, 0.1));
    border-left: 3px solid #22c55e;
}

.current-armor-header h3 {
    color: #22c55e;
    font-size: 16px;
    font-weight: 700;
}

.potential-armor-header {
    background: linear-gradient(135deg, var(--elevated), rgba(59, 130, 246, 0.1));
    border-left: 3px solid #3b82f6;
}

.potential-armor-header h3 {
    color: #3b82f6;
    font-size: 16px;
    font-weight: 700;
}

.compact-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--text);
    font-size: 13px;
    min-height: 36px;
    box-sizing: border-box;
}

.compact-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.item-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.compact-item:hover {
    background: var(--elevated);
    border-color: var(--border);
}

.compact-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.compact-item-icon {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border-radius: 4px;
    flex-shrink: 0;
    background-size: 2048px 2048px;
    border: 1px solid var(--border);
}

.compact-item-info {
    flex: 1;
    min-width: 0;
}

.compact-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.compact-item-type {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Equipment Grid Panel */
.equipment-grid-panel {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    border-right: 1px solid var(--border);
}

.equipment-grid-panel:last-child {
    border-right: none;
}

.set-stats-compact {
    margin-top: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
    border: 2px solid var(--border);
}

.stat-summary {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
}

.stat-item {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    padding: 6px 8px;
    background: var(--elevated);
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border);
}

.equipment-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1px;
    padding: 8px;
    place-items: center;
}

.grid-slot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.slot-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-slot {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: var(--surface);
}

.grid-slot:hover {
    border-color: var(--accent);
    background: var(--elevated);
}

/* Delete button for filled slots */
.grid-slot.filled .delete-item-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.grid-slot.filled:hover .delete-item-btn {
    opacity: 1;
}

.delete-item-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.grid-slot.filled {
    border-style: solid;
    border-color: var(--success);
    background: var(--success-bg);
}

.grid-slot.drag-over {
    border-color: var(--accent);
    background: var(--accent-bg);
    transform: scale(1.05);
}

.grid-slot.drag-invalid {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.grid-slot.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.slot-icon {
    width: 48px;
    height: 48px;
    background-size: 2048px 2048px;
    border-radius: 4px;
}

/* Grid positioning for slot containers */
.grid-slot-container[data-slot="head"] { grid-column: 2; grid-row: 1; }
.grid-slot-container[data-slot="neck"] { grid-column: 1; grid-row: 2; }
.grid-slot-container[data-slot="chest"] { grid-column: 2; grid-row: 2; }
.grid-slot-container[data-slot="weapon"] { grid-column: 3; grid-row: 2; }
.grid-slot-container[data-slot="back"] { grid-column: 1; grid-row: 3; }
.grid-slot-container[data-slot="belt"] { grid-column: 2; grid-row: 3; }
.grid-slot-container[data-slot="feet"] { grid-column: 3; grid-row: 3; }
.grid-slot-container[data-slot="ring1"] { grid-column: 1; grid-row: 4; }
.grid-slot-container[data-slot="ring2"] { grid-column: 3; grid-row: 4; }

/* Comparison Panel - Sleek Compact Design */
.comparison-panel {
    border-top: 1px solid var(--accent);
    padding: 16px 20px;
    background: var(--surface);
    position: relative;
}

.comparison-stats h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

.comparison-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 12px;
}

.legend-current {
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-current::before {
    content: '●';
    color: #059669;
    font-size: 12px;
}

.legend-potential {
    color: #2563eb;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-potential::before {
    content: '●';
    color: #2563eb;
    font-size: 12px;
}

.legend-vs {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 11px;
    opacity: 0.7;
}

.stat-differences {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.stat-diff {
    padding: 8px 12px;
    background: var(--elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    min-width: 140px;
    transition: all 0.2s ease;
}

.stat-diff:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

.stat-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 11px;
    gap: 4px;
}

.current-value {
    color: #059669;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 4px;
    font-size: 10px;
}

.potential-value {
    color: #2563eb;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
    font-size: 10px;
}

.comparison-arrow {
    color: var(--text-secondary);
    font-size: 10px;
    opacity: 0.6;
}

.stat-diff-label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-diff-value {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.stat-diff-value.positive {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.stat-diff-value.positive::before {
    content: '+';
}

.stat-diff-value.negative {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.stat-diff-value.neutral {
    color: var(--text-secondary);
    background: rgba(156, 163, 175, 0.1);
}

/* Sharing Modal */
.sharing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.sharing-modal-content {
    background: var(--elevated);
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 400px;
    width: 90%;
    padding: 0;
    overflow: hidden;
}

.sharing-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
}

.sharing-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.close-sharing {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-sharing:hover {
    background: var(--border);
    color: var(--text);
}

.sharing-options {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: var(--text);
}

.share-option:hover {
    background: var(--elevated);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.discord-share:hover {
    border-color: #5865f2;
}

.share-icon {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}

.share-text {
    flex: 1;
}

.share-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.share-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Responsive design for new modals */
@media (max-width: 1200px) {
    .builder-modal-content {
        width: 98%;
        height: 95vh;
        margin: 1% auto;
    }
    
    .item-list-panel {
        width: 250px;
    }
    
    .equipment-grid {
        padding: 8px;
        gap: 3px;
    }
    
    .grid-slot {
        width: 60px;
        height: 60px;
    }
    
    .slot-icon {
        width: 36px;
        height: 36px;
    }
    
    .slot-label {
        font-size: 10px;
    }
}

/* Community Builds Styles */
.community-modal {
    z-index: 10001;
}

.community-modal .account-modal-content {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    max-height: 800px;
}

/* Full page community builds layout */
.community-builds-page {
    position: fixed;
    top: 80px; /* Start below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px); /* Full height minus header */
    background: var(--background);
    z-index: 1000;
    overflow-y: auto;
}

.community-page-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0; /* Stick to top of the page container */
    z-index: 100;
}

.community-page-header h1 {
    margin: 10px 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

.back-to-home-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.back-to-home-btn:hover {
    background: var(--primary-hover);
}

/* Full page marketplace layout */
.marketplace-page {
    position: fixed;
    top: 80px; /* Start below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px); /* Full height minus header */
    background: var(--background);
    z-index: 1000;
    overflow-y: auto;
}

.marketplace-page-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0; /* Stick to top of the page container */
    z-index: 100;
}

.marketplace-page-header h1 {
    margin: 10px 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

.marketplace-page-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dedicated page layouts */
.community-builds-main,
.marketplace-main {
    min-height: calc(100vh - 80px);
    padding-top: 20px; /* Account for header */
    background: var(--background);
}

/* Container styling similar to homepage */
.community-container,
.marketplace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
}

.community-content,
.marketplace-content {
    margin-top: 15px;
}

/* Page headers with gradient titles */
.community-page-header,
.marketplace-page-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 25px 20px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.page-title-gradient {
    font-family: 'Press Start 2P', monospace;
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 0 30px 0;
    font-weight: 400;
    opacity: 0.8;
}

/* Active button states for current page */
.community-builds-btn.active,
.marketplace-btn.active {
    background: var(--primary) !important;
    color: white !important;
}

/* Login required styling */
.marketplace-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Responsive improvements for dedicated pages */
@media (max-width: 768px) {
    .community-builds-main,
    .marketplace-main {
        padding-top: 70px; /* Adjust for smaller header on mobile */
    }
    
    .community-container,
    .marketplace-container {
        padding: 20px 16px;
    }
    
    .community-page-header,
    .marketplace-page-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .page-title-gradient {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
    
    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .community-filter-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .filter-options {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .build-count {
        text-align: center;
        align-self: center;
    }
}

.community-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    margin-top: 20px;
}

.filter-options {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    background: var(--elevated);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.build-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.stat-separator {
    color: var(--text-tertiary);
    margin: 0 8px;
}

.total-upvotes {
    color: var(--accent);
    font-weight: 500;
}

.community-builds-container {
    padding: 20px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.community-build-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.community-build-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.trending-card {
    background: linear-gradient(135deg, var(--elevated), var(--surface));
    border-color: #ff6b6b;
    position: relative;
    overflow: hidden;
}

.trending-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.trending-card:hover {
    border-color: #ff5252;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.2);
}

.build-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.build-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 2px;
}

.build-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.build-actions {
    display: flex;
    gap: 8px;
}

.upvote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.upvote-btn:hover {
    background: var(--elevated);
    border-color: var(--accent);
    color: var(--text);
}

.upvote-btn.upvoted {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    border-color: #4ade80;
    color: white;
}

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

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

.upvote-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Best in Slot checkbox styling */
.best-in-slot-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
}

.best-in-slot-checkbox:hover {
    background: var(--elevated);
    border-color: #fbbf24;
    color: #fbbf24;
}

.best-in-slot-checkbox input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.best-in-slot-checkbox input[type="checkbox"]:checked + .checkbox-label {
    color: #fbbf24;
    font-weight: 500;
}

.best-in-slot-checkbox input[type="checkbox"]:checked {
    accent-color: #fbbf24;
}

.checkbox-label {
    transition: color 0.2s ease;
}

/* Best in Slot checkbox styling for My Builds popup */
.best-in-slot-checkbox-popup {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
}

.best-in-slot-checkbox-popup:hover {
    background: var(--elevated);
    border-color: #fbbf24;
    color: #fbbf24;
}

.best-in-slot-checkbox-popup input[type="checkbox"] {
    margin: 0;
    width: 12px;
    height: 12px;
    cursor: pointer;
}

.best-in-slot-checkbox-popup input[type="checkbox"]:checked + .checkbox-label {
    color: #fbbf24;
    font-weight: 500;
}

.best-in-slot-checkbox-popup input[type="checkbox"]:checked {
    accent-color: #fbbf24;
}

.build-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Admin Panel Styles */
.admin-panel-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.admin-panel-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.admin-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 16px 16px 0 0;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-admin-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.close-admin-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-modal-body {
    padding: 24px;
}

.admin-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.admin-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.admin-section h4 {
    color: var(--accent);
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.admin-section p {
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-size: 14px;
}

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

.admin-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.admin-btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.admin-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-btn.secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.admin-btn.secondary:hover {
    background: var(--elevated);
    border-color: var(--accent);
}

.console-commands {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.command-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.command-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.command-item code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    color: #10b981;
    word-break: break-all;
    user-select: all;
}

.command-item span {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.admin-stats {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .admin-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .admin-modal-header,
    .admin-modal-body {
        padding: 16px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.build-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.build-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.build-badge.trending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    animation: pulse 2s infinite;
}

.build-badge.popular {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.build-badge.best-in-slot {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.build-info {
    margin-bottom: 16px;
}

.build-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.build-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 12px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 60px;
    overflow: hidden;
}

.equipment-preview {
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--surface);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

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

.load-community-build-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.load-community-build-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
}

.build-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.build-mode,
.item-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.no-builds {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-builds-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-builds h4 {
    font-size: 20px;
    margin: 0 0 12px 0;
    color: var(--text);
}

.no-builds p {
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--danger);
    background: var(--surface);
    border: 1px solid var(--danger);
    border-radius: 8px;
}

/* Responsive Community Builds */
@media (max-width: 768px) {
    .community-builds-container {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
    
    .community-modal .account-modal-content {
        width: 95%;
        height: 95vh;
    }
    
    .community-filter-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .build-card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .build-actions {
        align-self: flex-end;
    }
}

/* ============================================================================
   MARKETPLACE STYLES
   ============================================================================ */

/* Marketplace Button in Header - Match Community Builds Style */
.marketplace-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.marketplace-btn:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-1px);
}

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

/* Marketplace Modal */
.marketplace-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.marketplace-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.marketplace-header h2 {
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
}

.close-marketplace {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-marketplace:hover {
    background: var(--border);
    color: var(--text);
}

/* Marketplace Tabs */
.marketplace-tabs {
    display: flex;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.marketplace-tab {
    background: none;
    border: none;
    padding: 16px 20px;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.marketplace-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.marketplace-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Tab Content */
.marketplace-tab-content {
    display: none;
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.marketplace-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Marketplace Filters */
.marketplace-filters {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.marketplace-search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.marketplace-filter-select {
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    min-width: 120px;
}

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

.price-input {
    width: 100px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

/* Marketplace Actions */
.marketplace-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.create-listing-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.create-listing-btn:hover {
    background: #0e9f6e;
    transform: translateY(-1px);
}

/* Marketplace Listings */
.marketplace-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.listing-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.listing-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.listing-type {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.listing-type.sell {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.listing-type.buy {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.listing-time {
    color: var(--text-dim);
    font-size: 12px;
}

.listing-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.listing-item-sprite {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

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

.listing-item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.listing-item-rarity {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.listing-details {
    margin-bottom: 16px;
}

.quantity-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quantity {
    color: var(--text-dim);
    font-weight: 500;
}

.price {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
}

/* Notification badges for chat system */
.avatar-container {
    position: relative;
    display: inline-block;
}

.profile-notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--background);
    z-index: 10;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.total-price {
    text-align: right;
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
}

.listing-description {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.listing-seller {
    margin-bottom: 16px;
}

.seller-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.seller-name {
    color: var(--text);
    font-weight: 500;
}

.seller-reputation {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.seller-reputation.newcomer { background: rgba(117, 117, 117, 0.2); color: var(--common); }
.seller-reputation.trader { background: rgba(76, 175, 80, 0.2); color: var(--uncommon); }
.seller-reputation.merchant { background: rgba(33, 150, 243, 0.2); color: var(--rare); }
.seller-reputation.baron { background: rgba(156, 39, 176, 0.2); color: var(--epic); }
.seller-reputation.tycoon { background: rgba(255, 107, 53, 0.2); color: var(--legendary); }

.seller-stats {
    color: var(--text-dim);
    font-size: 12px;
}

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

.chat-btn, .quick-offer-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.chat-btn {
    background: var(--accent);
    color: white;
}

.chat-btn:hover {
    background: var(--accent-dim);
}

.quick-offer-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.quick-offer-btn:hover {
    background: var(--border);
}

/* No Listings State */
.no-listings {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.no-listings h3 {
    color: var(--text);
    margin-bottom: 12px;
}

.no-listings p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* My Listings */
.my-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.my-listings-header h3 {
    color: var(--text);
    font-size: 20px;
}

.my-listing-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listing-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.listing-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.listing-status.completed {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.listing-status.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.listing-info h4 {
    color: var(--text);
    margin-bottom: 8px;
}

.listing-meta {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 4px;
}

.listing-date {
    color: var(--text-muted);
    font-size: 12px;
}

.edit-listing-btn, .cancel-listing-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
}

.edit-listing-btn {
    background: var(--accent);
    color: white;
}

.cancel-listing-btn {
    background: var(--danger);
    color: white;
}

.submit-listing-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--success), #0ea5e9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-listing-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;
}

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

.submit-listing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    filter: brightness(1.1);
}

.cancel-listing-btn {
    padding: 14px 28px;
    background: var(--elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-listing-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Seller Info Styling */
.seller-avatar-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
}

.seller-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.seller-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seller-name {
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.seller-reputation {
    font-size: 12px;
    color: var(--text-muted);
}

/* Create Listing Modal */
.create-listing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.create-listing-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.create-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
    border-radius: 20px 20px 0 0;
}

.create-listing-header h3 {
    color: var(--text);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-create-listing {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-create-listing:hover {
    background: var(--border);
    color: var(--text);
    transform: scale(1.1);
}

.create-listing-form {
    padding: 28px;
}

.form-row {
    margin-bottom: 24px;
}

.form-row label {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.listing-type-selector {
    display: flex;
    gap: 20px;
    background: var(--elevated);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.listing-type-selector label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
    transition: color 0.2s ease;
}

.listing-type-selector input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.price-display {
    margin-top: 8px;
    color: var(--accent);
    font-weight: 600;
}

.char-counter {
    text-align: right;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

.cancel-btn {
    padding: 12px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: var(--border);
}

.create-btn {
    padding: 12px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.create-btn:hover {
    background: #0e9f6e;
}

/* Marketplace Form Inputs - High Specificity */
.create-listing-modal .quantity-input,
.create-listing-modal .price-input,
.create-listing-modal input[type="number"] {
    width: 100% !important;
    padding: 12px 16px !important;
    background: var(--elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.create-listing-modal .quantity-input:focus,
.create-listing-modal .price-input:focus,
.create-listing-modal input[type="number"]:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: var(--surface) !important;
}

.create-listing-modal .description-textarea,
.create-listing-modal textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    background: var(--elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    min-height: 80px !important;
    max-height: 200px !important;
    resize: vertical !important;
    transition: all 0.2s ease !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.create-listing-modal .description-textarea:focus,
.create-listing-modal textarea:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: var(--surface) !important;
}

.create-listing-modal .description-textarea::placeholder,
.create-listing-modal textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
}

/* Item Selector */
.item-selector-container {
    width: 100%;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-item:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.selected-item-sprite {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

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

.selected-item-name {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 2px;
}

.selected-item-category {
    color: var(--text-dim);
    font-size: 12px;
    text-transform: capitalize;
}

.select-arrow {
    color: var(--text-dim);
    font-size: 12px;
}

/* Item Picker Modal */
.item-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.item-picker-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.item-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.item-picker-header h3 {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
}

.close-item-picker {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-item-picker:hover {
    background: var(--border);
    color: var(--text);
}

.item-picker-filters {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.item-picker-search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.item-picker-filter-select {
    padding: 10px 14px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    min-width: 120px;
}

.item-picker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    align-content: start;
}

.item-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.item-picker-item:hover {
    border-color: var(--accent);
    background: var(--surface);
    transform: translateY(-1px);
}

.item-picker-item.selected {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.item-sprite {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-category {
    color: var(--text-dim);
    font-size: 12px;
    text-transform: capitalize;
}

.item-rarity {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.item-rarity.common { background: rgba(117, 117, 117, 0.2); color: var(--common); }
.item-rarity.uncommon { background: rgba(76, 175, 80, 0.2); color: var(--uncommon); }
.item-rarity.rare { background: rgba(33, 150, 243, 0.2); color: var(--rare); }
.item-rarity.epic { background: rgba(156, 39, 176, 0.2); color: var(--epic); }
.item-rarity.legendary { background: rgba(255, 107, 53, 0.2); color: var(--legendary); }

/* Sales History */
.sales-history-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.sales-history-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sale-record {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sale-item h4 {
    color: var(--text);
    margin-bottom: 8px;
}

.sale-details {
    display: flex;
    gap: 8px;
    color: var(--text-dim);
    font-size: 14px;
}

.sale-participants {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-dim);
    font-size: 14px;
}

.sale-date {
    color: var(--text-muted);
    font-size: 12px;
}

/* Chat System */
.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--elevated);
}

.chat-info h3 {
    color: var(--text);
    font-size: 18px;
    margin-bottom: 4px;
}

.chat-participants {
    display: flex;
    gap: 16px;
    color: var(--text-dim);
    font-size: 14px;
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-chat:hover {
    background: var(--border);
    color: var(--text);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.chat-input-container {
    border-top: 1px solid var(--border);
    padding: 20px;
}

.offer-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.make-offer-btn, .counter-offer-btn {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.make-offer-btn:hover, .counter-offer-btn:hover {
    background: var(--accent-dim);
}

.offer-form {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.offer-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.offer-inputs input {
    flex: 1;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.offer-total {
    color: var(--accent);
    font-weight: 600;
}

.offer-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cancel-offer-btn {
    padding: 8px 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.send-offer-btn {
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.chat-input-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    resize: none;
    font-family: inherit;
}

.send-message-btn {
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.send-message-btn:hover {
    background: var(--accent-dim);
}

/* Chat Messages */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.chat-message {
    max-width: 75%;
    padding: 14px 16px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.chat-message:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-message.own-message {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), #4f84f5);
    color: white;
    border-bottom-right-radius: 6px;
    margin-left: auto;
}

.chat-message.other-message {
    align-self: flex-start;
    background: var(--elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 6px;
    margin-right: auto;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    font-size: 0.75em;
    opacity: 0.9;
}

.message-sender-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.message-sender {
    font-weight: 600;
    margin-left: 2px;
}

.message-time {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    margin-left: 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.chat-message.other-message .message-time {
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
}

/* Enhanced Chat Cards */
.chats-grid.enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.chat-card.enhanced {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-card.enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.chat-card.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #4f84f5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-card.enhanced:hover::before {
    opacity: 1;
}

.participant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.participant-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.chat-participant {
    display: flex;
    align-items: center;
    flex: 1;
}

.chat-user-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text);
}

.chat-user-info .chat-username {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator.online {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.listing-item-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.compact-item-sprite {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.listing-item-details {
    flex: 1;
}

.listing-item-details .item-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.listing-item-details .item-details {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.listing-type-compact {
    margin: 0;
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.chat-preview-content {
    margin: 16px 0;
}

.message-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-meta {
    margin-top: 8px;
}

.chat-meta .chat-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.chat-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.chat-action-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-action-btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.chat-action-btn:hover {
    transform: translateY(-1px);
}

.chat-action-btn.primary:hover {
    background: #2563eb;
}

.chat-action-btn.secondary:hover {
    background: var(--elevated);
    border-color: var(--accent);
}

.message-content {
    line-height: 1.4;
}

.message-content.offer-message {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.offer-details {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.offer-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
}

.offer-status-badge.pending {
    background: var(--warning);
    color: white;
}

.offer-status-badge.accepted {
    background: var(--success);
    color: white;
}

.offer-status-badge.declined {
    background: var(--error);
    color: white;
}

.offer-note {
    font-style: italic;
    margin-top: 8px;
    opacity: 0.8;
}

.offer-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.accept-offer-btn, .decline-offer-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
}

.accept-offer-btn {
    background: var(--success);
    color: white;
}

.accept-offer-btn:hover {
    background: #27ae60;
}

.decline-offer-btn {
    background: var(--error);
    color: white;
}

.decline-offer-btn:hover {
    background: #c0392b;
}

.no-messages {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px 20px;
}

/* Chat Listing Info */
.chat-listing-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.chat-listing-card .listing-sprite {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.listing-details {
    flex: 1;
}

.listing-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.listing-price {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9em;
}

.listing-quantity, .listing-status {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* Reputation */
.user-reputation-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.user-reputation-card h3 {
    color: var(--text);
    margin-bottom: 20px;
}

.reputation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
}

.trading-stats {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-dim);
}

.stat-row:last-child {
    margin-bottom: 0;
}

.login-prompt {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

.reputation-leaderboard h3 {
    color: var(--text);
    margin-bottom: 16px;
}

.leaderboard-entry {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.rank {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    min-width: 40px;
}

.trader-info {
    flex: 1;
}

.trader-name {
    color: var(--text);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.trader-level {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.trader-stats {
    color: var(--text-dim);
    font-size: 14px;
    text-align: right;
}

/* Admin Panel */
.admin-panel h3 {
    color: var(--text);
    margin-bottom: 20px;
}

.admin-stats {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.admin-section {
    margin-bottom: 24px;
}

.admin-section h4 {
    color: var(--text);
    margin-bottom: 16px;
}

/* Notifications */
.error-notification, .success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    max-width: 300px;
    word-wrap: break-word;
}

.error-notification {
    background: var(--danger);
}

.success-notification {
    background: var(--success);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

/* Responsive Design */
@media (max-width: 768px) {
    .marketplace-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .marketplace-listings {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .price-range {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .marketplace-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .listing-actions {
        flex-direction: column;
    }
    
    .chat-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .create-listing-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    /* Compare Modal Responsive */
    .compare-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .armor-sets-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .compare-body {
        flex-direction: column;
        gap: 16px;
    }
    
    .compare-side {
        min-width: unset;
    }
    
    .stat-differences {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-diff {
        min-width: unset;
    }
}

/* Sale Completion Section */
.sale-completion-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.sale-completion-section.compact {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.completion-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.completion-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: fit-content;
}

.completion-checkboxes-compact {
    display: flex;
    gap: 16px;
    align-items: center;
}

.completion-checkbox-compact {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 24px;
    font-size: 12px;
    color: var(--text);
    user-select: none;
}

.completion-checkbox-compact input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-compact {
    position: absolute;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: var(--elevated);
    border: 2px solid var(--border);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.completion-checkbox-compact:hover input ~ .checkmark-compact {
    border-color: var(--accent);
}

.completion-checkbox-compact input:checked ~ .checkmark-compact {
    background-color: var(--accent);
    border-color: var(--accent);
}

.completion-checkbox-compact input:disabled ~ .checkmark-compact {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkmark-compact:after {
    content: "";
    position: absolute;
    display: none;
}

.completion-checkbox-compact input:checked ~ .checkmark-compact:after {
    display: block;
}

.completion-checkbox-compact .checkmark-compact:after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label-compact {
    font-weight: 500;
    white-space: nowrap;
}

.completion-actions-compact {
    margin-left: auto;
}

.completion-btn-compact {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.completion-btn-compact:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.completion-btn-compact:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.completion-status-compact {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.completion-status-compact.success {
    color: #22c55e;
}

.completion-status-compact.pending {
    color: var(--accent);
}

.completion-status-compact.error {
    color: #ef4444;
}

/* Legacy styles for backward compatibility */
.completion-header h4 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.completion-header p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.completion-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.completion-checkbox-group {
    display: flex;
    align-items: center;
}

.completion-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 36px;
    font-size: 14px;
    color: var(--text);
    user-select: none;
}

.completion-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--elevated);
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.completion-checkbox:hover input ~ .checkmark {
    border-color: var(--accent);
}

.completion-checkbox input:checked ~ .checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.completion-checkbox input:disabled ~ .checkmark {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.completion-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.completion-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-weight: 500;
}

.completion-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.completion-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.completion-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.completion-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.completion-status {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.completion-status.success {
    color: #22c55e;
}

.completion-status.pending {
    color: var(--accent);
}

.completion-status.error {
    color: #ef4444;
}

/* Best in Slot Builds Header */
.best-in-slot-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
}

.best-in-slot-header h3 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: var(--text);
    font-weight: 700;
}

.best-in-slot-header p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 16px;
}

.admin-note {
    color: var(--accent) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Best in Slot Grid Layout */
.bis-builds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Compact Best in Slot Build Cards */
.bis-build-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bis-build-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.bis-build-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bis-build-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.bis-badge {
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.bis-build-description {
    flex: 1;
    margin-bottom: 16px;
}

.bis-build-description p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.bis-build-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bis-load-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bis-load-btn:hover {
    background: var(--accent-dark);
}

.bis-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bis-upvotes {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .bis-builds-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .bis-build-card {
        height: 180px;
        padding: 16px;
    }
}

.bis-button {
    background: var(--elevated);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bis-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.bis-button.has-build {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
}

.bis-button.empty-build {
    border-color: var(--border);
    opacity: 0.8;
}

.bis-button.empty-build:hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
}

.bis-button-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text);
    font-weight: 700;
}

.bis-status {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.bis-button.has-build .bis-status {
    color: #22c55e;
}

.admin-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.bis-button.empty-build .admin-indicator {
    background: #f59e0b;
}

@media (max-width: 768px) {
    .bis-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .bis-button {
        min-height: 100px;
        padding: 20px;
    }
}

/* Item Tooltip Styles */
.item-tooltip {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-header {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.tooltip-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.tooltip-type {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tooltip-stats {
    margin: 8px 0;
}

.stat-line {
    color: var(--stat-positive);
    font-size: 13px;
    margin: 2px 0;
}

.tooltip-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.tooltip-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Enhance compact items for better hover interaction */
.compact-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Enhanced Offer Message Styles */
.offer-message-container {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.offer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offer-icon {
    font-size: 18px;
    background: rgba(59, 130, 246, 0.1);
    padding: 6px;
    border-radius: 8px;
}

.offer-title {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.offer-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    margin-left: auto;
}

.offer-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.offer-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.offer-detail-item.offer-total {
    grid-column: 1 / -1;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.offer-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.offer-value {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}

.offer-value-total {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.modern-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modern-btn.success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.modern-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modern-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}


/* Clean Offer Modal */
.offer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.offer-modal-content {
    background: var(--elevated);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.offer-modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.offer-modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.close-offer-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-offer-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.offer-modal-body {
    padding: 0 24px 24px;
}

.offer-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.offer-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.offer-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.offer-input {
    padding: 12px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.offer-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.offer-total-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.offer-total-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.total-label {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.total-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.offer-message-section {
    margin-bottom: 24px;
}

.offer-message-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.offer-message-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
}

.offer-message-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.offer-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.offer-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer-btn.cancel {
    background: var(--background);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.offer-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.offer-btn.send {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.offer-btn.send:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Equipment Tooltip Styles - Modern & Clean */
.equipment-tooltip {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    max-width: 280px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    font-size: 13px;
    line-height: 1.4;
}

.equipment-tooltip .tooltip-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.equipment-tooltip .tooltip-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text);
}

.equipment-tooltip .tooltip-type {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Simple rarity colors - no background boxes */
.equipment-tooltip .tooltip-header.rarity-0 .tooltip-name { color: #9ca3af; } /* Common - Gray */
.equipment-tooltip .tooltip-header.rarity-1 .tooltip-name { color: #10b981; } /* Uncommon - Green */
.equipment-tooltip .tooltip-header.rarity-2 .tooltip-name { color: var(--accent); } /* Rare - Blue */
.equipment-tooltip .tooltip-header.rarity-3 .tooltip-name { color: #a855f7; } /* Epic - Purple */
.equipment-tooltip .tooltip-header.rarity-4 .tooltip-name { color: #f59e0b; } /* Legendary - Gold */

.equipment-tooltip .tooltip-requirements {
    margin: 8px 0;
}

.equipment-tooltip .tooltip-requirements .requirements-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.equipment-tooltip .requirement {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipment-tooltip .requirement:last-child {
    margin-bottom: 0;
}

.equipment-tooltip .requirement-label {
    font-weight: 400;
}

.equipment-tooltip .requirement-value {
    font-weight: 500;
    color: var(--text);
}

.equipment-tooltip .tooltip-stats {
    margin: 8px 0;
}

.equipment-tooltip .stats-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.equipment-tooltip .tooltip-stat {
    font-size: 12px;
    margin-bottom: 2px;
    font-weight: 400;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipment-tooltip .tooltip-stat:last-child {
    margin-bottom: 0;
}

.equipment-tooltip .stat-name {
    color: var(--text-secondary);
}

.equipment-tooltip .stat-value {
    font-weight: 500;
    color: #10b981; /* All positive stats green - consistent */
}

.equipment-tooltip .stat-value.negative {
    color: #ef4444; /* Negative stats red */
}

.equipment-tooltip .tooltip-description {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-style: italic;
    font-size: 12px;
    line-height: 1.3;
}

/* Hover effect for equipment slots */
.grid-slot.filled {
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-slot.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    border-color: var(--accent);
}

/* Market Price Display - Sleek Design */
.market-price-container {
    margin-bottom: 1.5rem;
}

.market-price-display {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.market-price-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.market-price-display:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.market-price-display:hover::before {
    opacity: 1;
}

.price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.price-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

/* Active status */
.market-price-display.active .status-indicator {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse-green 2s infinite;
}

.market-price-display.active .price-badge {
    color: var(--success);
}

/* Inactive status */
.market-price-display.inactive .status-indicator {
    background: var(--danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.market-price-display.inactive .price-badge {
    color: var(--danger);
}

/* Loading status */
.market-price-display.loading .status-indicator {
    background: var(--text-muted);
    animation: pulse-gray 1.5s infinite;
}

.market-price-display.loading .price-badge {
    color: var(--text-muted);
}

/* Error status */
.market-price-display.error .status-indicator {
    background: var(--warning);
}

.market-price-display.error .price-badge {
    color: var(--warning);
}

/* Unavailable status */
.market-price-display.unavailable .status-indicator {
    background: var(--text-muted);
    opacity: 0.5;
}

.market-price-display.unavailable .price-badge {
    color: var(--text-muted);
}

/* Sales-aware enhanced statuses */
.market-price-display.recent-sale .status-indicator {
    background: linear-gradient(45deg, var(--success), #22c55e);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulse-sale 2s infinite;
}

.market-price-display.recent-sale .price-badge {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.market-price-display.old-sale .status-indicator {
    background: linear-gradient(45deg, #10b981, #059669);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.market-price-display.old-sale .price-badge {
    color: #10b981;
    opacity: 0.9;
}

.market-price-display.expired .status-indicator {
    background: linear-gradient(45deg, var(--warning), #f59e0b);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.market-price-display.expired .price-badge {
    color: var(--warning);
    opacity: 0.8;
}

.price-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.price-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.listing-count,
.last-seen,
.unavailable-text,
.error-text,
.sales-count,
.data-freshness {
    font-size: 0.8rem;
    opacity: 0.7;
    color: var(--text-dim);
}

/* Data freshness indicator */
.data-freshness {
    font-size: 0.75rem;
    opacity: 0.6;
    color: var(--text-dim);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.data-freshness:before {
    content: "🔄";
    font-size: 0.7rem;
    opacity: 0.5;
}

/* Sales-aware reliability badges */
.reliability-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    border: 1px solid;
}

.reliability-badge.excellent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.reliability-badge.good {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.3);
}

.reliability-badge.fair {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.reliability-badge.poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.reliability-badge.unreliable {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
    border-color: rgba(107, 114, 128, 0.3);
}

.price-context-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0.8;
}

.price-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
    transform: translateY(-1px);
}

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

.action-btn svg {
    transition: all 0.2s ease;
}

.action-btn:hover svg {
    stroke: currentColor;
}

/* Loading animation */
.loading-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    background: var(--text-dim);
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Compact version */
.market-price-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.market-price-compact:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Login Required Styles */
.market-price-display.login-required {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-icon {
    color: var(--accent);
    opacity: 0.8;
}

.login-content h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.login-content p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.login-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.login-cta-btn:hover {
    background: #4f5acb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.discord-icon {
    display: flex;
    align-items: center;
}

.login-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.benefit-icon {
    font-size: 1rem;
}

/* Compact Login Prompt */
.market-price-display.login-required.compact {
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.login-prompt-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.lock-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.login-text {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.compact-login-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-login-btn:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
}

/* Dark theme adjustments */
[data-theme="light"] .market-price-display.login-required {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .login-content h3 {
    color: var(--text);
}

[data-theme="light"] .login-content p {
    color: var(--text-dim);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.status-dot.inactive {
    background: var(--danger);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}

/* Enhanced sales-aware compact status dots */
.status-dot.recent-sale {
    background: var(--success);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3);
    animation: pulse-sale-compact 2s infinite;
}

.status-dot.old-sale {
    background: #10b981;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.status-dot.expired {
    background: var(--warning);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.reliability-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-left: 0.25rem;
}

.reliability-dot.excellent {
    background: var(--success);
}

.reliability-dot.good {
    background: var(--accent);
}

.reliability-dot.fair {
    background: var(--warning);
}

.reliability-dot.poor {
    background: var(--danger);
}

.reliability-dot.unreliable {
    background: var(--text-muted);
}

.compact-price {
    font-weight: 600;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trend-arrow {
    font-size: 0.75rem;
    opacity: 0.8;
}

.trend-arrow.trend-up::after {
    content: '↗';
    color: var(--success);
}

.trend-arrow.trend-down::after {
    content: '↘';
    color: var(--danger);
}

/* Animations */
@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }
}

@keyframes pulse-gray {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Sales-aware enhanced animations */
@keyframes pulse-sale {
    0% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
    70% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
}

@keyframes pulse-sale-compact {
    0% { box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3); }
    70% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3); }
}
