body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background: #0D0D0D;
    color: #E5E5E5;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #1A1A1A;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
h1 {
    color: #FFD700;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 28px;
}

/* Search container styles */
.search-container {
    margin-bottom: 24px;
}

.search-container input {
    width: 100%;
    padding: 14px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 16px;
    background: #262626;
    color: #E5E5E5;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.search-container input:hover {
    border-color: #555;
    background: #2A2A2A;
}

.search-container input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
    background: #2A2A2A;
}

.search-container input::placeholder {
    color: #888;
}

.filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 24px;
    background: #262626;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #333;
}
.filter-group {
    position: relative;
}
.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #FFD700;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group select, 
.filter-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    background: #1A1A1A;
    color: #E5E5E5;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.filter-group select {
    cursor: pointer;
}
.filter-group select:hover, 
.filter-group input:hover {
    border-color: #555;
    background: #1F1F1F;
}
.filter-group select:focus, 
.filter-group input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
    background: #1F1F1F;
}
.filter-group input::placeholder {
    color: #666;
}

/* Reset button styles */
.reset-button {
    padding: 10px 16px;
    background: #333;
    color: #E5E5E5;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reset-button:hover {
    background: #3A3A3A;
    border-color: #555;
}

.reset-button:active {
    background: #2A2A2A;
    transform: translateY(1px);
}

/* Refresh button styles */
.refresh-button {
    padding: 10px 16px;
    background: #2c3e50;
    color: #E5E5E5;
    border: 1px solid #34495e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.refresh-button:hover {
    background: #34495e;
    border-color: #3d566e;
}

.refresh-button:active {
    background: #2c3e50;
    transform: translateY(1px);
}

/* Filter buttons container */
.filter-buttons {
    grid-column: 3;
    justify-self: end;
    align-self: end;
    display: flex;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: #1A1A1A;
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #333;
}
th {
    background-color: #262626;
    font-weight: 600;
    color: #FFD700;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}
th:hover {
    background-color: #2f2f2f;
}
th::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}
th.sort-asc::after {
    border-bottom: 6px solid #FFD700;
}
th.sort-desc::after {
    border-top: 6px solid #FFD700;
}
tr:hover {
    background-color: #262626;
}
.status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
    cursor: pointer;
    will-change: transform;
}
.status-AVAILABLE {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}
.status-RENTED {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}
.status-NO_NPC {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}
.price {
    font-family: 'Inter', monospace;
    font-size: 0.9em;
    color: #FFD700;
    font-weight: 500;
}
.loading {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Error message styles */
.error {
    text-align: center;
    padding: 16px;
    margin-bottom: 20px;
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-radius: 6px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    font-weight: 500;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
.item-name {
    color: #E5E5E5;
    cursor: help;
    font-weight: 500;
    font-size: 14px;
}
.building-name {
    color: #E5E5E5;
    cursor: help;
    font-weight: 500;
    font-size: 14px;
}
.item-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.item-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(38, 38, 38, 0.95);
    color: #E5E5E5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    white-space: pre-line;
    z-index: 10;
    margin-bottom: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    text-align: left;
    max-width: 300px;
    width: max-content;
    line-height: 1.5;
}

/* Add a small arrow to the tooltip */
[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #444 transparent transparent transparent;
    z-index: 11;
}

/* Rental tooltip specific styles */
.rental-tooltip {
    white-space: pre-line !important;
    width: max-content;
    max-width: 300px;
    text-align: left;
}

.rental-tooltip-label {
    color: #FFD700;
    font-weight: 500;
}

.rental-tooltip-value {
    color: #E5E5E5;
}

.parcel {
    color: #888;
    font-size: 0.9em;
    margin-left: 4px;
}
.parcel-cell {
    font-family: 'Inter', monospace;
    font-size: 0.9em;
    color: #888;
    background-color: rgba(38, 38, 38, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
    display: inline-block;
}
tr:last-child td {
    border-bottom: none;
}
.footer {
    margin-top: 20px;
    padding: 16px;
    color: #888;
    font-size: 14px;
    text-align: right;
    border-top: 1px solid #333;
}
.count {
    color: #FFD700;
    font-weight: 500;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 12px;
}
.pagination-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #262626;
    color: #E5E5E5;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}
.pagination-button:hover:not(:disabled) {
    background: #333;
}
.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-info {
    color: #888;
    font-size: 14px;
}
@media (max-width: 1024px) {
    .filters {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Custom tooltip */
.custom-tooltip {
    position: absolute;
    background: rgba(38, 38, 38, 0.95);
    color: #E5E5E5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    white-space: pre-line;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    text-align: left;
    max-width: 300px;
    width: max-content;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.custom-tooltip.visible {
    opacity: 1;
}

/* Add styles for lazy loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

img:not(.lazy-load) {
    opacity: 1;
}

/* Debug button styles */
.debug-button {
    padding: 4px 8px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.debug-button:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.debug-button:active {
    transform: scale(0.98);
}

/* Add content-visibility for better rendering performance */
tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: 0 48px; /* Approximate height of a row */
}

/* Loader styles */
#loader {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.loader-spinner {
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top: 4px solid #FFD700;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loader-message {
    color: #FFD700;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 16px;
}

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

/* Success message styles */
.success-message {
    text-align: center;
    padding: 16px;
    margin-bottom: 20px;
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border-radius: 6px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.loading-message {
    text-align: center;
    padding: 30px;
    color: #FFD700;
    font-weight: 500;
    font-size: 16px;
}

.fade-out {
    animation: fadeOut 0.5s ease;
    opacity: 0;
}

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

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

.discord-support {
    margin-left: 12px;
}

.discord-support a {
    color: #5865F2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.discord-support a:hover {
    color: #7289DA;
    text-decoration: underline;
} 