/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

#wrapper {
    width: 100%;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--header-gradient);
    color: white;
    padding: 10px 20px;
    border-bottom: 2px solid var(--header-border);
    position: relative;
}

header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.stats {
    font-size: 11px;
    opacity: 0.9;
}

/* Theme Switcher */
.theme-switcher {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 20px;
}

.theme-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.theme-btn span {
    font-size: 11px;
    font-family: Arial, sans-serif;
}

/* Main Container */
#main-container {
    display: flex;
    height: calc(100vh - 95px);
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    width: 320px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-secondary);
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 95px);
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.filter-section {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 12px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--text-tertiary);
}

.filter-section input[type="text"] {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--border-tertiary);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 11px;
    margin-bottom: 5px;
}

.filter-section select {
    width: 100%;
    padding: 4px;
    border: 1px solid var(--border-tertiary);
    font-size: 11px;
    background: var(--bg-input);
    color: var(--text-primary);
}

.filter-section select[multiple] {
    height: 100px;
}

.filter-section button {
    padding: 4px 8px;
    margin: 2px 2px 0 0;
    border: 1px solid var(--border-tertiary);
    background: var(--bg-button);
    color: var(--text-primary);
    font-size: 10px;
    cursor: pointer;
}

.filter-section button:hover {
    background: var(--bg-button-hover);
}

.filter-section label {
    display: block;
    margin: 4px 0;
    font-size: 11px;
    cursor: pointer;
}

.filter-section input[type="checkbox"] {
    margin-right: 5px;
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 11px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 5px;
}

#apply-filters, #reset-filters, #apply-filters-bottom, #reset-filters-bottom {
    width: 48%;
    padding: 6px;
    font-size: 11px;
    font-weight: bold;
}

#apply-filters, #apply-filters-bottom {
    background: var(--color-accent);
    color: white;
    border: 1px solid var(--color-accent-dark);
}

#apply-filters:hover, #apply-filters-bottom:hover {
    background: var(--color-accent-dark);
}

/* Main Content */
#content {
    flex: 1;
    padding: 15px;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 10px;
    flex-shrink: 0;
    gap: 15px;
}

#results-header #pagination-top {
    margin-top: 0;
    flex-shrink: 0;
}

#results-count {
    font-weight: bold;
    font-size: 13px;
}

#page-info {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Results Table */
#results-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    min-height: 0;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

#results-table th {
    background: var(--bg-table-header);
    padding: 8px 6px;
    text-align: left;
    border-bottom: 2px solid var(--border-primary);
    font-weight: bold;
    font-size: 11px;
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--text-primary);
}

/* Sortable table headers */
#results-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#results-table th.sortable:hover {
    background: var(--bg-hover);
}

#results-table th.sortable .sort-indicator {
    color: var(--accent-primary);
    font-weight: bold;
}

#results-table td {
    padding: 6px;
    border-bottom: 1px solid var(--border-primary);
    vertical-align: top;
}

#results-table tr:hover {
    background: var(--bg-hover);
}

#results-table tr:nth-child(even) {
    background: var(--bg-alternate);
}

.item-name {
    font-weight: bold;
    color: var(--color-accent-darker);
    cursor: pointer;
    text-decoration: underline;
}

.item-name:hover {
    color: var(--color-accent);
}

.price {
    font-weight: bold;
    color: var(--color-error);
    text-align: right;
}

.properties {
    font-size: 10px;
}

.property-tag {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-info);
    padding: 1px 4px;
    margin: 1px;
    border-radius: 2px;
    font-size: 9px;
}

/* Multi-select filter tags */
.filter-tags {
    margin-top: 8px;
    min-height: 24px;
}

.filter-tag {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: 3px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-tag:hover {
    background: var(--color-accent-dark);
}

.filter-tag .remove {
    margin-left: 5px;
    font-weight: bold;
    cursor: pointer;
}

.filter-tag .remove:hover {
    color: #ff9999;
}

.multi-select-dropdown {
    width: 100%;
    padding: 4px;
    border: 1px solid var(--border-secondary);
    border-radius: 3px;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
}

.property-tag.enhancive {
    background: var(--bg-tertiary);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.property-tag.special {
    background: var(--bg-tertiary);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.property-tag.gemstone {
    background: var(--bg-tertiary);
    color: #9c27b0;
    border: 1px solid #9c27b0;
}

.property-tag.rarity {
    font-weight: bold;
}

.property-tag.rarity-regional {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.property-tag.rarity-common {
    background: var(--bg-tertiary);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.property-tag.rarity-rare {
    background: var(--bg-tertiary);
    color: #9c27b0;
    border: 1px solid #9c27b0;
}

.property-tag.rarity-legendary {
    background: var(--bg-tertiary);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.shop-location {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Shop link in search results */
.shop-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.shop-link strong {
    font-weight: 600;
}


/* Pagination */
#pagination, #pagination-top {
    margin-top: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#pagination button, #pagination-top button {
    padding: 4px 8px;
    margin: 0 2px;
    border: 1px solid var(--border-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 11px;
}

#pagination button:hover:not(:disabled), #pagination-top button:hover:not(:disabled) {
    background: var(--bg-hover);
}

#pagination button:disabled, #pagination-top button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pagination .page-number, #pagination-top .page-number {
    padding: 4px 8px;
    margin: 0 1px;
    border: 1px solid var(--border-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 11px;
    display: inline-block;
}

#pagination .page-number.current, #pagination-top .page-number.current {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
}

.modal-content {
    background: var(--modal-bg);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--border-tertiary);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 5px;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#modal-item-name {
    color: var(--color-accent-darker);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-section {
    margin-bottom: 15px;
}

.modal-section h4 {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-tertiary);
}

.modal-section p {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.enhancive-list {
    background: var(--bg-tertiary);
    padding: 8px;
    border-radius: 3px;
    margin: 5px 0;
}

/* Gemstone Property Styles */
.gemstone-properties {
    background: var(--bg-tertiary);
    padding: 10px;
    border-radius: 5px;
    margin: 5px 0;
}

.gemstone-property {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
}

.gemstone-property:last-child {
    margin-bottom: 0;
}

.property-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.rarity-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.rarity-regional { background: #757575; color: #fff; }  /* Grey */
.rarity-common { background: #4caf50; color: #fff; }   /* Green */
.rarity-rare { background: #9c27b0; color: #fff; }     /* Purple */
.rarity-legendary { background: #ff9800; color: #fff; } /* Orange */

.activated-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #27ae60;
    color: white;
    font-weight: bold;
}

.property-mnemonic {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 4px;
}

.property-description {
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-primary);
}

.raw-data {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 8px;
    font-family: monospace;
    font-size: 10px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    border: 4px solid var(--border-secondary);
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    #main-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 95px);
        overflow: visible;
    }

    #sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-secondary);
        max-height: none;
        overflow-y: visible;
        position: static;
    }

    #content {
        overflow: visible;
        height: auto;
        flex: none;
    }

    #results-container {
        max-height: none;
        overflow-y: visible;
        border: none;
    }

    #results-table {
        width: 100%;
        display: table;
    }

    /* Adjust header layout on mobile */
    #results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #results-header #pagination-top {
        order: 2;
        justify-content: center;
    }

    #results-count {
        order: 1;
        text-align: center;
    }

    #page-info {
        order: 3;
        text-align: center;
    }

    /* Make bottom pagination stick on mobile */
    #pagination {
        position: sticky;
        bottom: 0;
        background: var(--bg-secondary);
        padding: 10px 0;
        border-top: 1px solid var(--border-primary);
        margin-top: 0;
    }

    .filter-section {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    #results-table {
        font-size: 10px;
    }

    #results-table th,
    #results-table td {
        padding: 4px;
    }
}

/* Search highlighting */
.highlight {
    background: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Error messages */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border: 1px solid #ffcdd2;
    border-radius: 3px;
    margin: 10px 0;
}

/* Browse Mode Styles */
.mode-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
}

.mode-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-tertiary);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.mode-tab:hover {
    background: var(--bg-hover);
}

.mode-tab.active {
    background: var(--bg-secondary);
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

.mode-content {
    animation: fadeIn 0.3s ease;
}

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

/* Browse Navigation */
#browse-town-select {
    width: 100%;
    font-size: 12px;
}

.shop-item, .room-item {
    padding: 10px;
    margin: 5px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item:hover, .room-item:hover {
    background: var(--bg-hover);
    border-color: var(--color-accent);
    transform: translateX(2px);
}

.shop-name, .room-name {
    font-weight: 600;
    color: var(--color-accent-darker);
    margin-bottom: 4px;
}

.shop-stats, .room-stats {
    font-size: 11px;
    color: var(--text-secondary);
}

.shop-sign {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 6px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-secondary);
    border-radius: 0 3px 3px 0;
    line-height: 1.3;
}

/* Shop Detail View */
.shop-detail-header {
    margin-bottom: 10px;
}

.shop-detail-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--color-accent-darker);
    margin-bottom: 4px;
}

.shop-detail-location {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.shop-detail-sign {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
    padding: 6px 10px;
    background: var(--color-accent-light);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
    line-height: 1.4;
}

.shop-navigation-info {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 8px 10px;
    margin: 8px 0;
    font-size: 12px;
}

.shop-map-id {
    font-weight: bold;
    color: #1b5e20;
    margin-bottom: 4px;
}

.shop-exterior {
    color: #2e7d32;
    font-style: italic;
}

.shop-summary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 10px;
}

.shop-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-item {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Search Help */
.search-help {
    margin-top: 10px;
}

.search-help-toggle {
    cursor: pointer;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.search-help-toggle:hover {
    background: var(--bg-hover);
}

.toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

.search-help-content {
    margin-top: 6px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.search-tip {
    font-size: 10px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.search-tip:last-child {
    margin-bottom: 0;
}

.search-tip strong {
    color: var(--color-accent-darker);
    font-family: monospace;
}

.nav-button {
    background: #2d5a87 !important;
    color: white !important;
    border: 2px solid #1e3d5a !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-button:hover {
    background: #1e3d5a !important;
    border-color: #0f2235 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Browse Results */
.room-header {
    background: var(--bg-tertiary);
    font-weight: bold;
}

.room-header td {
    padding: 8px 12px !important;
    border-bottom: 2px solid var(--border-primary) !important;
    color: var(--text-primary);
}

.item-row {
    border-left: 3px solid transparent;
}

.item-row:hover {
    border-left-color: var(--color-accent);
    background: var(--bg-alternate);
}

/* Town Updates Ticker */
.town-timestamps-ticker {
    background: linear-gradient(to right, #1a1a1a, #2a2a2a, #1a1a1a);
    border-top: 2px solid #4a90e2;
    border-bottom: 1px solid #333;
    margin: 0;
    padding: 0;
    font-size: 12px;
    height: 28px;
    overflow: hidden;
    position: relative;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
}

.ticker-label {
    background: var(--color-accent);
    color: white;
    padding: 0 12px;
    font-weight: bold;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 2;
    position: relative;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
}

.ticker-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    color: #e0e0e0;
    white-space: nowrap;
    /* JavaScript controls animation - no CSS animation needed */
    transform: translateX(0);
}

.ticker-item {
    padding-left: 20px;
    padding-right: 10px;
    position: relative;
}

.ticker-item:after {
    content: "•";
    position: absolute;
    right: 2px;
    color: var(--color-accent);
}

.ticker-item:last-child:after {
    display: none;
}

.ticker-item strong {
    color: var(--color-accent);
    margin-right: 5px;
}

.ticker-spacer {
    padding: 0 60px;
}

.ticker-spacer:after {
    content: "";
    display: none;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-90%);
    }
}

/* Pause on hover */
.ticker-scroll-wrapper:hover .ticker-content {
    animation-play-state: paused;
}

/* URL linking styles */
.item-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.url-button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.url-button:hover {
    background: var(--bg-hover);
    opacity: 1;
    transform: scale(1.1);
}

.url-button:active {
    background: var(--color-accent);
    color: white;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 14px;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments for browse mode */
@media (max-width: 768px) {
    .mode-tabs {
        margin-bottom: 10px;
    }

    .mode-tab {
        padding: 8px;
        font-size: 12px;
    }

    .shop-item, .room-item {
        padding: 8px;
    }

    .town-timestamps-ticker {
        height: 24px;
        font-size: 11px;
    }

    .ticker-label {
        padding: 0 8px;
        font-size: 11px;
    }

    .ticker-content {
        /* JavaScript controls animation */
    }

}

/* Shop Directory Styles */
.shop-directory-row {
    border: none !important;
}

.shop-directory-card {
    padding: 0 !important;
    border: none !important;
}

.shop-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin: 8px 0;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.shop-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.shop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.shop-card-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent-darker);
    line-height: 1.2;
    flex: 1;
    margin-right: 12px;
}

.shop-card-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-secondary);
}

.stat-badge.location {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.shop-card-owner {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-icon {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.owner-text {
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.shop-card-footer {
    margin-top: 12px;
    text-align: right;
}

.shop-card-action {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.shop-card:hover .shop-card-action {
    opacity: 1;
    color: var(--color-accent);
}

/* Shop sign search highlighting */
.shop-card-sign mark {
    background-color: var(--highlight-bg, #ffeb3b);
    color: var(--highlight-color, #000);
    padding: 0 2px;
    border-radius: 2px;
}

.stat-badge.town-badge {
    background: var(--color-accent);
    color: white;
}

/* Mobile responsive for shop cards */
@media (max-width: 768px) {
    .shop-card {
        padding: 16px;
        margin: 6px 0;
    }

    .shop-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .shop-card-name {
        font-size: 16px;
        margin-right: 0;
    }

    .shop-card-stats {
        gap: 6px;
    }

    .stat-badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .shop-card-sign {
        padding: 10px;
        gap: 8px;
    }

    .sign-text {
        font-size: 13px;
    }
}

/* Room Header and Sign Styles */
.room-header-content {
    padding: 8px;
}

.room-title {
    font-size: 14px;
    margin-bottom: 8px;
}

.room-sign {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
}

.room-sign-icon {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.room-sign-text {
    font-size: 12px;
    line-height: 1.3;
    color: var(--color-accent-darker);
    font-style: italic;
    flex: 1;
}

/* Mobile responsive for room signs */
@media (max-width: 768px) {
    .room-sign {
        padding: 6px;
        gap: 6px;
    }

    .room-sign-text {
        font-size: 11px;
    }
}

/* Recently Removed Items Styles */
.removed-item {
    opacity: 0.8;
    background-color: var(--bg-alternate);
}

.removed-item:hover {
    opacity: 1;
    background-color: var(--bg-hover);
}

.removed-info {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2px;
}

.mode-description {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.disclaimer {
    font-size: 11px;
    color: #b71c1c;
    background: #ffebee;
    border-left: 3px solid #f44336;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 3px;
    line-height: 1.4;
}


/* Mobile responsive for removed items */
@media (max-width: 768px) {
    .removed-info {
        font-size: 9px;
    }

    .mode-description {
        font-size: 11px;
    }
}