/* Theme variables and base styles (modernized) */
:root{
    --bg: #0a0a0a;
    --panel: #0f0f0f;
    --text: #ffffff;
    --muted: #bdbdbd;
    --accent: #007bff;
    --accent-2: #ff5452;
    --glass: rgba(255,255,255,0.04);
    --card-radius: 10px;
    --shadow: 0 8px 30px rgba(2,6,23,0.6);
    --s-color:#fff170; --a-color:#ff5452; --b-color:#ef57ff; --c-color:#8952ff; --d-color:#5c67ff; --e-color:#c4fffe; --f-color:#e4eded;
    --max-width:1000px;
}

/* Light theme removed — site uses single dark theme */

/* Page-level styles */
html, body { height: 100%; margin: 0; padding: 0; font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial; background: #181818; color: var(--text); }
.container { max-width: var(--max-width); margin: 28px auto; padding: 20px; }
.site-header {
    padding: 18px 20px;
    margin-bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.site-header .header-inner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.site-header .site-actions {
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap: wrap;
}
.site-header .site-actions .link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.6px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    transition: background 150ms ease, border-color 150ms ease;
}
.site-header .site-actions .link:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
}
.brand { display:flex; align-items:center; gap:12px }
.brand .logo { width:60px; height:60px; border-radius:0px; background: #29292900; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; position:relative; overflow:hidden }
.brand .logo img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block }
/* Animated gradient for logo */
.brand .logo.animated{ background-size:200% 200%; animation: logoShift 6s linear infinite; }
.brand .logo::after{ content: ''; position: absolute; inset: 0; border-radius:10px; mix-blend-mode: overlay; opacity: 0.12 }
@keyframes logoShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.site-actions { display:flex; gap:10px; align-items:center }
.theme-toggle { background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--text); padding:8px 10px; border-radius:8px; cursor:pointer }
/* Tooltip styles */
.tooltip{position:fixed;z-index:2100;pointer-events:none;display:inline-block;opacity:0;transform:translateY(-6px) scale(.98);transition:opacity 140ms, transform 140ms;font-size:13px;padding:8px 10px;border-radius:8px;background: #000;;color:#fff;border:1px solid rgba(255,255,255,0.06);box-shadow:0 8px 30px rgba(2,6,23,0.6)}
.tooltip.show{ opacity:1; transform:translateY(0) scale(1) }

/* Lightweight non-blocking save toast */
.save-toast{
    position:fixed;right:18px;bottom:18px;z-index:2200;padding:10px 14px;border-radius:10px;background:rgba(0,0,0,0.75);color:#fff;border:1px solid rgba(255,255,255,0.06);box-shadow:0 8px 30px rgba(2,6,23,0.6);font-weight:700;font-family:Roboto,system-ui;opacity:0;transform:translateY(6px) scale(.98);transition:opacity 200ms, transform 200ms;pointer-events:none}
.save-toast.show{ opacity:1; transform:translateY(0) scale(1) }

/* Add Row button now sits inline with the weapon selector on the right */
.weapon-selector { display:flex; align-items:center; gap:12px }
.add-row-button{ margin-left:auto; padding:8px 12px; border-radius:8px; background: rgba(255,255,255,0.03); color:var(--text); border:1px solid rgba(255,255,255,0.04); cursor:pointer }
.add-row-button:hover{ background: rgba(255,255,255,0.06) }
.start-here-hint::after {
    content: '';
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,255,170,0.5);
}

.start-here-hint {
    color: #7CFFB2;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 13px;
    text-shadow: 0 2px 12px rgba(0,255,170,0.45);
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(124,255,178,0.18);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(8px);
    position: relative;
    margin-left: 6px;
    white-space: nowrap;
    animation: startHintGlow 3s ease-in-out infinite;
    will-change: box-shadow, filter;
}

/* Modal styling */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.7); z-index: 2000; padding: 16px; box-sizing: border-box; }
.modal.is-open { display: flex; }
.modal-content { position: relative; background: #111; color: #fff; padding: 18px; border-radius: 12px; max-width: min(640px, 96vw); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.55); }
.modal-content img { display: block; width: 100%; max-width: 600px; height: auto; object-fit: contain; margin: 12px auto; border-radius: 12px; }
.modal-media { display: block; width: 100%; max-width: 600px; max-height: 80vh; object-fit: contain; margin: 12px auto; border-radius: 12px; background: #000; }
.modal-close { position: absolute; top: 10px; right: 10px; cursor: pointer; font-weight: 700; }

@keyframes startHintGlow {
    0% {
        box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 12px rgba(0,255,170,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
        filter: drop-shadow(0 0 0 rgba(0,255,170,0.0));
    }
       
    25% {
        box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 24px rgba(0,255,170,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
        filter: drop-shadow(0 0 18px rgba(0,255,170,0.45));
        
    }
    
    100% {
        box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 12px rgba(0,255,170,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
        filter: drop-shadow(0 0 0 rgba(0,255,170,0.0));
    }
}


/* Tour overlay styles removed */
.hero-card { background: #000; padding:18px; border-radius:var(--card-radius); box-shadow:var(--shadow); display:flex; gap:20px; align-items:flex-start }
.weapon-tier-list-widget h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 30px;
    color: white;
}
.weapon-tier-list-widget h3 {
    border-top: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: white;
}

/* Widget-specific styles */
.weapon-tier-list-widget {
    font-family: 'Roboto', sans-serif;
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
    background-color: var(--panel);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: var(--shadow);
    transition: background-color 200ms, color 200ms, box-shadow 200ms;
}
.weapon-tier-list-widget .tier-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}
.weapon-tier-list-widget .tier-row {
    display: flex;
    align-items: stretch;
    margin-bottom: 0px;
    min-height: 110px;
    border-bottom: 1px solid #414141;
    border-right: 1px solid #414141;
    background-color: #292929;
    transition: transform 0.2s ease;
}

.weapon-tier-list-widget .tier-label {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    font-weight: bold;
    color: #000;
    padding: 8px;
    box-sizing: border-box;
    /* Cross-browser height: use flexbox stretch from parent + align-self */
    min-height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #414141;
    border-right: 2px solid #414141;
    cursor: pointer;
    word-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
}
.weapon-tier-list-widget #s-tier .tier-label {
    background-color: #fff170;
}
.weapon-tier-list-widget #a-tier .tier-label {
    background-color: #ff5452;
}
.weapon-tier-list-widget #b-tier .tier-label {
    background-color: #ef57ff;
}
.weapon-tier-list-widget #c-tier .tier-label {
    background-color: #8952ff;
}
.weapon-tier-list-widget #d-tier .tier-label {
    background-color: #5c67ff;
}
.weapon-tier-list-widget #e-tier .tier-label {
    background-color: #c4fffe;
}
.weapon-tier-list-widget #f-tier .tier-label {
    background-color: #e4eded;
}
.weapon-tier-list-widget .tier-items {
    flex-grow: 1;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.03);
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background-color: rgba(0,0,0,0.04);
    transition: border-color 120ms, background-color 120ms;
}
.weapon-tier-list-widget .tier-items.drag-over {
    border-color: rgba(0,123,255,0.6);
    background-color: rgba(0,123,255,0.04);
}
.weapon-tier-list-widget .weapon-pool {
    margin-top: 0;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    background-color: var(--glass);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tier-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}
.tier-actions .actions-left {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}
.tier-actions .button {
    margin-top: 0;
}
.tier-actions .pool-controls {
    margin-left: auto;
    flex-wrap: nowrap;
}
.site-footer {
    height: 100px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0.4px;
}
.site-footer .footer-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    padding: 0 24px;
}
.site-footer .footer-brand {
    display: flex;
    gap: 12px;
    align-items: center;
}
.site-footer .footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 0px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    object-fit: cover;
}
.site-footer .footer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.site-footer .footer-tagline {
    font-size: 12px;
    color: var(--muted);
}
.site-footer .footer-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.6px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 999px;
    transition: background 150ms ease, border-color 150ms ease;
}
.site-footer .footer-link:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
}
.weapon-pool-wrapper {
    margin-top: 20px;
}
.pool-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}
.weapon-tier-list-widget .button.button-secondary {
    margin-top: 0;
    margin-right: 0;
    padding: 8px 16px;
    font-size: 14px;
    background-color: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
}
.weapon-tier-list-widget .button.button-secondary:disabled {
    opacity: 0.4;
    cursor: default;
}
.weapon-tier-list-widget .pool-counter {
    font-size: 12px;
    color: var(--muted);
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 999px;
    padding: 6px 12px;
    min-width: 70px;
    text-align: center;
}
.weapon-tier-list-widget .weapon-pool.shuffled {
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    transition: box-shadow 200ms ease;
}
.weapon-tier-list-widget .weapon-pool.drag-over {
    border-color: rgba(255,255,255,0.04);
    background-color: var(--glass);
}
.weapon-tier-list-widget .weapon {
    width: 84px;
    height: 84px;
    cursor: grab;
    user-select: none;
    position: relative;
    overflow: hidden;
    background-color: transparent;
    border-radius:8px;
    display:flex;align-items:center;justify-content:center;
    transition: transform 80ms ease, box-shadow 80ms ease, opacity 100ms ease;
    will-change: transform;
}
.weapon-tier-list-widget .weapon:active {
    cursor: grabbing;
}
.weapon.dragging {
    pointer-events: none !important;
    width: 84px !important;
    height: 84px !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0.3 !important;
    z-index: 1 !important;
}

/* Floating preview while dragging */
.drag-preview {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transform-origin: center;
    box-shadow: 0 18px 40px rgba(2,6,23,0.45);
    transition: transform 140ms cubic-bezier(.2,.9,.2,1), opacity 120ms ease;
    will-change: left, top, transform;
}
.drag-preview img { width: 100%; height: 100%; object-fit: contain; }
.weapon-tier-list-widget .weapon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.weapon-tier-list-widget .weapon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #fff;
    color: #000;
    font-size: 10px;
    text-align: center;
    word-wrap: break-word;
    padding: 2px;
    box-sizing: border-box;
}
.weapon-tier-list-widget .weapon-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.2);
    border: 2px solid #007bff;
    box-sizing: border-box;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}
.weapon-tier-list-widget .weapon.dragging .weapon-mask {
    opacity: 1;
}

/* Placeholder visual shown while dragging (snap target) */
.weapon.placeholder {
    width: 84px;
    height: 84px;
    display:flex;align-items:center;justify-content:center;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    box-sizing: border-box;
    pointer-events: none;
}

.drag-preview { transition: transform 120ms cubic-bezier(.22,.9,.2,1), box-shadow 120ms ease; will-change: transform; }
.drag-preview img { width: 100%; height: 100%; object-fit: contain; display:block }
/* Modal styles - works both inside widget and when moved to body */
.weapon-tier-list-widget .modal,
body > .modal#image-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
    transform: none;
    left: 0;
    top: 0;
}
.weapon-tier-list-widget .modal.is-open,
body > .modal#image-modal.is-open {
    display: flex;
}
.weapon-tier-list-widget .modal-content,
body > .modal#image-modal .modal-content {
    position: relative;
    width: auto;
    padding: 40px;
    height: auto;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    max-height: 90vh;
    background-color: var(--panel);
    color: var(--text);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: auto;
    border: 1px solid rgba(255,255,255,0.06);
}
.weapon-tier-list-widget .modal-content img,
body > .modal#image-modal .modal-content img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
}
.weapon-tier-list-widget .modal-content .modal-text,
body > .modal#image-modal .modal-content .modal-text {
    display: flex;
    font-family: 'Roboto', sans-serif;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 300px;
    background-color: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 24px;
    text-align: center;
    word-wrap: break-word;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 8px;
}
.weapon-tier-list-widget .modal-content .weapon-name,
body > .modal#image-modal .modal-content .weapon-name {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 8px 8px 0 0;
    margin: -40px -40px 20px -40px;
}
.weapon-tier-list-widget .modal-close,
body > .modal#image-modal .modal-close {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: #333;
    padding: 0 8px;
    border-radius: 4px;
    z-index: 10;
}
.weapon-tier-list-widget .modal-close:hover,
body > .modal#image-modal .modal-close:hover {
    background: #555;
}
.weapon-tier-list-widget .button {
    margin-top: 20px;
    margin-right: 10px;
    padding: 10px 20px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 15px;
    transition: transform 140ms ease, background-color 120ms;
}
.weapon-tier-list-widget .button:hover {
    background-color: #0056b3;
}
.weapon-tier-list-widget .reset-button {
    background-color: var(--accent-2);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}
.weapon-tier-list-widget .reset-button:hover {
    background-color: #b02a37;
}
.weapon-tier-list-widget .weapon-selector {
    margin-top: 20px;
    margin-bottom: 10px;
}
.weapon-tier-list-widget .weapon-selector select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}
.weapon-tier-list-widget .weapon-selector select:focus {
    outline: none;
    border-color: #007bff;
}
.weapon-tier-list-widget .description {
    color: #fff;
    margin-bottom: 20px;
    font-size: 14px;
}
/* Keep backward compatibility with older dark-mode toggle */
.weapon-tier-list-widget.dark-mode .tier-items { background-color: #292929 }
.weapon-tier-list-widget.dark-mode .weapon-pool { background-color: #292929 }

/* Light theme removed — no light-mode helpers */
.modal-content a {
    color: var(--accent);
    text-decoration: none;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
}
.modal-content a:hover {
    text-decoration: underline;
}
.custom-select {
    position: relative;
    display: inline-block;
    font-family: 'Roboto', sans-serif;
}
.dropdown-button {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    backdrop-filter: blur(8px);
    color: var(--text);
    cursor: pointer;
    min-width: 220px;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.dropdown-button:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
    border-color: rgba(255,255,255,0.12);
}
.dropdown-button:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 0 2px rgba(0,123,255,0.25);
}
.dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: linear-gradient(180deg, rgba(20,20,28,0.95), rgba(12,12,18,0.98));
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    width: 100%;
    min-width: 240px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}
.dropdown-list li {
    padding: 10px 14px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    font-size: 14px;
    transition: background 120ms ease, color 120ms ease;
    margin: 0 6px;
    border-radius: 6px;
}
.dropdown-list li:hover {
    background: linear-gradient(90deg, rgba(0,123,255,0.15), rgba(0,123,255,0.05));
    color: #fff;
}

/* subtle transitions */
.weapon, .tier-items, .weapon-tier-list-widget, .modal-content { transition: all 160ms ease; }
.dropdown-list li.divider {
    pointer-events: none;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 14px 8px 14px;
    margin: 6px 0 4px 0;
    border-radius: 0;
    cursor: default;
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
}
.dropdown-list li.divider:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
}

/* Custom scrollbar for dropdown list */
.dropdown-list::-webkit-scrollbar {
    width: 8px;
}
.dropdown-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}
.dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

/* Dropdown arrow indicator */
.dropdown-button::after {
    content: '▼';
    float: right;
    font-size: 10px;
    opacity: 0.6;
    margin-left: 10px;
    transition: transform 200ms ease;
}

.drag-handle {
    cursor: grab;
    padding: 5px;
    font-size: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #292929;
    border-right: 1px solid #000;
    border-top: 1px solid #414141;
    border-left: 1px solid #414141;
    border-bottom: 1px solid #000;
    user-select: none;
    min-width: 20px;
}
.tier-row.dragging {
    opacity: 0.0;
    transform: scale(0);
    transform: translate;
}
.tier-row.sortable-chosen {
    background-color: #292929;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.tier-row.sortable-ghost {
    background-color: #292929;
    border: 2px dashed #007bff;
}
.delete-row {
    cursor: pointer;
    padding: 5px;
    background: #292929;
    color: white;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glass-theme specific polish (scoped to this page) */
.glass-theme { background: #181818; color: #fff; }
.glass-theme .container { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:14px; padding:26px; border:1px solid rgba(255,255,255,0.06); box-shadow:0 20px 60px rgba(2,6,23,0.7); backdrop-filter: blur(8px) saturate(130%); }
.glass-theme header.site-header { background: linear-gradient(180deg, rgba(0,0,0,0.8), rgba(0,0,0,0.4)); padding:12px; margin-bottom:18px; }
.glass-theme .brand .logo { border:0px solid rgba(255,255,255,0.08); box-shadow:0 10px 30px rgba(0,0,0,0.6);border-radius:40px }
.glass-theme .hero-card { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); border:1px solid rgba(255,255,255,0.06); backdrop-filter: blur(6px); }
.glass-theme .weapon-tier-list-widget { background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4)); border:1px solid rgba(255,255,255,0.06); backdrop-filter: blur(6px); }
/* Remove gradient from tier rows and weapon pool for a flat appearance */
.glass-theme .weapon-pool, .glass-theme .tier-items { background: rgba(0,0,0,0.04); border:1px solid rgba(255,255,255,0.04); }
/* Remove rounding on tier labels for a crisp design */
.glass-theme .tier-label { box-shadow: inset 0 -6px 18px rgba(255,255,255,0.03); border-radius:0; color:#000; }
.glass-theme .weapon { transition: transform 80ms ease, box-shadow 80ms ease; outline: none; }
/* Remove default focus ring on click; preserve a subtle keyboard focus for accessibility */
.glass-theme .weapon:focus { outline: none; }
.glass-theme .weapon:focus-visible { outline: 2px solid rgba(255,255,255,0.06); outline-offset: 2px; }
.glass-theme .weapon:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 12px 28px rgba(2,6,23,0.5); }
/* Visual feedback while dragging */
.glass-theme .weapon.dragging { 
    box-shadow: inset 0 0 8px rgba(0,123,255,0.2), 0 0 0 2px rgba(0,123,255,0.3); 
    transform: scale(0.95); 
}

/* Prevent native blue/tap highlight on click */
.glass-theme .weapon,
.glass-theme .weapon * {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    background-color: transparent;
}
.glass-theme .weapon:active,
.glass-theme .weapon:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}
/* Strong override for focus rings / vendor-specific focus inner borders */
.glass-theme .weapon:focus,
.glass-theme .weapon:focus-visible,
.glass-theme .weapon:active,
.glass-theme .weapon *:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}
.glass-theme .weapon::-moz-focus-inner { border: 0 !important; }

/* Force-remove any residual focus rings/borders for weapon elements */
.glass-theme .weapon:focus,
.glass-theme .weapon:focus-visible,
.glass-theme .weapon:active,
.glass-theme .weapon *:focus,
.glass-theme .weapon::-moz-focus-inner,
.glass-theme .weapon::-webkit-focus-ring-color {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    outline-color: transparent !important;
}
/* Ensure no focus outline appears anywhere in the widget */
.weapon-tier-list-widget *:focus,
.weapon-tier-list-widget *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    outline-color: transparent !important;
}
.glass-theme .modal,
.glass-theme body > .modal#image-modal { backdrop-filter: blur(6px) brightness(.9); }
.glass-theme .modal-content,
.glass-theme body > .modal#image-modal .modal-content { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border:1px solid rgba(255,255,255,0.06); backdrop-filter: blur(10px) saturate(120%); }
.glass-theme .theme-toggle { border:1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); }

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Header adjustments */
    .site-header {
        padding: 12px 16px;
    }
    
    .site-header .header-inner {
        flex-direction: column;
        gap: 12px;
    }
    
    .site-header .site-actions {
        width: 100%;
        justify-content: center;
    }
    
    .site-header .site-actions .link {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .brand .logo {
        width: 40px;
        height: 40px;
    }
    
    /* Container adjustments */
    .container {
        margin: 16px auto;
        padding: 12px;
    }
    
    /* Tier list adjustments - make tier labels narrower */
    .weapon-tier-list-widget .tier-label {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        font-size: 16px;
        padding: 4px;
    }
    
    /* Tier row adjustments */
    .weapon-tier-list-widget .tier-row {
        min-height: 50px !important;
    }
    
    /* Make drag handle and delete button smaller */
    .drag-handle,
    .delete-row {
        min-width: 28px;
        font-size: 14px;
        padding: 2px;
    }
    
    /* Tier items - adjust for smaller screens */
    .weapon-tier-list-widget .tier-items {
        min-height: 50px !important;
        padding: 4px;
        gap: 3px;
    }
    
    /* Weapon cards - make them smaller on mobile */
    .weapon-tier-list-widget .weapon {
        width: 45px;
        height: 45px;
    }
    
    .weapon-tier-list-widget .weapon img {
        max-width: 100%;
        max-height: 100%;
    }
    
    /* Weapon selector adjustments */
    .weapon-selector {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .start-here-hint {
        display: none;
    }
    
    .custom-select {
        width: 100%;
    }
    
    .dropdown-button {
        width: 100%;
    }
    
    .add-row-button {
        width: 100%;
        margin-left: 0;
    }
    
    /* Weapon pool adjustments */
    .weapon-tier-list-widget .weapon-pool {
        padding: 8px;
        gap: 6px;
    }
    
    /* Tier actions adjustments */
    .tier-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tier-actions .actions-left {
        width: 100%;
        justify-content: center;
    }
    
    .tier-actions .pool-controls {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
    
    /* Button adjustments */
    .weapon-tier-list-widget .button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Modal adjustments */
    .modal-content {
        max-width: 90%;
        max-height: 90%;
        padding: 16px;
    }
    
    /* Footer adjustments */
    .site-footer {
        padding: 20px 16px;
        height: auto;
    }
    
    .site-footer .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .site-footer .footer-brand {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small screens - further optimizations */
    .weapon-tier-list-widget .tier-label {
        width: 45px;
        min-width: 45px;
        max-width: 45px;
        font-size: 13px;
    }
    
    .weapon-tier-list-widget .tier-row {
        min-height: 42px !important;
    }
    
    .weapon-tier-list-widget .tier-items {
        min-height: 42px !important;
        padding: 3px;
        gap: 2px;
    }
    
    .weapon-tier-list-widget .weapon {
        width: 38px;
        height: 38px;
    }
    
    .drag-handle,
    .delete-row {
        min-width: 24px;
        font-size: 12px;
    }
    
    .site-header .site-actions .link {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Inline profanity validation */
.profanity-invalid {
    border-color: #ff5452 !important;
    box-shadow: 0 0 0 2px rgba(255, 84, 82, 0.25);
}
