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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: #e0e0e0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.tagline {
    font-size: 1.2rem;
    color: #00d4ff;
    font-weight: 500;
}

.subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

.user-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.user-btn {
    background: #2a2f4f;
    border: 2px solid #3a3f6f;
    color: #e0e0e0;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-btn.active {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #0a0e27;
}

.user-btn:hover {
    transform: translateY(-2px);
    border-color: #00d4ff;
}

.user-badge {
    font-size: 0.7rem;
    font-weight: normal;
    opacity: 0.8;
    display: block;
    margin-top: 4px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.library-panel, .browse-panel {
    background: rgba(30, 35, 55, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

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

.panel-header h2, .panel-header h3 {
    font-size: 1.3rem;
}

/* Replaced .value-badge with .status-badge for library counts/status */
.status-badge, .filter-info {
    background: #00d4ff20;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #00d4ff;
    font-weight: 600;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.game-card {
    background: #1e2340;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    border-left: 3px solid #3a3f6f;
}

.game-card:hover {
    transform: translateX(4px);
    border-left-color: #00d4ff;
}

.game-card.selectable {
    cursor: pointer;
}

.game-card.selectable:hover {
    background: #2a2f55;
}

.game-card.selected {
    background: #00d4ff20;
    border-left-color: #00d4ff;
}

.game-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-info p {
    font-size: 0.75rem;
    color: #888;
}

.game-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* Rarity Badges instead of Prices */
.rarity-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: #3a3f6f;
    display: inline-block;
}

.rarity-high {
    background: #ff4444; /* Red for Rare/Delisted */
    color: white;
}

.rarity-medium {
    background: #ffaa44; /* Orange for Uncommon */
    color: #1e2340;
}

.rarity-low {
    background: #44aa44; /* Green for Common */
    color: white;
}

/* Want Score Indicator */
.want-score {
    font-size: 0.75rem;
    color: #ffaa44;
    font-weight: bold;
}

/* Delisted Badge */
.delisted-badge {
    background: #ff4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 6px;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters input, .filters select {
    background: #1e2340;
    border: 1px solid #3a3f6f;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.filters input {
    flex: 1;
    min-width: 150px;
}

.privacy-control {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #3a3f6f;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.privacy-control select {
    background: #1e2340;
    border: 1px solid #3a3f6f;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 8px;
}

.swap-panel {
    background: #1a1f3a;
    border: 2px solid #00d4ff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease;
}

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

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

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}

.swap-details {
    background: #0e1225;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

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

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #00d4ff;
    border: none;
    color: #0a0e27;
}

.btn-primary:hover {
    background: #00b8e0;
    transform: scale(0.98);
}

.btn-secondary {
    background: #3a3f6f;
    border: none;
    color: #e0e0e0;
}

.history-panel {
    background: rgba(30, 35, 55, 0.6);
    border-radius: 20px;
    padding: 20px;
    margin-top: 24px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.history-item {
    background: #1e2340;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.history-date {
    color: #888;
    font-size: 0.7rem;
    text-align: right;
}

.empty-history {
    text-align: center;
    color: #888;
    padding: 20px;
}

.small-btn {
    background: #3a3f6f;
    border: none;
    color: #e0e0e0;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
}

.footer {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    border-top: 1px solid #3a3f6f;
}

.crypto-note, .demo-note {
    margin-top: 8px;
}

.copy {
    margin-top: 12px;
    color: #00d4ff;
    font-weight: bold;
}

.hidden {
    display: none;
}

.swap-note {
    text-align: center;
    font-size: 0.8rem;
    color: #ffaa44;
    margin-top: 10px;
    font-style: italic;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1e2340; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #3a3f6f; border-radius: 3px; }

