:root{
    --color-bg-table:rgba(15,15,20,0.95);
    --color-rarity-common:#10a115;
    --color-rarity-uncommon:#426ce7;
    --color-rarity-collection:#e568b3;
    --color-rarity-rare:#9b1554;
    --color-rarity-unique:#cc1237;
    --color-rarity-legendary:#ff8c00;
    --color-tier-1:#9ca3af;
    --color-tier-2:#22c55e;
    --color-tier-3:#f97316;
    --color-tier-unique:#a855f7;
    --color-gravity:#b8860b;
    --color-chemical:#10b981;
    --color-electric:#3b82f6;
    --color-thermal:#ef4444;
    --color-frost:#38bdf8
}

.bg-overlay{
    position:fixed;
    top:0;left:0;
    width:100%;height:100%;
    background:url("../images/hero.png") no-repeat center center;
    background-size:cover;
    z-index:-2
}
.bg-overlay::before{
    content:'';
    position:absolute;
    top:0;left:0;
    width:100%;height:100%;
    background:linear-gradient(180deg,rgba(10,10,11,0.70) 0%,rgba(10,10,11,0.82) 30%,rgba(10,10,11,0.92) 100%)
}

.calculator{padding:20px 0 80px}
.calculator__layout{
    display:grid;
    grid-template-columns:1fr 400px;
    gap:24px;
    align-items:start
}
.calculator__equipment{
    display:flex;
    flex-direction:column;
    gap:20px;
    max-width:100%;
    position:relative
}
.calculator__results{position:sticky;top:calc(var(--header-height) + 20px)}

.equipment-card{
    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    border-radius:16px;
    overflow:visible;
    max-width:100%;
    position:relative
}
.equipment-card__header{
    display:flex;
    align-items:center;
    gap:14px;
    padding:18px 20px;
    background:rgba(0,0,0,0.2);
    border-bottom:1px solid var(--color-border);
    border-radius:16px 16px 0 0
}
.equipment-card__icon{
    width:44px;height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(196,163,90,0.15);
    border-radius:12px;
    color:var(--color-accent);
    flex-shrink:0
}
.equipment-card__icon svg{width:22px;height:22px}
.equipment-card__icon--container{background:rgba(59,130,246,0.15);color:var(--color-electric)}
.equipment-card__icon--artifacts{background:rgba(139,92,246,0.15);color:#8b5cf6}
.equipment-card__title{
    flex:1;
    font-family:var(--font-heading);
    font-size:20px;
    font-weight:500;
    letter-spacing:1px;
    min-width:0
}
.equipment-card__counter{
    font-size:14px;
    color:var(--color-text-muted);
    background:rgba(255,255,255,0.05);
    padding:6px 14px;
    border-radius:20px;
    flex-shrink:0
}
.equipment-card__content{padding:20px;overflow:visible;position:relative}

.select-wrapper{position:relative}
.custom-select{
    width:100%;
    padding:14px 48px 14px 16px;
    font-family:var(--font-main);
    font-size:15px;
    color:var(--color-text);
    background:rgba(0,0,0,0.3);
    border:1px solid var(--color-border);
    border-radius:10px;
    cursor:pointer;
    appearance:none;
    transition:var(--transition)
}
.custom-select:hover:not(:disabled){border-color:rgba(255,255,255,0.2)}
.custom-select:focus{outline:none;border-color:var(--color-accent)}
.custom-select:disabled{opacity:0.5;cursor:not-allowed}
.custom-select option{background:#1a1a24;color:var(--color-text);padding:10px}
.select-arrow{
    position:absolute;
    right:14px;top:50%;
    transform:translateY(-50%);
    pointer-events:none;
    color:var(--color-text-muted)
}
.select-arrow svg{width:20px;height:20px}

.enhancement-block{
    margin-top:16px;
    padding:16px;
    background:linear-gradient(135deg,rgba(196,163,90,0.1) 0%,rgba(196,163,90,0.05) 100%);
    border:1px solid rgba(196,163,90,0.25);
    border-radius:12px
}
.enhancement-block__header{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.enhancement-block__icon{
    width:32px;height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(196,163,90,0.2);
    border-radius:8px;
    color:var(--color-accent);
    flex-shrink:0
}
.enhancement-block__icon svg{width:18px;height:18px}
.enhancement-block__title{flex:1;font-size:14px;font-weight:500;color:var(--color-text)}
.enhancement-block__value{
    font-size:18px;font-weight:700;
    color:var(--color-accent);
    min-width:32px;text-align:center
}
.enhancement-block__slider-container{padding:0 4px;position:relative;touch-action:pan-x}
.enhancement-slider{
    width:100%;height:8px;
    -webkit-appearance:none;appearance:none;
    background:rgba(0,0,0,0.3);
    border-radius:4px;outline:none;
    cursor:pointer;touch-action:none;
    -webkit-touch-callout:none;
    -webkit-user-select:none;user-select:none;
    position:relative;z-index:1
}
.enhancement-slider::-webkit-slider-thumb{
    -webkit-appearance:none;appearance:none;
    width:22px;height:22px;
    background:linear-gradient(135deg,var(--color-accent) 0%,#d4b366 100%);
    border-radius:50%;cursor:pointer;
    box-shadow:0 2px 8px rgba(196,163,90,0.4);
    transition:transform 0.2s ease,box-shadow 0.2s ease
}
.enhancement-slider::-webkit-slider-thumb:hover{
    transform:scale(1.1);
    box-shadow:0 4px 12px rgba(196,163,90,0.5)
}
.enhancement-slider::-moz-range-thumb{
    width:22px;height:22px;
    background:linear-gradient(135deg,var(--color-accent) 0%,#d4b366 100%);
    border:none;border-radius:50%;cursor:pointer;
    box-shadow:0 2px 8px rgba(196,163,90,0.4)
}
.enhancement-slider::-moz-range-track{height:8px;background:rgba(0,0,0,0.3);border-radius:4px}
.enhancement-block__marks{display:flex;justify-content:space-between;margin-top:8px;padding:0 2px}
.enhancement-block__marks span{font-size:11px;color:var(--color-text-muted)}
.enhancement-block__bonus{margin-top:14px;padding-top:14px;border-top:1px solid rgba(196,163,90,0.2)}
.enhancement-bonus-item{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:13px}
.enhancement-bonus-item__name{color:var(--color-text-muted)}
.enhancement-bonus-item__value{font-weight:600;color:var(--color-positive)}
.enhancement-bonus-item__value--base{color:var(--color-text)}
.enhancement-block.visible{animation:fadeInSlide 0.3s ease}

@keyframes fadeInSlide{
    from{opacity:0;transform:translateY(-10px)}
    to{opacity:1;transform:translateY(0)}
}

.enhancement-block[data-level="0"] .enhancement-block__value{color:var(--color-text-muted)}
.enhancement-block[data-level="5"] .enhancement-block__value,
.enhancement-block[data-level="6"] .enhancement-block__value,
.enhancement-block[data-level="7"] .enhancement-block__value,
.enhancement-block[data-level="8"] .enhancement-block__value,
.enhancement-block[data-level="9"] .enhancement-block__value{color:#22c55e}
.enhancement-block[data-level="10"] .enhancement-block__value,
.enhancement-block[data-level="11"] .enhancement-block__value,
.enhancement-block[data-level="12"] .enhancement-block__value,
.enhancement-block[data-level="13"] .enhancement-block__value,
.enhancement-block[data-level="14"] .enhancement-block__value{color:#f97316}
.enhancement-block[data-level="15"] .enhancement-block__value{color:#a855f7}
.enhancement-block--high{
    border-color:rgba(249,115,22,0.4);
    background:linear-gradient(135deg,rgba(249,115,22,0.1) 0%,rgba(249,115,22,0.05) 100%)
}
.enhancement-block--max{
    border-color:rgba(168,85,247,0.4);
    background:linear-gradient(135deg,rgba(168,85,247,0.15) 0%,rgba(168,85,247,0.05) 100%);
    animation:maxEnhancementGlow 2s ease-in-out infinite
}
@keyframes maxEnhancementGlow{
    0%,100%{box-shadow:0 0 0 0 rgba(168,85,247,0.2)}
    50%{box-shadow:0 0 20px 0 rgba(168,85,247,0.15)}
}

.stat-enhancement-bonus{font-size:11px;color:var(--color-positive);margin-left:4px;opacity:0.9}

.armor-info,.container-info{margin-top:16px}
.armor-info__placeholder,.container-info__placeholder{
    display:flex;flex-direction:column;align-items:center;gap:12px;
    padding:32px 20px;text-align:center;color:var(--color-text-muted);
    background:rgba(0,0,0,0.2);border-radius:10px;border:1px dashed var(--color-border)
}
.armor-info__placeholder svg,.container-info__placeholder svg{width:48px;height:48px;opacity:0.4}
.armor-info__placeholder span,.container-info__placeholder span{font-size:14px}
.armor-details,.container-details{
    padding:16px;background:rgba(0,0,0,0.2);border-radius:10px;border:1px solid var(--color-border)
}
.armor-details__header,.container-details__header{
    display:flex;align-items:center;justify-content:space-between;
    margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--color-border);gap:12px
}
.armor-details__name,.container-details__name{font-weight:600;font-size:16px;min-width:0;word-break:break-word}
.armor-details__rarity,.container-details__rarity{
    font-size:12px;font-weight:500;padding:4px 10px;border-radius:4px;
    text-transform:uppercase;letter-spacing:0.5px;flex-shrink:0
}

.rarity--common{color:var(--color-rarity-common);background:rgba(16,161,21,0.15)}
.rarity--uncommon{color:var(--color-rarity-uncommon);background:rgba(66,108,231,0.15)}
.rarity--collection{color:var(--color-rarity-collection);background:rgba(229,104,179,0.15)}
.rarity--rare{color:var(--color-rarity-rare);background:rgba(155,21,84,0.15)}
.rarity--unique{color:var(--color-rarity-unique);background:rgba(204,18,55,0.15)}
.rarity--legendary{color:var(--color-rarity-legendary);background:rgba(255,140,0,0.15)}

.armor-details__type,.container-details__type{
    display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--color-text-muted);margin-bottom:12px
}
.armor-details__stats,.container-details__stats{display:flex;flex-direction:column;gap:6px}
.armor-details__stat,.container-details__stat{display:flex;justify-content:space-between;font-size:13px}
.armor-details__stat-name,.container-details__stat-name{color:var(--color-text-muted)}
.armor-details__stat-value,.container-details__stat-value{font-weight:500}
.stat-value--positive{color:var(--color-positive)}
.stat-value--negative{color:var(--color-negative)}
.container-details__shielding{margin-top:12px;padding-top:12px;border-top:1px solid var(--color-border)}
.container-details__shielding-title{
    font-size:12px;color:var(--color-text-muted);margin-bottom:6px;
    text-transform:uppercase;letter-spacing:0.5px
}

.artifact-slots__placeholder{
    display:flex;flex-direction:column;align-items:center;gap:12px;
    padding:40px 20px;text-align:center;color:var(--color-text-muted);
    background:rgba(0,0,0,0.2);border-radius:10px;border:1px dashed var(--color-border)
}
.artifact-slots__placeholder svg{width:48px;height:48px;opacity:0.4}
.artifact-slots__placeholder span{font-size:14px}
.artifact-slots__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.artifact-slot{
    display:flex;align-items:center;gap:14px;padding:14px 16px;
    background:rgba(0,0,0,0.3);border:1px solid var(--color-border);
    border-radius:12px;cursor:pointer;transition:var(--transition)
}
.artifact-slot:hover{background:rgba(0,0,0,0.4);border-color:rgba(255,255,255,0.15)}
.artifact-slot--empty{border-style:dashed}
.artifact-slot--empty:hover{border-color:var(--color-accent)}
.artifact-slot__icon{
    width:52px;height:52px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.05);border-radius:10px;flex-shrink:0
}
.artifact-slot__icon svg{width:24px;height:24px;color:var(--color-text-muted)}
.artifact-slot__icon img{width:44px;height:44px;object-fit:contain}
.artifact-slot__info{flex:1;min-width:0}
.artifact-slot__empty-text{font-size:14px;color:var(--color-text-muted)}
.artifact-slot__name{
    font-weight:500;font-size:15px;margin-bottom:4px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.artifact-slot__category{font-size:12px;color:var(--color-text-muted)}
.artifact-slot__remove{
    width:32px;height:32px;display:flex;align-items:center;justify-content:center;
    background:rgba(248,113,113,0.1);border:none;border-radius:8px;
    color:var(--color-negative);cursor:pointer;opacity:0;transition:var(--transition);flex-shrink:0
}
.artifact-slot:hover .artifact-slot__remove{opacity:1}
.artifact-slot__remove:hover{background:rgba(248,113,113,0.2)}
.artifact-slot__remove svg{width:18px;height:18px}
.artifact-slot:not(.artifact-slot--empty) {cursor: pointer;}
.artifact-slot:not(.artifact-slot--empty):hover {border-color: var(--color-accent);background: rgba(196, 163, 90, 0.08);}

.results-card{
    background:var(--color-bg-card);border:1px solid var(--color-border);
    border-radius:16px;overflow:hidden
}
.results-card__header{
    display:flex;align-items:center;justify-content:space-between;
    padding:18px 20px;background:rgba(0,0,0,0.2);border-bottom:1px solid var(--color-border)
}
.results-card__title{
    font-family:var(--font-heading);font-size:20px;font-weight:500;letter-spacing:1px
}
.results-card__reset{
    width:36px;height:36px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.05);border:1px solid var(--color-border);
    border-radius:8px;color:var(--color-text-muted);cursor:pointer;transition:var(--transition);flex-shrink:0
}
.results-card__reset:hover{
    background:rgba(248,113,113,0.1);border-color:rgba(248,113,113,0.3);color:var(--color-negative)
}
.results-card__reset svg{width:18px;height:18px}

.priority-stats{
    margin:16px;padding:16px;
    background:linear-gradient(135deg,rgba(139,92,246,0.1) 0%,rgba(59,130,246,0.05) 100%);
    border:1px solid rgba(139,92,246,0.2);border-radius:12px
}
.priority-stats__header{
    display:flex;align-items:center;gap:10px;margin-bottom:14px;padding-bottom:10px;
    border-bottom:1px solid rgba(255,255,255,0.1);font-size:14px;font-weight:600;color:var(--color-accent)
}
.priority-stats__header svg{width:18px;height:18px}
.priority-stats__grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.priority-stat{
    display:flex;align-items:center;gap:10px;padding:10px 12px;
    background:rgba(0,0,0,0.3);border-radius:8px;border:1px solid transparent;transition:var(--transition)
}
.priority-stat:last-child:nth-child(odd){grid-column:span 2}
.priority-stat__icon{
    width:36px;height:36px;display:flex;align-items:center;justify-content:center;
    border-radius:8px;flex-shrink:0
}
.priority-stat__icon svg{width:18px;height:18px}
.priority-stat--regeneration .priority-stat__icon{background:rgba(74,222,128,0.15);color:#4ade80}
.priority-stat--bleeding .priority-stat__icon{background:rgba(239,68,68,0.15);color:#ef4444}
.priority-stat--radiation .priority-stat__icon{background:rgba(251,191,36,0.15);color:#fbbf24}
.priority-stat--saturation .priority-stat__icon{background:rgba(251,146,60,0.15);color:#fb923c}
.priority-stat--cold .priority-stat__icon{background:rgba(56,189,248,0.15);color:#38bdf8}
.priority-stat__info{display:flex;flex-direction:column;gap:2px;min-width:0}
.priority-stat__label{font-size:11px;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:0.5px}
.priority-stat__value{font-size:15px;font-weight:600;color:var(--color-text);transition:color 0.3s ease}
.priority-stat__value--positive{color:var(--color-positive)!important}
.priority-stat__value--negative{color:var(--color-negative)!important}
.priority-stat__value--warning{color:#fbbf24!important}
.priority-stat--danger{
    border-color:rgba(248,113,113,0.3);background:rgba(248,113,113,0.1);
    animation:dangerPulse 2s ease-in-out infinite
}
.priority-stat--good{border-color:rgba(74,222,128,0.3);background:rgba(74,222,128,0.05)}
@keyframes dangerPulse{
    0%,100%{box-shadow:0 0 0 0 rgba(248,113,113,0.2)}
    50%{box-shadow:0 0 10px 0 rgba(248,113,113,0.15)}
}

.bullet-resistance{
    margin:16px;padding:18px;
    background:linear-gradient(135deg,rgba(196,163,90,0.1) 0%,rgba(196,163,90,0.05) 100%);
    border:1px solid rgba(196,163,90,0.3);border-radius:12px
}
.bullet-resistance__header{
    display:flex;align-items:center;justify-content:space-between;
    margin-bottom:12px;flex-wrap:wrap;gap:8px
}
.bullet-resistance__title{
    display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--color-accent)
}
.bullet-resistance__title svg{width:20px;height:20px;flex-shrink:0}
.bullet-resistance__values{display:flex;align-items:baseline;gap:8px}
.bullet-resistance__main{font-size:28px;font-weight:700;color:var(--color-text);min-width:50px;text-align:right}
.bullet-resistance__percent{font-size:16px;font-weight:500;color:var(--color-accent);min-width:75px}
.bullet-resistance__bar{height:8px;background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;margin-bottom:10px}
.bullet-resistance__bar-fill{height:100%;border-radius:4px;transition:width 0.3s ease,background 0.3s ease}
.bullet-resistance__bar-fill--high{background:linear-gradient(90deg,#22c55e,#4ade80)}
.bullet-resistance__bar-fill--medium{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.bullet-resistance__bar-fill--low{background:linear-gradient(90deg,#ef4444,#f87171)}
.bullet-resistance__hint{font-size:12px;color:var(--color-text-muted);line-height:1.4}

#warningsContainer{display:flex;flex-direction:column;gap:8px;margin:0 16px}
#warningsContainer:empty{display:none}
.warning-item{
    display:flex;align-items:center;gap:12px;padding:12px 14px;
    border-radius:10px;animation:warningPulse 2s ease-in-out infinite
}
.warning-item--radiation{background:rgba(251,191,36,0.1);border:1px solid rgba(251,191,36,0.3)}
.warning-item--cold{background:rgba(56,189,248,0.1);border:1px solid rgba(56,189,248,0.3)}
.warning-item--bleeding{background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.3)}
.warning-item--regeneration{background:rgba(251,146,60,0.1);border:1px solid rgba(251,146,60,0.3)}
.warning-item--saturation{background:rgba(234,179,8,0.1);border:1px solid rgba(234,179,8,0.3)}
.warning-item__icon{
    width:36px;height:36px;display:flex;align-items:center;justify-content:center;
    border-radius:50%;flex-shrink:0
}
.warning-item--radiation .warning-item__icon{background:rgba(251,191,36,0.2);color:#fbbf24}
.warning-item--cold .warning-item__icon{background:rgba(56,189,248,0.2);color:var(--color-frost)}
.warning-item--bleeding .warning-item__icon{background:rgba(239,68,68,0.2);color:#ef4444}
.warning-item--regeneration .warning-item__icon{background:rgba(251,146,60,0.2);color:#fb923c}
.warning-item--saturation .warning-item__icon{background:rgba(234,179,8,0.2);color:#eab308}
.warning-item__icon svg{width:18px;height:18px}
.warning-item__content{display:flex;flex-direction:column;gap:1px;min-width:0}
.warning-item__title{font-size:13px;font-weight:600}
.warning-item--radiation .warning-item__title{color:#fbbf24}
.warning-item--cold .warning-item__title{color:var(--color-frost)}
.warning-item--bleeding .warning-item__title{color:#ef4444}
.warning-item--regeneration .warning-item__title{color:#fb923c}
.warning-item--saturation .warning-item__title{color:#eab308}
.warning-item__value{font-size:12px;opacity:0.8}
.warning-item--radiation .warning-item__value{color:rgba(251,191,36,0.8)}
.warning-item--cold .warning-item__value{color:rgba(56,189,248,0.8)}
.warning-item--bleeding .warning-item__value{color:rgba(239,68,68,0.8)}
.warning-item--regeneration .warning-item__value{color:rgba(251,146,60,0.8)}
.warning-item--saturation .warning-item__value{color:rgba(234,179,8,0.8)}
@keyframes warningPulse{
    0%,100%{box-shadow:0 0 0 0 rgba(248,113,113,0.2)}
    50%{box-shadow:0 0 12px 0 rgba(248,113,113,0.15)}
}

.stats-groups{padding:16px;display:flex;flex-direction:column;gap:16px}
.stats-group{background:rgba(0,0,0,0.2);border-radius:10px;overflow:hidden}
.stats-group__title{
    display:flex;align-items:center;gap:10px;padding:12px 16px;
    font-size:14px;font-weight:500;color:var(--color-text-muted);
    background:rgba(0,0,0,0.2);border-bottom:1px solid var(--color-border)
}
.stats-group__title svg{width:18px;height:18px;opacity:0.7}
.stats-list{padding:8px 0}
.stat-row{
    display:flex;justify-content:space-between;align-items:center;
    padding:8px 16px;transition:var(--transition)
}
.stat-row:hover{background:rgba(255,255,255,0.02)}
.stat-row__name{font-size:13px;color:var(--color-text-muted)}
.stat-row__value{font-size:14px;font-weight:500;color:var(--color-text);transition:color 0.3s ease}
.stat-row__value--positive{color:var(--color-positive)}
.stat-row__value--negative{color:var(--color-negative)}

.modal{
    position:fixed;top:0;left:0;width:100%;height:100%;
    z-index:2000;display:none;align-items:center;justify-content:center;padding:16px
}
.modal.active{display:flex}
.modal__backdrop{
    position:absolute;top:0;left:0;width:100%;height:100%;
    background:rgba(0,0,0,0.85);backdrop-filter:blur(8px)
}
.modal__container{
    position:relative;width:100%;max-width:900px;max-height:90vh;
    background:linear-gradient(180deg,#1a1a24 0%,#12121a 100%);
    border:1px solid rgba(255,255,255,0.1);border-radius:20px;
    overflow:hidden;display:flex;flex-direction:column;
    box-shadow:0 25px 80px rgba(0,0,0,0.5)
}
.modal__header{
    display:flex;align-items:center;justify-content:space-between;
    padding:20px 24px;background:rgba(0,0,0,0.4);border-bottom:1px solid rgba(255,255,255,0.08)
}
.modal__header-content{display:flex;align-items:center;gap:16px;min-width:0}
.modal__title{
    display:flex;align-items:center;gap:12px;
    font-family:var(--font-heading);font-size:22px;font-weight:500;letter-spacing:1px;color:var(--color-text)
}
.modal__title svg{width:24px;height:24px;color:var(--color-accent);flex-shrink:0}
.modal__slot-info{
    font-size:13px;color:var(--color-text-muted);background:rgba(255,255,255,0.05);
    padding:6px 12px;border-radius:20px;flex-shrink:0
}
.modal__close{
    width:44px;height:44px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);
    border-radius:12px;color:var(--color-text-muted);cursor:pointer;transition:all 0.2s ease;flex-shrink:0
}
.modal__close:hover{background:rgba(248,113,113,0.15);border-color:rgba(248,113,113,0.3);color:var(--color-negative)}
.modal__close svg{width:22px;height:22px}
.modal__toolbar{
    padding:16px 24px;background:rgba(0,0,0,0.2);
    border-bottom:1px solid rgba(255,255,255,0.06);display:flex;flex-direction:column;gap:16px
}
.modal__search-box{
    position:relative;display:flex;align-items:center;
    background:rgba(0,0,0,0.4);border:1px solid rgba(255,255,255,0.1);
    border-radius:12px;padding:0 16px;transition:all 0.2s ease
}
.modal__search-box:focus-within{border-color:var(--color-accent);box-shadow:0 0 0 3px rgba(196,163,90,0.15)}
.modal__search-box svg{width:20px;height:20px;color:var(--color-text-muted);flex-shrink:0}
.modal__search-box input{
    flex:1;padding:14px 12px;background:none;border:none;
    font-family:var(--font-main);font-size:15px;color:var(--color-text);outline:none;min-width:0
}
.modal__search-box input::placeholder{color:var(--color-text-muted)}
.modal__search-clear{
    width:28px;height:28px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.1);border:none;border-radius:6px;
    color:var(--color-text-muted);cursor:pointer;transition:all 0.2s ease;flex-shrink:0
}
.modal__search-clear:hover{background:rgba(248,113,113,0.2);color:var(--color-negative)}
.modal__search-clear svg{width:14px;height:14px}
.modal__categories{
    display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;
    scrollbar-width:none;-ms-overflow-style:none
}
.modal__categories::-webkit-scrollbar{display:none}
.category-tab{
    display:flex;align-items:center;gap:8px;padding:10px 16px;
    background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.08);
    border-radius:10px;color:var(--color-text-muted);font-family:var(--font-main);
    font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s ease;
    white-space:nowrap;flex-shrink:0
}
.category-tab:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);color:var(--color-text)}
.category-tab--active{background:rgba(196,163,90,0.15);border-color:rgba(196,163,90,0.4);color:var(--color-accent)}
.category-tab__icon{display:flex;align-items:center;justify-content:center}
.category-tab__icon svg{width:16px;height:16px}
.category-tab__dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.category-tab__label{font-size:13px}
.modal__results-info{
    padding:12px 24px;background:rgba(0,0,0,0.15);border-bottom:1px solid rgba(255,255,255,0.05)
}
.results-count{font-size:13px;color:var(--color-text-muted)}
.results-count strong{color:var(--color-accent);font-weight:600}
.modal__body{
    flex:1;overflow-y:auto;padding:20px;
    scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) transparent
}
.modal__body::-webkit-scrollbar{width:8px}
.modal__body::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:4px}
.modal__body::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:4px}
.modal__body::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.25)}

.artifacts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.artifact-card{
    background:linear-gradient(135deg,rgba(255,255,255,0.04) 0%,rgba(255,255,255,0.01) 100%);
    border:1px solid rgba(255,255,255,0.08);border-radius:16px;padding:16px;
    cursor:pointer;transition:all 0.25s ease;position:relative;overflow:hidden
}
.artifact-card::before{
    content:'';position:absolute;top:0;left:0;right:0;height:3px;
    background:var(--card-accent,var(--color-accent));opacity:0;transition:opacity 0.2s ease
}
.artifact-card:hover{
    background:linear-gradient(135deg,rgba(255,255,255,0.08) 0%,rgba(255,255,255,0.03) 100%);
    border-color:var(--card-accent,var(--color-accent));transform:translateY(-2px);
    box-shadow:0 8px 30px rgba(0,0,0,0.3)
}
.artifact-card:hover::before{opacity:1}
.artifact-card--gravity{--card-accent:#b8860b}
.artifact-card--chemical{--card-accent:#10b981}
.artifact-card--electric{--card-accent:#3b82f6}
.artifact-card--thermal{--card-accent:#ef4444}
.artifact-card--unique{--card-accent:#a855f7}
.artifact-card--frost{--card-accent:#38bdf8}
.artifact-card__top{display:flex;gap:14px;margin-bottom:14px}
.artifact-card__image-wrapper{
    width:72px;height:72px;flex-shrink:0;background:rgba(0,0,0,0.4);
    border-radius:12px;display:flex;align-items:center;justify-content:center;
    border:1px solid rgba(255,255,255,0.05);overflow:hidden
}
.artifact-card__image{width:56px;height:56px;object-fit:contain;transition:transform 0.3s ease}
.artifact-card:hover .artifact-card__image{transform:scale(1.1)}
.artifact-card__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.artifact-card__name{font-size:16px;font-weight:600;color:var(--color-text);margin-bottom:6px;line-height:1.3}
.artifact-card__meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.artifact-card__tier{
    display:inline-flex;align-items:center;justify-content:center;
    min-width:28px;height:24px;padding:0 8px;font-size:12px;font-weight:700;border-radius:6px
}
.artifact-card__tier--1{background:rgba(156,163,175,0.2);color:#9ca3af}
.artifact-card__tier--2{background:rgba(34,197,94,0.2);color:#22c55e}
.artifact-card__tier--3{background:rgba(249,115,22,0.2);color:#f97316}
.artifact-card__tier--unique{background:rgba(168,85,247,0.2);color:#a855f7}
.artifact-card__category{font-size:12px;color:var(--color-text-muted)}
.artifact-card__price{margin-left:auto;font-size:12px;color:var(--color-accent);font-weight:500}
.artifact-card__divider{
    height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.1),transparent);margin-bottom:14px
}
.artifact-card__stats{display:flex;flex-direction:column;gap:6px}
.artifact-stat-row{display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:4px 0}
.artifact-stat-row__name{
    color:var(--color-text-muted);flex:1;min-width:0;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:12px
}
.artifact-stat-row__value{font-weight:600;white-space:nowrap}
.artifact-stat-row__value--positive{color:var(--color-positive)}
.artifact-stat-row__value--negative{color:var(--color-negative)}
.artifacts-empty{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:60px 20px;text-align:center;grid-column:1 / -1
}
.artifacts-empty__icon{
    width:64px;height:64px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.05);border-radius:50%;margin-bottom:16px
}
.artifacts-empty__icon svg{width:32px;height:32px;color:var(--color-text-muted);opacity:0.5}
.artifacts-empty__title{font-size:16px;font-weight:500;color:var(--color-text);margin-bottom:8px}
.artifacts-empty__text{font-size:14px;color:var(--color-text-muted)}

.custom-dropdown{position:relative;width:100%;z-index:10}
.custom-dropdown.open{z-index:1000}
.custom-dropdown__trigger{
    width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:14px 16px;font-family:var(--font-main);font-size:15px;color:var(--color-text);
    background:rgba(0,0,0,0.3);border:1px solid var(--color-border);border-radius:10px;
    cursor:pointer;transition:var(--transition);text-align:left
}
.custom-dropdown__trigger:hover{border-color:rgba(255,255,255,0.2);background:rgba(0,0,0,0.4)}
.custom-dropdown__trigger:focus{outline:none;border-color:var(--color-accent)}
.custom-dropdown.open .custom-dropdown__trigger{
    border-color:var(--color-accent);border-bottom-left-radius:0;border-bottom-right-radius:0
}
.custom-dropdown__value{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.custom-dropdown__value[data-placeholder]:not(.has-value){color:var(--color-text-muted)}
.custom-dropdown__arrow{
    width:20px;height:20px;color:var(--color-text-muted);transition:transform 0.3s ease;flex-shrink:0
}
.custom-dropdown.open .custom-dropdown__arrow{transform:rotate(180deg)}
.custom-dropdown__menu{
    position:absolute;top:100%;left:0;right:0;max-height:0;overflow:hidden;
    background:rgba(18,18,26,0.98);border:1px solid var(--color-accent);border-top:none;
    border-radius:0 0 10px 10px;z-index:1001;opacity:0;visibility:hidden;
    transition:all 0.3s ease;box-shadow:0 10px 40px rgba(0,0,0,0.5)
}
.custom-dropdown.open .custom-dropdown__menu{max-height:400px;opacity:1;visibility:visible}
.custom-dropdown__search{
    display:flex;align-items:center;gap:10px;padding:12px 14px;
    border-bottom:1px solid var(--color-border);background:rgba(0,0,0,0.2)
}
.custom-dropdown__search svg{width:18px;height:18px;color:var(--color-text-muted);flex-shrink:0}
.custom-dropdown__search input{
    flex:1;background:none;border:none;font-family:var(--font-main);
    font-size:14px;color:var(--color-text);outline:none;min-width:0
}
.custom-dropdown__search input::placeholder{color:var(--color-text-muted)}
.custom-dropdown__clear-wrapper{
    position:sticky;top:0;z-index:10;padding:8px;
    background:rgba(18,18,26,0.98);border-bottom:1px solid var(--color-border)
}
.custom-dropdown__clear{
    display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:10px;margin:0;
    font-family:var(--font-main);font-size:13px;color:var(--color-text-muted);
    background:rgba(248,113,113,0.1);border:1px dashed rgba(248,113,113,0.3);
    border-radius:8px;cursor:pointer;transition:var(--transition)
}
.custom-dropdown__clear:hover{background:rgba(248,113,113,0.15);border-color:rgba(248,113,113,0.5);color:var(--color-negative)}
.custom-dropdown__clear svg{width:16px;height:16px}
.custom-dropdown__list{max-height:340px;overflow-y:auto;padding:8px;padding-bottom:20px}
.custom-dropdown__list::-webkit-scrollbar{width:6px}
.custom-dropdown__list::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:3px}
.custom-dropdown__list::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:3px}
.custom-dropdown__list::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.25)}
.custom-dropdown__group{margin-bottom:8px}
.custom-dropdown__group:last-child{margin-bottom:0;padding-bottom:12px}
.custom-dropdown__group:last-child .custom-dropdown__item:last-child{margin-bottom:12px}
.custom-dropdown__group-title{
    display:flex;align-items:center;gap:8px;padding:8px 12px;
    font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1px;
    color:var(--color-text-muted);border-bottom:1px solid var(--color-border);margin-bottom:4px
}
.custom-dropdown__group-title::before{content:'';width:8px;height:8px;border-radius:2px}
.custom-dropdown__group--legendary .custom-dropdown__group-title{color:var(--color-rarity-legendary)}
.custom-dropdown__group--legendary .custom-dropdown__group-title::before{background:var(--color-rarity-legendary)}
.custom-dropdown__group--unique .custom-dropdown__group-title{color:var(--color-rarity-unique)}
.custom-dropdown__group--unique .custom-dropdown__group-title::before{background:var(--color-rarity-unique)}
.custom-dropdown__group--rare .custom-dropdown__group-title{color:var(--color-rarity-rare)}
.custom-dropdown__group--rare .custom-dropdown__group-title::before{background:var(--color-rarity-rare)}
.custom-dropdown__group--collection .custom-dropdown__group-title{color:var(--color-rarity-collection)}
.custom-dropdown__group--collection .custom-dropdown__group-title::before{background:var(--color-rarity-collection)}
.custom-dropdown__group--uncommon .custom-dropdown__group-title{color:var(--color-rarity-uncommon)}
.custom-dropdown__group--uncommon .custom-dropdown__group-title::before{background:var(--color-rarity-uncommon)}
.custom-dropdown__group--common .custom-dropdown__group-title{color:var(--color-rarity-common)}
.custom-dropdown__group--common .custom-dropdown__group-title::before{background:var(--color-rarity-common)}
.custom-dropdown__item{
    position:relative;display:flex;align-items:center;gap:12px;padding:10px 12px;margin:2px 0;
    border-radius:8px;cursor:pointer;transition:all 0.2s ease;background:transparent;border:2px solid transparent
}
.custom-dropdown__item:hover{background:rgba(255,255,255,0.05)}
.custom-dropdown__item::before{
    content:'';position:absolute;top:-3px;left:-3px;right:-3px;bottom:-3px;
    border:2px solid transparent;border-radius:11px;transition:all 0.2s ease;pointer-events:none
}
.custom-dropdown__item:hover::before{border-color:var(--color-accent);box-shadow:0 0 12px rgba(196,163,90,0.25)}
.custom-dropdown__item--legendary:hover::before{border-color:var(--color-rarity-legendary);box-shadow:0 0 15px rgba(255,140,0,0.3)}
.custom-dropdown__item--unique:hover::before{border-color:var(--color-rarity-unique);box-shadow:0 0 15px rgba(204,18,55,0.3)}
.custom-dropdown__item--rare:hover::before{border-color:var(--color-rarity-rare);box-shadow:0 0 12px rgba(155,21,84,0.25)}
.custom-dropdown__item--collection:hover::before{border-color:var(--color-rarity-collection);box-shadow:0 0 12px rgba(229,104,179,0.25)}
.custom-dropdown__item--uncommon:hover::before{border-color:var(--color-rarity-uncommon);box-shadow:0 0 10px rgba(66,108,231,0.2)}
.custom-dropdown__item--common:hover::before{border-color:var(--color-rarity-common);box-shadow:0 0 10px rgba(16,161,21,0.2)}
.custom-dropdown__item.selected{background:rgba(196,163,90,0.15)}
.custom-dropdown__item-info{flex:1;min-width:0}
.custom-dropdown__item-name{
    font-size:14px;font-weight:500;color:var(--color-text);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px
}
.custom-dropdown__item-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--color-text-muted)}
.custom-dropdown__item-type{display:flex;align-items:center;gap:4px}
.custom-dropdown__item-type svg{width:12px;height:12px}
.custom-dropdown__item-stat{display:flex;align-items:center;gap:4px;color:var(--color-accent);font-weight:500}
.custom-dropdown__item-rarity{
    font-size:10px;font-weight:600;padding:2px 8px;border-radius:4px;
    text-transform:uppercase;letter-spacing:0.5px;flex-shrink:0
}
.custom-dropdown__item--legendary .custom-dropdown__item-rarity{color:var(--color-rarity-legendary);background:rgba(255,140,0,0.15)}
.custom-dropdown__item--unique .custom-dropdown__item-rarity{color:var(--color-rarity-unique);background:rgba(204,18,55,0.15)}
.custom-dropdown__item--rare .custom-dropdown__item-rarity{color:var(--color-rarity-rare);background:rgba(155,21,84,0.15)}
.custom-dropdown__item--collection .custom-dropdown__item-rarity{color:var(--color-rarity-collection);background:rgba(229,104,179,0.15)}
.custom-dropdown__item--uncommon .custom-dropdown__item-rarity{color:var(--color-rarity-uncommon);background:rgba(66,108,231,0.15)}
.custom-dropdown__item--common .custom-dropdown__item-rarity{color:var(--color-rarity-common);background:rgba(16,161,21,0.15)}
.custom-dropdown__empty{
    display:flex;flex-direction:column;align-items:center;gap:8px;
    padding:24px;color:var(--color-text-muted);text-align:center
}
.custom-dropdown__empty svg{width:32px;height:32px;opacity:0.5}
.custom-dropdown--container .custom-dropdown__trigger:focus{border-color:var(--color-electric)}
.custom-dropdown--container.open .custom-dropdown__trigger{border-color:var(--color-electric)}
.custom-dropdown--container.open .custom-dropdown__menu{border-color:var(--color-electric)}
.custom-dropdown__group--standard .custom-dropdown__group-title{color:var(--color-electric)}
.custom-dropdown__group--standard .custom-dropdown__group-title::before{background:var(--color-electric)}
.custom-dropdown__group--bulky .custom-dropdown__group-title{color:var(--color-chemical)}
.custom-dropdown__group--bulky .custom-dropdown__group-title::before{background:var(--color-chemical)}
.custom-dropdown__group--compact .custom-dropdown__group-title{color:#8b5cf6}
.custom-dropdown__group--compact .custom-dropdown__group-title::before{background:#8b5cf6}
.custom-dropdown__group--spacious .custom-dropdown__group-title{color:var(--color-thermal)}
.custom-dropdown__group--spacious .custom-dropdown__group-title::before{background:var(--color-thermal)}
.custom-dropdown__item--standard:hover::before{border-color:var(--color-electric);box-shadow:0 0 12px rgba(59,130,246,0.25)}
.custom-dropdown__item--bulky:hover::before{border-color:var(--color-chemical);box-shadow:0 0 12px rgba(16,185,129,0.25)}
.custom-dropdown__item--compact:hover::before{border-color:#8b5cf6;box-shadow:0 0 12px rgba(139,92,246,0.25)}
.custom-dropdown__item--spacious:hover::before{border-color:var(--color-thermal);box-shadow:0 0 12px rgba(239,68,68,0.25)}
.custom-dropdown__item-slots{
    display:flex;align-items:center;gap:4px;font-size:12px;font-weight:600;
    color:var(--color-accent);background:rgba(196,163,90,0.15);padding:3px 8px;border-radius:6px;flex-shrink:0
}
.custom-dropdown__item-slots svg{width:14px;height:14px}
.custom-dropdown__item-shielding{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--color-positive)}
.custom-dropdown__item-shielding svg{width:12px;height:12px}
.custom-dropdown__item-shielding--none{color:var(--color-text-muted)}
.custom-dropdown__item-type-badge{
    display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:500;
    padding:2px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:0.3px;flex-shrink:0
}
.custom-dropdown__item--standard .custom-dropdown__item-type-badge{color:var(--color-electric);background:rgba(59,130,246,0.15)}
.custom-dropdown__item--bulky .custom-dropdown__item-type-badge{color:var(--color-chemical);background:rgba(16,185,129,0.15)}
.custom-dropdown__item--compact .custom-dropdown__item-type-badge{color:#8b5cf6;background:rgba(139,92,246,0.15)}
.custom-dropdown__item--spacious .custom-dropdown__item-type-badge{color:var(--color-thermal);background:rgba(239,68,68,0.15)}
.custom-dropdown__item-icon{
    width:40px;height:40px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.05);border-radius:8px;flex-shrink:0
}
.custom-dropdown__item-icon svg{width:22px;height:22px;color:var(--color-text-muted)}
.custom-dropdown__item--standard .custom-dropdown__item-icon{background:rgba(59,130,246,0.1)}
.custom-dropdown__item--standard .custom-dropdown__item-icon svg{color:var(--color-electric)}
.custom-dropdown__item--bulky .custom-dropdown__item-icon{background:rgba(16,185,129,0.1)}
.custom-dropdown__item--bulky .custom-dropdown__item-icon svg{color:var(--color-chemical)}
.custom-dropdown__item--compact .custom-dropdown__item-icon{background:rgba(139,92,246,0.1)}
.custom-dropdown__item--compact .custom-dropdown__item-icon svg{color:#8b5cf6}
.custom-dropdown__item--spacious .custom-dropdown__item-icon{background:rgba(239,68,68,0.1)}
.custom-dropdown__item--spacious .custom-dropdown__item-icon svg{color:var(--color-thermal)}
.custom-dropdown__item--with-icon{gap:12px}
.custom-dropdown__item--with-icon .custom-dropdown__item-info{flex:1;min-width:0}
.custom-dropdown__item-meta--extended{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:4px}
.custom-dropdown__item--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}

@media(max-width:1200px){
    .calculator__layout{grid-template-columns:1fr}
    .calculator__results{position:static}
    .priority-stats__grid{grid-template-columns:repeat(3,1fr)}
    .priority-stat:last-child:nth-child(odd){grid-column:auto}
}

@media(max-width:768px){
    .artifact-slots__grid{grid-template-columns:1fr}
    .priority-stats__grid{grid-template-columns:repeat(2,1fr)}
    .modal{padding:0}
    .modal__container{max-width:100%;max-height:100%;border-radius:0;height:100%}
    .modal__header{padding:16px 20px}
    .modal__title{font-size:18px}
    .modal__title svg{display:none}
    .modal__slot-info{display:none}
    .modal__toolbar{padding:12px 16px}
    .modal__search-box{padding:0 12px}
    .modal__search-box input{padding:12px 10px;font-size:14px}
    .category-tab{padding:8px 12px}
    .category-tab__label{font-size:12px}
    .modal__results-info{padding:10px 16px}
    .modal__body{padding:16px}
    .artifacts-grid{grid-template-columns:1fr;gap:12px}
    .artifact-card{padding:14px}
    .artifact-card__image-wrapper{width:64px;height:64px}
    .artifact-card__image{width:48px;height:48px}
    .artifact-card__name{font-size:15px}
    .enhancement-slider{width:calc(100% - 8px);margin:0 4px}
    .enhancement-slider::-webkit-slider-thumb{width:32px;height:32px}
    .enhancement-slider::-moz-range-thumb{width:32px;height:32px}
}

@media(max-width:480px){
    .equipment-card__header{padding:14px 16px}
    .equipment-card__content{padding:16px}
    .stats-groups{padding:12px}
    .stat-row{padding:8px 12px}
    .bullet-resistance__main{font-size:24px}
    .priority-stats{margin:12px;padding:12px}
    .priority-stats__grid{grid-template-columns:1fr}
    .priority-stat:last-child:nth-child(odd){grid-column:auto}
    .enhancement-block{padding:12px}
    .custom-dropdown__item{padding:12px 10px}
    .custom-dropdown__item-name{font-size:13px}
    .custom-dropdown__item-rarity{display:none}
    .modal__close{width:40px;height:40px}
    .category-tab__dot{width:8px;height:8px}
    .artifact-card__top{gap:12px}
    .artifact-card__image-wrapper{width:56px;height:56px}
    .artifact-card__image{width:44px;height:44px}
}

@media(hover:none){
    .artifact-card:hover{transform:none;box-shadow:none}
    .artifact-card:hover .artifact-card__image{transform:none}
    .artifact-slot:not(.artifact-slot--empty) .artifact-slot__remove{opacity:1}
    .artifact-slot:hover{background:rgba(0,0,0,0.3);border-color:var(--color-border)}
    .artifact-slot--empty:hover{border-color:var(--color-border)}
    .artifact-slot:not(.artifact-slot--empty):hover{border-color:var(--color-border);background:rgba(0,0,0,0.3)}
    .artifact-slot:active{background:rgba(0,0,0,0.4);border-color:rgba(255,255,255,0.15)}
    .artifact-slot--empty:active{border-color:var(--color-accent)}
    .artifact-slot:not(.artifact-slot--empty):active{border-color:var(--color-accent);background:rgba(196,163,90,0.08)}
}

:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
:focus:not(:focus-visible){outline:none}
