:root {
    --bg: #000;
    --fg: #fff;
    --fg2: #000;
    --panel: #111;
    --border: #444;
    --glow: #fff;
    --card-min-size: 200px;
    --header-scale: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
}

body {
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 1024px) {
    body {
        background-attachment: scroll;
    }
}

@media (min-aspect-ratio: 21/9) {
    body {
        background-size: 100% auto;
    }
}

@media (max-aspect-ratio: 9/16) {
    body {
        background-size: auto 100%;
    }
}

.stripes,
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    will-change: transform;
    contain: layout style paint;
}

.stripes {
    z-index: 1;
    background:
        repeating-linear-gradient(45deg, transparent 0 30px, #111 30px 60px),
        repeating-linear-gradient(-45deg, transparent 0 40px, #222 40px 80px);
    opacity: .2;
}

.scanlines {
    z-index: 30;
    background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .15) 2px 4px);
    animation: scan 6s linear infinite;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: policeFlash 8s infinite;
    will-change: opacity;
    contain: layout style paint;
}

body::before {
    background: radial-gradient(circle at 20% 50%, rgba(255, 0, 0, .3), transparent 40%);
}

body::after {
    background: radial-gradient(circle at 80% 50%, rgba(0, 100, 255, .3), transparent 40%);
    animation-delay: 4s;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1px 1px;
    background: rgba(0, 0, 0, .98);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 1);
    min-height: 100px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.header-resize-handle {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 10px;
    background: var(--border);
    cursor: ns-resize;
    z-index: 1001;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.header-resize-handle::before {
    content: '⋮⋮⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 10px;
    letter-spacing: 2px;
    pointer-events: none;
}

.header-resize-handle:hover {
    background: var(--fg);
    box-shadow: 0 0 10px var(--fg);
    height: 12px;
}

.header-resize-handle:hover::before {
    color: #000;
}

@media (max-width: 1024px) {
    .header-resize-handle {
        display: none;
    }
}

.neon-title {
    font-size: clamp(0.75rem, 3vw, 1.75rem);

    letter-spacing: clamp(2px, 1vw, 8px);
    font-weight: bold;
    text-transform: uppercase;
    color: transparent;
    background-image:
        linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)),
        repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .1) 2px 4px);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 0 0 10px var(--glow), 0 0 20px var(--glow), 0 0 40px var(--glow);
    text-align: center;
    transition: font-size 0.1s ease, letter-spacing 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.top-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: calc(12px * var(--header-scale));
    margin-top: calc(15px * var(--header-scale));
    padding: calc(10px * var(--header-scale));
}

.tab {
    position: relative;
    padding: calc(8px * var(--header-scale)) calc(20px * var(--header-scale));
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    font-size: calc(0.8rem * var(--header-scale));
    font-weight: 800;
    letter-spacing: calc(2px * var(--header-scale));
    cursor: pointer;
    transition: .3s cubic-bezier(0.23, 1, 0.32, 1);
    transform: skew(-15deg);
    color: #666;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tab span {
    display: inline-block;
    transform: skew(15deg);
}

.tab:hover,
.tab.active {
    color: var(--fg);
    border-color: var(--fg);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px) skew(-15deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--fg);
    box-shadow: 0 0 10px var(--fg);
}

.page-wrapper {
    min-height: 100vh;
    padding: 180px 0 60px;
    display: flex;
    justify-content: center;
}

.content {
    width: 90%;
    max-width: 1400px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-size), 1fr));
    gap: 20px;
    margin-top: 30px;
    overflow: visible;
}

.card {
    position: relative;
    padding: 14px;
    background: linear-gradient(180deg, #151515, #0b0b0b);
    border: 2px solid var(--border);
    border-radius: 0;
    transform: skew(-1deg);
    box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.05);
    transition: .3s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
    backface-visibility: hidden;
    overflow: visible;
}

.card>*,
.card-details>* {
    display: block;
    padding: 8px 0;
    transform: skew(1deg);
}

.card>*+*,
.card-details>*+* {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.card p strong {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.2);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .05), transparent);
    opacity: .4;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) skew(-1deg) scale(1.02);
    border-color: var(--fg);
    box-shadow: 8px 8px 0 var(--fg), 0 0 30px rgba(255, 255, 255, 0.15);
}

.card:hover::after {
    content: "";
    position: absolute;
    inset: -12px;
    z-index: -1;
    background: radial-gradient(circle, rgba(255, 255, 255, .15), transparent 65%);
    animation: pulse 1s infinite;
}

.rarity,
.price-tag {
    position: absolute;
    top: -8px;
    padding: 3px 8px;
    font-size: .65rem;
    font-weight: bold;
    background: #000;
    border: 1px solid;
    border-radius: 0;
    z-index: 10;
    transform: skew(1deg);
}

.rarity {
    right: 6px
}

.price-tag {
    left: 6px;
    color: #0f0;
    border-color: #0f0;
    box-shadow: 0 0 8px #0f0;
    text-shadow: 0 0 5px #0f0
}

.rarity-mission {
    color: #99f;
    border-color: #99f;
    text-shadow: 0 0 10px #99f;
}

.rarity-common {
    color: #999;
    border-color: #999
}

.rarity-uncommon {
    color: #0f0;
    border-color: #0f0;
    text-shadow: 0 0 10px #0f0
}

.rarity-epic {
    color: #c0f;
    border-color: #c0f
}

.rarity-legendary {
    color: #ff0;
    border-color: #ff0;
    text-shadow: 0 0 15px #ff0
}

.rarity-mythic {
    color: #f00;
    border-color: #f00;
    text-shadow: 0 0 10px #f00
}

.rarity-easy {
    color: #0f0;
    border-color: #0f0;
    text-shadow: 0 0 10px #0f0
}

.rarity-medium {
    color: #ff0;
    border-color: #ff0;
    text-shadow: 0 0 15px #ff0
}

.rarity-hard {
    color: #f00;
    border-color: #f00;
    text-shadow: 0 0 10px #f00
}

.rarity-neutral {
    color: #0f0;
    border-color: #0f0;
    text-shadow: 0 0 10px #0f0
}

.rarity-police {
    color: #00f;
    border-color: #00f;
    text-shadow: 0 0 10px #00f
}

.rarity-criminal {
    color: #f00;
    border-color: #f00;
    text-shadow: 0 0 10px #f00
}

.rarity-christmas-limited {
    color: #0f0;
    border-color: #f00
}

h2 {
    margin: 20px 0;
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    letter-spacing: clamp(4px, 2vw, 10px);
    text-shadow: 0 0 10px var(--fg2);
    text-transform: uppercase;
}

.page-disclaimer {
    text-align: center;
    font-style: italic;
    color: #f00;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    margin-bottom: 30px;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sort-buttons {
    text-align: center;
    margin: 15px 0
}

.sort-btn {
    display: inline-block;
    margin: 0 4px 6px;
    padding: 5px 12px;
    background: #000;
    border: 1px solid #666;
    font-size: .8rem;
    cursor: pointer;
    transition: .2s;
    transform: skew(-15deg);
}

.sort-btn:hover,
.sort-btn.active {
    background: #333;
    border-color: var(--fg);
    box-shadow: 0 0 10px var(--fg);
}

.loading {
    padding: 60px 0;
    text-align: center;
    font-size: 1.8rem;
    animation: loading-glitch 1s infinite;
}

.volume-control {
    --fg: #ffffff;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    width: 36px;
    height: 36px;
    background: #000;
    border: 1px solid #444;
    border-radius: 0;
    overflow: hidden;
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1), border-color .3s;
}

.size-slider-control {
    left: auto;
    right: 12px;
}

.low-end-toggle {
    position: fixed;
    top: 56px;
    right: 12px;
    z-index: 9999;
    width: 36px;
    height: 36px;
    background: #000;
    border: 1px solid #444;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    font-size: 1.2rem;
}

.low-end-toggle:hover {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.low-end-toggle.active {
    background: #fff;
    border-color: #fff;
    color: #000;
}

.low-end-toggle .toggle-icon {
    text-shadow: 0 0 5px currentColor;
}

body.low-end-mode .stripes,
body.low-end-mode .scanlines {
    display: none;
}

.bottom-corner-link {
    position: fixed;
    bottom: 20px;
    left: 30px;
    z-index: 1000;
    padding: 4px 8px;
    font-size: .8rem;
    color: var(--fg);
    background: #111;
    border: 1px solid #444;
    text-decoration: none;
    box-shadow: 0 0 5px rgba(255, 255, 255, .1);
    transition: .2s;
    transform: skew(-10deg);
}

.bottom-corner-link:hover {
    background: #222;
    border-color: var(--fg);
}

.views-section {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    background: transparent;
}

.views-wrapper {
    width: 100%;
    max-width: 440px;
}

.views-box {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    transition: all 0.3s ease;
}

.views-box:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.views-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.views-title {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: white;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.views-count {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 0 0 15px #39ff14;
    letter-spacing: 0.1em;
}

.views-subtext {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 10px;
}

body.low-end-mode::before,
body.low-end-mode::after {
    display: none;
}

body.low-end-mode .static {
    display: none;
}

body.low-end-mode .card:hover::after {
    display: none;
}

body.low-end-mode .card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

body.low-end-mode .card:hover {
    transform: translateY(-4px) skew(-1deg);
    box-shadow: 4px 4px 0 var(--fg);
}

body.low-end-mode .tab {
    transition: all 0.2s ease;
}

body.low-end-mode .neon-title {
    text-shadow: 0 0 5px var(--glow);
}

body.low-end-mode .sort-btn {
    transition: all 0.15s ease;
}

.volume-control::before {
    content: '♪';
    flex: 0 0 36px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff !important;
    text-shadow: 0 0 5px #fff;
    pointer-events: none;
}

.size-slider-control::before {
    content: '▤';
}

.volume-control:hover,
.volume-control:focus-within {
    width: 200px;
    border-color: #fff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.volume-control input[type=range] {
    flex: 1 1 auto;
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 0;
    appearance: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
    margin: 0 10px;
}

.volume-control input[type=range]::-webkit-slider-thumb {
    appearance: none;
    height: 14px;
    width: 6px;
    background: #ffffff;
    cursor: pointer;
}

.volume-control input[type=range]::-moz-range-thumb {
    height: 14px;
    width: 6px;
    background: #ffffff;
    cursor: pointer;
    border: none;
}

.volume-control:hover input[type=range],
.volume-control:focus-within input[type=range] {
    opacity: 1;
}

.garage-intro {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    cursor: default;
    transition: opacity 0.5s ease-out .3s;
}

.garage-intro.open {
    opacity: 0;
    pointer-events: none;
}

.garage-door-mover {
    position: absolute;
    inset: 0;
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.68, -0.15, 0.27, 1.15);
    cursor: default;
}

.garage-intro.open .garage-door-mover {
    transform: translateY(-100vh);
}

.garage-door {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column
}

.door-panel {
    flex: 1;
    background: #333;
    background-image:
        linear-gradient(90deg, transparent 0 4%, rgba(255, 255, 255, .05) 5%, transparent 6%),
        linear-gradient(to top, rgba(0, 0, 0, .3), transparent 50%),
        radial-gradient(circle, #444 10%, #333 90%);
    border-bottom: 2px solid #222;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    position: relative;
}



@keyframes policeFlash {
    0% {
        opacity: 0
    }

    10% {
        opacity: 1
    }

    25%,
    50%,
    100% {
        opacity: 0
    }
}

@keyframes scan {
    to {
        transform: translateY(8px)
    }
}

@keyframes pulse {
    50% {
        opacity: .6
    }
}

@keyframes loading-glitch {
    0% {
        opacity: 0;
        transform: none
    }

    20% {
        opacity: 1;
        transform: translate(-2px, 2px)
    }

    40% {
        opacity: .8;
        transform: translate(2px, -2px)
    }

    60% {
        opacity: 1;
        transform: translate(-2px, -2px)
    }

    80% {
        opacity: .6;
        transform: translate(2px, 2px)
    }

    100% {
        opacity: 0;
        transform: none
    }
}

@media(max-width:1024px) {
    .page-wrapper {
        padding-top: 160px
    }
}

@media(max-width:500px) {
    .page-wrapper {
        padding-top: 220px
    }
}

.static {
    position: fixed;
    inset: 0;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: repeat;
    will-change: opacity;
    transition: opacity 0.2s;
}

.home-container {
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
}


.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-bg,
.admin-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    letter-spacing: 0.6em;
    text-transform: uppercase;
    margin: 0 0 30px 0;
    color: white;
    text-shadow: 0 0 10px black, 0 0 20px white, 0 0 40px white, 0 0 80px white;
    animation: flicker 4s infinite alternate;
}

.hero-text {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    opacity: 0.95;
    text-shadow: 0 0 8px white, 0 0 16px white;
    color: white;
    margin-bottom: 40px;
}

.play-btn-container {
    font-size: 1rem;
    letter-spacing: 0.3em;
    opacity: 0.7;
    text-shadow: 0 0 10px white;
    animation: pulse-glow 3s infinite;
}

.play-btn {
    color: white;
    text-shadow: 0 0 20px white;
    font-weight: bold;
    text-decoration: underline;
}

.updates-section {
    padding: 20px;
    display: flex;
    justify-content: center;
    background: transparent;
}

.updates-wrapper {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .updates-wrapper {
        grid-template-columns: 1fr;
    }
}

.updates-box,
.countdown-box {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.updates-header,
.countdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.updates-icon,
.countdown-icon {
    font-size: 1rem;
}

.updates-title,
.countdown-title {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: white;
    margin: 0;
    text-shadow: 0 0 5px white;
}

.countdown-display {
    text-align: center;
    padding: 20px 10px;
}

.countdown-time {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 0 0 10px #39ff14;
    letter-spacing: 0.1em;
}

.countdown-finished {
    font-size: 1.8rem;
    color: #ff3333;
    text-shadow: 0 0 15px #ff3333;
    animation: pulse-glow 2s infinite;
}

.countdown-units {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 0 0 10px #39ff14;
}

.countdown-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.update-row {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.update-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.update-version {
    font-weight: bold;
    font-size: 0.95rem;
}

.update-desc {
    color: #ccc;
    font-size: 0.8rem;
    margin-top: 3px;
}

.admin-section {
    background: transparent;
    padding: 60px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.admin-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.admin-icon-container {
    margin-bottom: 20px;
    opacity: 0.8;
}

.admin-icon {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    filter: grayscale(1) invert(1);
}

.admin-title {
    font-size: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 10px white;
}

.admin-text {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 40px;
    font-family: sans-serif;
}

.staff-grid,
.contributors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.staff-grid {
    margin-bottom: 20px;
}

.staff-card,
.contributor-card {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 280px;
}

.contributor-card {
    max-width: 350px;
}

.staff-card-title {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: white;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.staff-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.staff-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contributor-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.8;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.9;
    }
}

.search-container {
    margin: 0 20px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #444;
    color: #666;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    width: 200px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    transform: skew(-15deg);
    border-radius: 0;
}

.search-input:focus {
    color: var(--fg);
    border-color: var(--fg);
    background: rgba(255, 255, 255, 0.1);
    width: 250px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.search-input::placeholder {
    color: #444;
}

.highlight {
    background-color: rgba(255, 255, 0, 0.3);
    color: #fff;
    padding: 0 2px;
    border-radius: 2px;
}

.hamburger {
    display: none !important;
    flex-direction: column;
    justify-content: space-between;
    width: 45px;
    height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 2000;
    pointer-events: auto !important;
}

.hamburger span {
    width: 100%;
    height: 4px;
    background: var(--fg);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: block;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

@media (max-width: 1024px) {
    .fixed-header {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-top {
        justify-content: space-between;
        padding: 0 15px;
        width: 100%;
    }

    .hamburger {
        display: flex !important;
    }

    .neon-title {
        font-size: 1.8rem;
        letter-spacing: 4px;
        margin: 0 auto;
        transform: translateX(-15px);
    }

    .top-tabs {
        display: none !important;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        border-top: 1px solid var(--border);
        padding: 8px;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
        margin-top: 0;
        z-index: 2000;
        overflow: visible;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .top-tabs.active {
        display: grid !important;
        animation: slideDown 0.3s ease-out forwards;
    }

    .tab {
        text-align: center;
        position: relative;
        padding: 8px 6px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border);
        font-size: 0.6rem;
        font-weight: 800;
        letter-spacing: 1px;
        cursor: pointer;
        transition: .3s cubic-bezier(0.23, 1, 0.32, 1);
        transform: skew(-15deg);
        color: #666;
        overflow: visible;
        box-sizing: border-box;
    }

    .tab span {
        display: inline-block;
        transform: skew(15deg);
    }

    .tab:hover,
    .tab.active {
        color: var(--fg);
        border-color: var(--fg);
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px) skew(-15deg);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    }

    .tab.active::after {
        content: "";
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--fg);
        box-shadow: 0 0 8px var(--fg);
    }

    .settings-header h2 {
        font-size: 16px;
    }


    #sidebar-toggle {
        display: none !important;
    }

    .setting-item:has(#sidebar-toggle) {
        display: none !important;
    }

    .mobile-controls-group {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 8px 5px 5px 5px;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
        margin-top: 8px;
        width: 100%;
        box-sizing: border-box;
        grid-column: 1 / -1;
    }

    .top-tabs .mobile-controls-group .search-container,
    .top-tabs .mobile-controls-group .volume-control,
    .top-tabs .mobile-controls-group .low-end-toggle,
    nav .mobile-controls-group .search-container,
    nav .mobile-controls-group .volume-control,
    nav .mobile-controls-group .low-end-toggle {
        display: flex !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: none !important;
        z-index: auto !important;
        box-sizing: border-box;
    }

    .top-tabs .mobile-controls-group .search-container,
    nav .mobile-controls-group .search-container {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        margin: 0 !important;
        padding: 0;
    }

    .top-tabs .mobile-controls-group .search-input,
    nav .mobile-controls-group .search-input {
        width: 100%;
        max-width: 100%;
        transform: none !important;
        font-size: 0.65rem;
        padding: 5px 8px;
        box-sizing: border-box;
    }

    .top-tabs .mobile-controls-group .volume-control,
    nav .mobile-controls-group .volume-control {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        height: 28px !important;
        border-color: #666;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 4px 8px;
        overflow: hidden !important;
        box-sizing: border-box;
    }

    .top-tabs .mobile-controls-group .volume-control::before,
    nav .mobile-controls-group .volume-control::before {
        flex: 0 0 20px;
        margin-right: 6px;
        font-size: 0.8rem;
    }

    .top-tabs .mobile-controls-group .volume-control input[type=range],
    nav .mobile-controls-group .volume-control input[type=range] {
        opacity: 1 !important;
        flex: 1;
        min-width: 0;
        display: block !important;
        position: static !important;
        margin: 0 5px 0 0 !important;
        height: 4px !important;
    }

    .top-tabs .mobile-controls-group .low-end-toggle,
    nav .mobile-controls-group .low-end-toggle {
        width: 100% !important;
        max-width: 100%;
        height: 32px !important;
        padding: 6px 10px;
        font-size: 0.8rem;
        position: static !important;
        top: auto !important;
        right: auto !important;
        box-sizing: border-box;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(11.5px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-11.5px) rotate(-45deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-details {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    opacity: 1;
    margin-top: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-details.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.card-details-toggle {
    width: 100%;
    padding: 8px 12px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #999;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: uppercase;
    transform: skew(1deg);
}

.card-details-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--fg);
    color: var(--fg);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.card-details-toggle:active {
    transform: skew(1deg) translateY(1px);
}


body.left-sidebar-mode .fixed-header {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: 250px;
    min-height: auto;
    justify-content: flex-start;
    padding: 20px 10px;
    border-bottom: none;
    border-right: 2px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
}




body.left-sidebar-mode .fixed-header {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: 250px;
    min-height: auto;
    justify-content: flex-start;
    padding: 20px 10px;
    border-bottom: none;
    border-right: 2px solid var(--border);
    overflow-y: hidden;

    overflow-x: hidden;
    align-items: center;
    transition: padding 0.1s;
}


body.left-sidebar-mode .fixed-header:hover {
    overflow-y: auto;
}

body.left-sidebar-mode .header-resize-handle {
    display: block;
    right: -8px;

    left: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;

    height: 80px;
    cursor: ew-resize;
    z-index: 2000;

}

body.left-sidebar-mode .header-resize-handle::before {
    content: '⋮\A⋮\A⋮';
    white-space: pre;
    line-height: 8px;
    letter-spacing: 0;
}

body.left-sidebar-mode .header-resize-handle:hover {
    width: 18px;
    height: 80px;
}

body.left-sidebar-mode .neon-title {
    font-size: 1.8rem;

    letter-spacing: 4px;

    margin: 0 0 20px 0;
    padding: 0;
    text-align: center;
    width: 100%;
    overflow: hidden;

    white-space: nowrap;
}

body.left-sidebar-mode .top-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;

    align-items: center;
    gap: 10px;

    margin-top: 10px;
    padding: 10px 0;
    width: 100%;
    flex: 1;
    overflow: hidden;
}


body.left-sidebar-mode .mobile-controls-group {
    display: flex !important;
    width: 100%;
    justify-content: center;
    padding-bottom: 20px;
    margin-top: auto;

    flex-shrink: 0;
}

body.left-sidebar-mode .tab {
    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 calc(5px * var(--sidebar-scale, 1));
    font-size: 0.7rem;
    letter-spacing: calc(1px * var(--sidebar-scale, 1));
    transform: skew(-10deg);
    text-align: center;
    width: 90%;
    margin: 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.left-sidebar-mode .tab span {
    transform: skew(10deg);
}

body.left-sidebar-mode .tab:hover,
body.left-sidebar-mode .tab.active {
    transform: translateY(-2px) skew(-10deg);
}

body.left-sidebar-mode .tab.active::after {
    bottom: -2px;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: 2px;
}

body.left-sidebar-mode .page-wrapper {
    padding: 20px 20px 60px 280px;
}

body.left-sidebar-mode .bottom-corner-link {
    right: 30px;
    left: auto;
}


body.left-sidebar-mode .search-container {
    margin: 0 0 15px 0;
    width: 100%;
    justify-content: center;
    overflow: hidden;
}

body.left-sidebar-mode .search-input {
    width: 80%;
    padding: calc(6px * var(--sidebar-scale, 1)) calc(10px * var(--sidebar-scale, 1));
    font-size: calc(0.75rem * var(--sidebar-scale, 1));
    transform: skew(-10deg);
    text-align: center;
    box-sizing: border-box;
}

body.left-sidebar-mode .search-input:focus {
    width: 85%;
}

.card-details {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.card-details.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 !important;
    border: none !important;
}

.card-details-toggle {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #888;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-details-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fg);
    border-color: var(--fg);
}

body.always-show-more .card-details {
    max-height: 1000px !important;
    opacity: 1 !important;
    padding: 6px 0 !important;
}

body.always-show-more .card-details.collapsed {
    max-height: 1000px !important;
    opacity: 1 !important;
    padding: 6px 0 !important;
}

body.always-show-more .card-details-toggle {
    display: none;
}

.weapon-mods-button {
    position: absolute;
    bottom: -8px;
    right: 6px;
    z-index: 10;
    padding: 3px 8px;
    font-size: .65rem;
    font-weight: bold;
    background: #000;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    transform: skew(1deg);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    text-shadow: none;
    font-family: inherit;
}

.weapon-mods-button:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    text-shadow: none;
}

.weapon-mods-overlay {
    display: none;
    padding: 10px 0;
}

.weapon-mods-overlay.active {
    display: block;
}

.weapon-mods-title {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
    text-align: center;
    transform: skew(1deg);
}

.weapon-mods-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.weapon-mod-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: skew(1deg);
}

.weapon-mod-item:first-child {
    border-top: none;
}

.weapon-mod-name {
    font-weight: bold;
    color: #fff;
}

.weapon-mod-price {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    font-weight: bold;
}

.back-to-weapon-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 12px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    font-family: inherit;
    font-size: .75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    transform: skew(1deg);
}

.back-to-weapon-btn:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
}

/* Hide front content when mods are shown */
.weapon-front-content.hidden {
    display: none;
}

/* Attachment Categories */
.attachment-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.attachment-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: normal;
    color: #fff;
    transition: opacity 0.2s;
    transform: skew(1deg);
    user-select: none;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-transform: none;
}

.attachment-category-header:hover {
    opacity: 0.75;
}

.attachment-chevron {
    font-size: .6rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.attachment-group.open .attachment-chevron {
    transform: rotate(180deg);
}

.attachment-category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.2s ease;
    padding: 0 0 0 8px;
}

.attachment-group.open .attachment-category-items {
    max-height: 400px;
    padding: 0 0 8px 8px;
}

.attachment-category-items .weapon-mod-item {
    font-weight: normal;
    font-size: 1rem;
    letter-spacing: normal;
    opacity: 1;
}

.attachment-category-items .weapon-mod-name {
    font-weight: normal;
    color: #fff;
}