body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e5e7eb; /* gray-200 */
}
.nft-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.nft-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.1), 0 6px 6px rgba(0, 255, 255, 0.09);
}
.pagination-btn, .control-btn {
    background-color: #374151; /* gray-700 */
    color: #e5e7eb; /* gray-200 */
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563; /* gray-600 */
    transition: background-color 0.2s;
    font-weight: 500;
}
.pagination-btn:hover:not(:disabled), .control-btn:hover:not(:disabled) {
    background-color: #4b5563; /* gray-600 */
}
.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-input, .form-select {
    background-color: #1f2937; /* gray-800 */
    border: 1px solid #4b5563; /* gray-600 */
    border-radius: 0.5rem;
    color: #e5e7eb;
    padding: 0.5rem 0.75rem;
}
.form-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem;
}
.aspect-w-1-aspect-h-1 { position: relative; width: 100%; padding-bottom: 100%; }
.aspect-w-1-aspect-h-1 > img { position: absolute; height: 100%; width: 100%; top: 0; right: 0; bottom: 0; left: 0; object-fit: cover; }

.toggle-label { display: flex; align-items: center; cursor: pointer; color: #d1d5db; }
.toggle-checkbox { opacity: 0; width: 0; height: 0; }
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; background-color: #4b5563; border-radius: 20px; transition: background-color 0.2s; }
.toggle-switch::before { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background-color: white; top: 2px; left: 2px; transition: transform 0.2s; }
.toggle-checkbox:checked + .toggle-switch { background-color: #2dd4bf; }
.toggle-checkbox:checked + .toggle-switch::before { transform: translateX(16px); }

.direction-slider-container { display: flex; align-items: center; gap: 0.5rem; }
input[type="range"].direction-slider { -webkit-appearance: none; appearance: none; width: 60px; height: 16px; background: #374151; border-radius: 8px; outline: none; transition: background 0.2s; }
input[type="range"].direction-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px; /* Reduced Size */
    height: 14px; /* Reduced Size */
    background: #9ca3af;
    border-radius: 50%;
    border: 2px solid #1f2937;
    cursor: pointer;
    margin-top: 1px; /* Re-centered */
}
input[type="range"].direction-slider:disabled { opacity: 0.4; }
input[type="range"].direction-slider:disabled::-webkit-slider-thumb { background: #4b5563; }

.multi-select-container { position: relative; }
.multi-select-button {
    background-color: #1f2937; border: 1px solid #4b5563; border-radius: 0.5rem;
    color: #e5e7eb; padding: 0.5rem 0.75rem; width: 100%; text-align: left;
    display: flex; justify-content: space-between; align-items: center;
    height: 42px;
}
.multi-select-button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-select-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    background-color: #1f2937; border: 1px solid #4b5563; border-radius: 0.5rem;
    max-height: 200px; overflow-y: auto; margin-top: 4px;
}
.multi-select-dropdown label {
    display: block; padding: 0.5rem 0.75rem; cursor: pointer;
    border-bottom: 1px solid #374151;
}
.multi-select-dropdown label:hover { background-color: #374151; }
.multi-select-dropdown label:last-child { border-bottom: none; }
.multi-select-dropdown input { margin-right: 0.5rem; }

.modal-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; backdrop-filter: blur(4px);
}
.modal-content {
    background-color: #1f2937; border: 1px solid #4b5563;
    border-radius: 0.75rem; padding: 1.5rem;
    max-width: 90vw; max-height: 90vh;
    width: 800px;
    overflow-y: auto;
    position: relative;
}
.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem;
    color: #9ca3af; cursor: pointer;
}
.modal-close-btn:hover { color: #e5e7eb; }

.view-toggle-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid #4b5563;
    color: #9ca3af;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
    flex: 1;
}
.view-toggle-btn.active {
    color: #e5e7eb;
    background-color: #4b5563;
    border-color: #6b7280;
}
.image-container { /* Helper class */
    position: relative;
}
.broken-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(220, 38, 38, 0.85);
    color: white;
    padding: 8px 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 5;
    letter-spacing: 0.1em;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.top-right-stack {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 6;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.top-right-stack .overlay-icon {
    width: 40px;
    height: 40px;
    object-fit: contain; /* Fix for distorted logos */
    pointer-events: none;
}
.top-left-toggle {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 7;
    cursor: pointer;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    transition: background-color 0.2s;
}
.top-left-toggle:hover {
    background-color: rgba(0,0,0,0.8);
}
.badges-hidden .top-right-stack,
.badges-hidden .broken-banner {
    opacity: 0;
    pointer-events: none;
}
.filter-section-title {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}
.address-suggestions {
    position: absolute;
    background: #1f2937;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    z-index: 100;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    top: 100%;
}
.address-suggestion-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.875rem;
}
.address-suggestion-item:hover {
    background-color: #374151;
}
#copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10B981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
#copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -1rem);
}
#leaderboard-table {
    border: 1px solid #374151;
    border-radius: 0.5rem;
    overflow: hidden;
}
.leaderboard-header, .leaderboard-row {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    align-items: center;
}
.leaderboard-header {
    background-color: #374151;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    border-bottom: 1px solid #4b5563;
}
.leaderboard-header > span {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
 .leaderboard-header > span.text-center {
    justify-content: center;
 }
.leaderboard-header > span.sort-active {
    color: #ffffff;
    background-color: #4b5563;
    border-radius: 0.375rem;
    padding: 0.1rem 0.4rem;
    transition: background-color 0.2s;
}
.sort-icon {
    opacity: 0.3;
    transition: opacity 0.2s;
}
.sort-icon.active {
    opacity: 1;
    color: white;
}
.leaderboard-row {
    border-bottom: 1px solid #374151;
    cursor: pointer;
    transition: background-color 0.2s;
}
.leaderboard-row:hover {
    background-color: #374151;
}
.leaderboard-row:last-child {
    border-bottom: none;
}
.leaderboard-row.selected {
    background-color: #4b5563;
}
#space-canvas {
    display: block;
    width: 100%;
    height: 75vh;
    background: #000;
    border-radius: 0.5rem;
    border: 1px solid #374151;
    cursor: grab;
}
