/* Add Investment Section */
.add-investment-section {
    margin-bottom: 30px;
}

.add-investment-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #555;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.add-investment-content h2 {
    margin-bottom: 10px;
    color: #ffffff;
}

.add-investment-content p {
    color: #cccccc;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.add-investment-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-item .stat-label {
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Statistics */
.stats-section {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #404040;
}

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

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

.stat-card {
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    padding: 24px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid #2e2e2e;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    position: relative;
}

.stat-card .stat-value {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 0.86rem;
    color: #b3b3b3;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* subtle divider line */
.stat-card::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.08), rgba(255,255,255,0));
}

/* Items List */
.items-section {
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.items-list {
    display: grid;
    gap: 16px;
    contain: layout paint; /* improve Chrome rendering stability */
}

.item-card {
    background: linear-gradient(180deg, #191919 0%, #141414 100%);
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 12px;
    align-items: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.22);
    will-change: transform; /* smoother hover in Chrome */
}

/* Ensure consistent card height across pages */
.item-card, .sold-item-card {
    min-height: 72px;
}

.item-purchases {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.purchase-list {
    display: grid;
    grid-template-columns: 1fr 80px 200px 140px 140px;
    gap: 8px;
}

.purchase-row {
    display: contents;
}

.purchase-col {
    padding: 6px 8px;
    color: #ddd;
}

.purchase-col.total {
    text-align: right;
    color: #fff;
    font-weight: 600;
}

.purchase-empty {
    color: #aaa;
}

.item-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #242424;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3a3a3a;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    image-rendering: auto;
}

.item-add-btn {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translate(0, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #667eea;
    background: #2a2a4a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    z-index: 3;
}


.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
    border-color: #444;
}

.item-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.item-info p {
    color: #999;
    font-size: 0.9rem;
}

.sticker-strip {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}

.sticker-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
}

.item-stats {
    text-align: right;
    min-width: 140px;
}

.item-stats .price {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    padding: 4px 8px;
    border-radius: 8px;
}

.item-stats .quantity {
    color: #999;
    font-size: 0.85rem;
}

/* tighter action buttons area */
.item-card .item-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p:last-child {
    font-size: 1rem;
    opacity: 0.8;
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #404040;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #404040;
}

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

.suggestion-item.highlighted {
    background-color: #667eea;
}

.suggestion-name {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 2px;
}

.suggestion-type {
    font-size: 0.8rem;
    color: #999;
}

/* Skin Panel */
.skin-panel {
    position: fixed;
    top: 60px;
    right: -400px;
    width: 400px;
    height: calc(100vh - 60px);
    background: #2d2d2d;
    border-left: 1px solid #404040;
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.skin-panel.open {
    right: 0;
}

.skin-panel-header {
    padding: 20px;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skin-panel-header h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-panel:hover {
    background: #404040;
    color: #ffffff;
}

.skin-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.skin-list {
    display: grid;
    gap: 12px;
}

.skin-item {
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-item:hover {
    background: #404040;
    border-color: #667eea;
}

.skin-item-name {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.skin-item-rarity {
    font-size: 0.8rem;
    color: #999;
}

/* Sponsors Section */
.sponsors-section {
    background: #1a1a1a;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid #404040;
}

.sponsors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.sponsors-container h3 {
    color: #999;
    margin-bottom: 30px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sponsor-item:hover {
    background: #2d2d2d;
    transform: translateY(-2px);
}

.sponsor-item img {
    width: 120px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #404040;
    padding: 10px;
}

.sponsor-item p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Components */
@media (max-width: 768px) {
    .add-investment-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .add-investment-stats {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .item-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .item-stats {
        text-align: center;
    }
    
    .skin-panel {
        width: 100%;
        right: -100%;
    }
    
    .sponsors-grid {
        gap: 20px;
    }
    
    .sponsor-item img {
        width: 100px;
        height: 50px;
    }
}

/* Icon-only compact buttons for tighter cards */
.btn-icon-only { padding: 6px 8px; min-width: 36px; justify-content: center; }
.btn-icon-only.btn-ghost { background: transparent; }

/* Market stats row within item cards */
.market-stats { margin-top: 6px; }
.market-stats .mkt-row { display:flex; gap:8px; align-items:center; font-size:0.85rem; color:#ccc; }
.market-stats .mkt-unit { color:#fff; font-weight:600; }
.market-stats .mkt-total { color:#ddd; font-weight:600; margin-left:auto; }
.market-stats .mkt-pct { font-weight:700; }

/* Slimmer item card layout */
.item-card { padding: 10px 12px; grid-template-columns: 52px 1fr auto auto; }
.item-image { width: 44px; height: 44px; }
.item-image img { border-radius: 4px; }
.item-info h3 { font-size: 1rem; margin-bottom: 2px; }
.item-info p { font-size: 0.85rem; }
.item-stats { min-width: 120px; }
.item-stats .price { font-size: 0.9rem; padding: 3px 6px; }
.item-card .item-actions { gap: 6px; }

/* Reposition + button to right of image */
.item-image .item-add-btn { left: auto; right: -6px; top: -6px; transform: none; width: 20px; height: 20px; line-height: 18px; }