
:where(.tool-content) {
    --bg-color: #050811;
    --panel-bg: rgba(9, 13, 26, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --gold: #f5c453;
    --gold-rgb: 245, 196, 83;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

:where(.tool-content) * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:where(.tool-content) {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

:where(.tool-content)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(245, 196, 83, 0.04), transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.06), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(10, 15, 30, 0.5), #03050a 100%);
    pointer-events: none;
}

/* Premium Navigation Bar */
:where(.tool-content) .nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 70px;
    background: rgba(4, 6, 12, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

:where(.tool-content) .nav-logo {
    color: #fff;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

:where(.tool-content) .nav-logo:hover {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.4);
}

:where(.tool-content) .nav-logo img {
    max-height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

:where(.tool-content) .nav-links {
    display: flex;
    gap: 24px;
}

:where(.tool-content) .nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

:where(.tool-content) .nav-link:hover, :where(.tool-content) .nav-link.active {
    color: var(--gold);
    border-color: rgba(var(--gold-rgb), 0.2);
    background: rgba(var(--gold-rgb), 0.05);
}

/* Main Container */
:where(.tool-content) .container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

:where(.tool-content) .page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

:where(.tool-content) .page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

:where(.tool-content) .page-title i {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.4);
}

/* Filter & Search Bar */
:where(.tool-content) .filter-bar {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

:where(.tool-content) .search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

:where(.tool-content) .search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 16px;
}

:where(.tool-content) .search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 12px 16px 12px 44px;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

:where(.tool-content) .search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.2);
}

:where(.tool-content) .filter-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

:where(.tool-content) .filter-select:focus {
    border-color: var(--gold);
}

/* View Switcher */
:where(.tool-content) .view-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    padding: 4px;
    border-radius: 8px;
}

:where(.tool-content) .view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

:where(.tool-content) .view-btn.active {
    background: var(--gold);
    color: #000;
}

/* Shop Cards Grid */
:where(.tool-content) .shops-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

:where(.tool-content) .shop-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

:where(.tool-content) .shop-card:hover {
    border-color: rgba(var(--gold-rgb), 0.25);
    transform: translateY(-2px);
}

:where(.tool-content) .shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

:where(.tool-content) .shop-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

:where(.tool-content) .shop-title-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}

:where(.tool-content) .shop-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

:where(.tool-content) .shop-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

:where(.tool-content) .shop-meta i {
    color: var(--gold);
}

:where(.tool-content) .shop-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Items Grid */
:where(.tool-content) .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

:where(.tool-content) .item-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

:where(.tool-content) .item-card:hover {
    background: rgba(var(--gold-rgb), 0.05);
    border-color: rgba(var(--gold-rgb), 0.3);
    transform: scale(1.02);
}

:where(.tool-content) .item-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
}

:where(.tool-content) .item-icon-wrapper img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

:where(.tool-content) .item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

:where(.tool-content) .item-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

:where(.tool-content) .item-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

:where(.tool-content) .item-size-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: monospace;
}

/* Flat Grid Mode */
:where(.tool-content) .flat-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

:where(.tool-content) .flat-item-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
}

:where(.tool-content) .flat-item-card:hover {
    border-color: rgba(var(--gold-rgb), 0.3);
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

:where(.tool-content) .flat-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

:where(.tool-content) .flat-item-:where(.tool-content) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--panel-border);
    padding-top: 12px;
    margin-top: 4px;
}

:where(.tool-content) .flat-seller-info {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

:where(.tool-content) .flat-seller-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

:where(.tool-content) .flat-seller-info i {
    color: var(--gold);
}

/* Tooltip */
:where(.tool-content) .custom-tooltip {
    position: fixed;
    background: rgba(8, 12, 22, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.8);
    padding: 28px 18px 14px 16px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-main);
    z-index: 10000;
    pointer-events: auto;
    display: none;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(12px);
    max-width: 320px;
    line-height: 1.6;
}

:where(.tool-content) .custom-tooltip.pinned {
    border-color: #f59e0b;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.4);
}

:where(.tool-content) .tooltip-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    font-size: 16px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

:where(.tool-content) .tooltip-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

/* Empty State */
:where(.tool-content) .empty-state {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

:where(.tool-content) .empty-icon {
    font-size: 48px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

:where(.tool-content) .empty-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

:where(.tool-content) .empty-subtext {
    font-size: 13px;
    color: var(--text-dim);
}

/* Scrollbar styling */
:where(.tool-content) ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

:where(.tool-content) ::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

:where(.tool-content) ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}

:where(.tool-content) ::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 196, 83, 0.3);
}

/* Responsive Rules */
@media (max-width: 768px) {
    :where(.tool-content) .nav-bar {
        padding: 12px 16px;
        height: auto;
        flex-direction: column;
        gap: 12px;
    }
    :where(.tool-content) .nav-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    :where(.tool-content) .nav-link {
        font-size: 11px;
        padding: 4px 10px;
    }
    :where(.tool-content) .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    :where(.tool-content) .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    :where(.tool-content) .search-wrapper {
        width: 100%;
    }
    :where(.tool-content) .filter-select {
        width: 100%;
    }
    :where(.tool-content) .view-switcher {
        width: 100%;
        justify-content: center;
    }
    :where(.tool-content) .view-btn {
        flex: 1;
        justify-content: center;
    }
}
