/* WoW Auction House Theme - Warm & Immersive */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* WoW-inspired color palette */
    --gold: #ffd100;
    --gold-dark: #c9a227;
    --gold-light: #ffe066;
    --silver: #c0c0c0;
    --copper: #cd7f32;

    /* Quality colors */
    --quality-poor: #9d9d9d;
    --quality-common: #ffffff;
    --quality-uncommon: #1eff00;
    --quality-rare: #0070dd;
    --quality-epic: #a335ee;
    --quality-legendary: #ff8000;

    /* UI colors - warm parchment/leather theme */
    --bg-darkest: #1a1410;
    --bg-dark: #2d241c;
    --bg-medium: #3d322a;
    --bg-light: #4a3f35;
    --bg-lighter: #5c4f43;

    /* Accent colors */
    --accent-primary: #c9a227;
    --accent-glow: rgba(255, 209, 0, 0.3);
    --accent-success: #1eff00;
    --accent-danger: #ff4444;

    /* Text */
    --text-primary: #f0e6d3;
    --text-secondary: #a89b8c;
    --text-muted: #6d5f52;

    /* Borders */
    --border-dark: #1a1410;
    --border-gold: #c9a227;
    --border-subtle: rgba(201, 162, 39, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 20px rgba(255, 209, 0, 0.15);
}

html {
    background-color: var(--bg-darkest);
    scrollbar-color: var(--bg-lighter) var(--bg-dark);
}

/* Global scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

::-webkit-scrollbar-corner {
    background: var(--bg-dark);
}

/* Selection highlighting */
::selection {
    background: rgba(201, 162, 39, 0.4);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(201, 162, 39, 0.4);
    color: var(--text-primary);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(ellipse at top, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border-bottom: 2px solid var(--border-gold);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(255, 209, 0, 0.4));
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 209, 0, 0.2);
    letter-spacing: 0.5px;
}

.logo .subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 2px;
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-nav-link:hover {
    color: var(--gold);
}

/* User Menu */
.user-menu {
    position: relative;
    margin-left: auto;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.user-menu-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-dark);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold-dark);
    object-fit: cover;
}

.user-menu-arrow {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.user-menu-button:hover .user-menu-arrow {
    color: var(--gold);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 209, 0, 0.3);
    min-width: 200px;
    display: none;
    z-index: 10000;
}

.user-menu-dropdown.show {
    display: block !important;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold);
}

.user-menu-item.logout-btn {
    border-top: 1px solid var(--border-subtle);
    color: var(--accent-danger);
}

.user-menu-item.logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff6666;
}

/* Debug link styling */
a.user-menu-item {
    text-decoration: none;
}

/* Region selector */
.region-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.region-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
}

.region-select {
    appearance: none;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.region-select:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md), var(--shadow-gold);
}

.region-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: var(--shadow-md), 0 0 0 2px rgba(255, 209, 0, 0.2);
}

.region-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gold-dark);
    font-size: 0.6rem;
}

/* ==================== STATUS BAR ==================== */
.status-bar {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.6rem 0;
}

.status-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-indicator {
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    color: var(--accent-success);
    text-shadow: 0 0 8px var(--accent-success);
}

.status-indicator.inactive {
    color: var(--text-muted);
}

.status-indicator.error {
    color: var(--accent-danger);
    text-shadow: 0 0 8px var(--accent-danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== FILTERS ==================== */
.filters-section {
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--bg-lighter);
    border-radius: 3px;
    font-size: 0.85rem;
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    transition: all 0.2s;
    min-width: 120px;
}

.filter-group select {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9a227' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    cursor: pointer;
}

.filter-group select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

.filter-group input:hover,
.filter-group select:hover {
    border-color: var(--gold-dark);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

.filter-group input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Number input spinners */
.filter-group input[type="number"]::-webkit-inner-spin-button,
.filter-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

.filter-group input[type="number"]:hover::-webkit-inner-spin-button,
.filter-group input[type="number"]:hover::-webkit-outer-spin-button {
    opacity: 1;
}

/* Realm swap group */
.realm-swap-group {
    flex: 1;
    min-width: 400px;
}

.realm-swap-group .btn-swap {
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn-refresh,
.btn-reset {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-gold);
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-refresh {
    background: linear-gradient(180deg, var(--gold-dark) 0%, #a68520 100%);
    color: var(--bg-darkest);
    box-shadow: var(--shadow-sm);
}

.btn-refresh:hover {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    box-shadow: var(--shadow-md), var(--shadow-gold);
    transform: translateY(-1px);
}

.btn-refresh:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

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

.btn-reset {
    background: var(--bg-medium);
    color: var(--text-secondary);
    border-color: var(--bg-lighter);
}

.btn-reset:hover {
    background: var(--bg-light);
    color: var(--text-primary);
    border-color: var(--gold-dark);
}

.btn-reset:active {
    background: var(--bg-medium);
}

.btn-swap {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    color: var(--gold);
    border: 1px solid var(--border-gold);
    border-radius: 3px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-swap:hover {
    background: linear-gradient(180deg, var(--bg-lighter) 0%, var(--bg-light) 100%);
    transform: rotate(180deg);
}

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

.btn-swap:disabled:hover {
    transform: none;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding: 1.5rem 0 3rem;
    min-height: calc(100vh - 200px);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    max-width: 700px;
    margin: 2rem auto;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 209, 0, 0.4));
}

.welcome-card h2 {
    color: var(--gold);
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.welcome-card > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border-radius: 4px;
    border-left: 3px solid var(--gold-dark);
}

.feature-icon {
    font-size: 1.25rem;
}

.feature span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature strong {
    color: var(--text-primary);
}

/* Loading */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border-radius: 8px;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    max-width: 500px;
    margin: 2rem auto;
}

.loading p {
    color: var(--text-primary);
    font-size: 1rem;
}

.loading p:last-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-lighter);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    max-width: 500px;
    margin: 2rem auto;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.no-results p {
    color: var(--text-secondary);
}

/* ==================== OPPORTUNITIES TABLE ==================== */
#opportunities-container {
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.opportunities-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opportunities-header h2 {
    color: var(--gold);
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opportunities-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Virtual Scrolling Container */
.virtual-table-container {
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid var(--bg-lighter);
}

.virtual-table-header {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    border-bottom: 2px solid var(--gold-dark);
    padding-right: 10px; /* Account for scrollbar width */
}

.virtual-table-header table {
    margin-bottom: 0;
    width: 100%;
}

.virtual-scroll-container {
    height: 65vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    contain: strict;
    background: var(--bg-darkest);
}

.virtual-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.virtual-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.virtual-scroll-container::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 4px;
}

.virtual-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

.virtual-scroll-spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    pointer-events: none;
}

.virtual-table-body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.virtual-table-body thead {
    display: none;
}

/* Table Styles */
.opportunities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    table-layout: fixed;
}

/* Column widths - must match in both header and body */
.opportunities-table th:nth-child(1),
.opportunities-table td:nth-child(1) { width: 50px; }  /* # */
.opportunities-table th:nth-child(2),
.opportunities-table td:nth-child(2) { width: 180px; } /* Item */
.opportunities-table th:nth-child(3),
.opportunities-table td:nth-child(3) { width: 100px; } /* Type */
.opportunities-table th:nth-child(4),
.opportunities-table td:nth-child(4) { width: 120px; } /* Buy From */
.opportunities-table th:nth-child(5),
.opportunities-table td:nth-child(5) { width: 100px; } /* Buy Price */
.opportunities-table th:nth-child(6),
.opportunities-table td:nth-child(6) { width: 70px; }  /* Buy Stock */
.opportunities-table th:nth-child(7),
.opportunities-table td:nth-child(7) { width: 120px; } /* Sell On */
.opportunities-table th:nth-child(8),
.opportunities-table td:nth-child(8) { width: 100px; } /* Sell Price */
.opportunities-table th:nth-child(9),
.opportunities-table td:nth-child(9) { width: 70px; }  /* Sell Stock */
.opportunities-table th:nth-child(10),
.opportunities-table td:nth-child(10) { width: 100px; } /* Profit */
.opportunities-table th:nth-child(11),
.opportunities-table td:nth-child(11) { width: 80px; }  /* ROI */

.opportunities-table thead {
    background: transparent;
}

.opportunities-table th {
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-weight: 700;
    color: var(--gold);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Sortable headers */
.opportunities-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    position: relative;
}

.opportunities-table th.sortable:hover {
    color: var(--gold-light);
    background: rgba(255, 209, 0, 0.1);
}

.opportunities-table th.sortable:active {
    background: rgba(255, 209, 0, 0.15);
}

.sort-indicator {
    color: var(--gold-light);
    font-size: 0.6rem;
    margin-left: 0.25rem;
}

.opportunities-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--bg-medium);
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

.opportunities-table tbody {
    contain: layout style paint;
    will-change: transform;
}

.opportunities-table tbody tr {
    background: var(--bg-dark);
    transition: background 0.15s;
}

.opportunities-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.2);
}

.opportunities-table tbody tr:hover {
    background: rgba(201, 162, 39, 0.1);
}

/* Rank Badge */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 0.4rem;
    background: var(--bg-lighter);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.rank-badge.gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-darkest);
    box-shadow: 0 0 8px rgba(255, 209, 0, 0.4);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    color: var(--bg-darkest);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, var(--copper) 0%, #a06828 100%);
    color: var(--bg-darkest);
}

/* Item Name & Link */
.item-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.wowhead-link {
    color: var(--quality-uncommon);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.wowhead-link:hover {
    color: #4dff4d;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(30, 255, 0, 0.5);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-lighter);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.category-badge.uncategorized {
    opacity: 0.5;
}

/* Realm Badge */
.realm-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-medium);
    border: 1px solid var(--bg-lighter);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Stock Badge */
.stock-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: #b794f6;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Price Display */
.price {
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
    border-radius: 2px;
    display: inline-block;
}

.price.buy {
    background: rgba(30, 255, 0, 0.1);
}

.price.sell {
    background: rgba(0, 112, 221, 0.1);
}

/* Gold/Silver/Copper colors */
.gold-text { color: var(--gold); }
.silver-text { color: var(--silver); }
.copper-text { color: var(--copper); }

/* Profit Display */
.profit {
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.profit.high {
    color: var(--accent-success);
    background: rgba(30, 255, 0, 0.1);
}

.profit.medium {
    color: var(--gold);
    background: rgba(255, 209, 0, 0.1);
}

.profit-percentage {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, rgba(30, 255, 0, 0.2) 0%, rgba(30, 255, 0, 0.1) 100%);
    border: 1px solid rgba(30, 255, 0, 0.3);
    color: var(--accent-success);
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-dark);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-subtle);
}

.footer p {
    margin: 0.25rem 0;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ==================== TAB NAVIGATION ==================== */
.tabs-section {
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.tabs-navigation {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.tab-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-button:hover {
    color: var(--text-primary);
    background: rgba(201, 162, 39, 0.1);
}

.tab-button.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(201, 162, 39, 0.05);
}

/* Tab Content */
.tab-content {
    animation: fadeIn 0.2s ease-in;
}

.tab-content:not(.active) {
    display: none !important;
}

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

/* ==================== REALMS TABLE ==================== */
.realms-table-container {
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-medium);
    max-height: 70vh;
    overflow-y: auto;
}

.realms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.realms-table thead {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    border-bottom: 2px solid var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 10;
}

.realms-table th {
    padding: 1rem;
    text-align: left;
    color: var(--gold);
    font-weight: 600;
}

.realms-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.2s ease;
}

.realms-table tbody tr:hover {
    background: rgba(201, 162, 39, 0.05);
}

.realms-table td {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
}

/* ==================== POPULATION BADGES ==================== */
.population-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.pop-full {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.pop-high {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.pop-medium {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.pop-low {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.pop-unknown {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .filters {
        gap: 0.75rem;
    }

    .filter-group input,
    .filter-group select {
        min-width: 100px;
    }

    .realm-swap-group {
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
        min-width: unset;
    }

    .realm-swap-group {
        min-width: unset;
    }

    #opportunities-container {
        padding: 1rem;
    }

    .opportunities-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .virtual-scroll-container {
        height: 50vh;
    }
}
