@font-face {
    font-family: 'HL2Trebuc';
    src: url('../font/trebuc.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Yoruka';
    src: url('../font/Yoruka-1j9rL.ttf') format('truetype');
    font-display: swap;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: var(--hl2-theme-font, 'HL2Trebuc', "Tahoma", "Verdana", sans-serif);
    cursor: url('../images/CROWBAR_cursor_small.png') 5 5, auto;
}

button, input, textarea, select {
    font-family: inherit;
    cursor: url('../images/CROWBAR_cursor_small.png') 5 5, auto;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 url('../images/default_theme/background.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    z-index: 0;
}

.bg-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.hl2-menu-container {
    position: relative;
    z-index: 2;
    padding-left: 10%; 
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    box-sizing: border-box;
}

.hl2-volume-control {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hl2-volume-popover {
    position: absolute;
    top: 100%;
    right: 0;
    padding: 12px 12px 8px 12px;
    background: rgba(30,30,30,0.92);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 4px 4px 18px rgba(0,0,0,0.8);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 120;
}

.hl2-volume-control:hover .hl2-volume-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(2px);
}

.hl2-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 140px;
    writing-mode: vertical-rl;
    direction: rtl;
    background: transparent;
    padding: 0;
    margin: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hl2-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(180deg, rgba(255, 200, 90, 1), rgba(255, 157, 0, 1));
    border: 1px solid rgba(0,0,0,0.55);
    border-radius: 3px;
    cursor: pointer;
    box-shadow:
        0 0 0 1px rgba(255,157,0,0.25),
        0 0 10px rgba(255,157,0,0.35);
}

.hl2-volume-slider::-webkit-slider-runnable-track {
    width: 6px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
}

.hl2-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(180deg, rgba(255, 200, 90, 1), rgba(255, 157, 0, 1));
    border: 1px solid rgba(0,0,0,0.55);
    border-radius: 3px;
    cursor: pointer;
    box-shadow:
        0 0 0 1px rgba(255,157,0,0.25),
        0 0 10px rgba(255,157,0,0.35);
}

.hl2-volume-slider::-moz-range-track {
    width: 6px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
}

.hl2-volume-slider::-moz-range-progress {
    width: 6px;
    background: rgba(255, 196, 77, 0.42);
    border-radius: 999px;
}

.hl2-volume-slider:focus {
    outline: none;
}

.hl2-volume-slider::-webkit-slider-thumb:active {
    filter: brightness(1.08);
}

.hl2-volume-value {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.88);
    font-family: inherit;
    user-select: none;
}

html[data-theme="anime"] .hl2-volume-popover {
    border-radius: 12px;
    border: 1px solid rgba(185, 168, 218, 0.35);
    background: linear-gradient(165deg, rgba(62, 54, 82, 0.98), rgba(52, 46, 72, 1));
    box-shadow:
        0 10px 32px rgba(22, 14, 38, 0.58),
        0 0 22px rgba(188, 145, 235, 0.22);
}

html[data-theme="anime"] .hl2-volume-value {
    color: rgba(244, 233, 255, 0.94);
    text-shadow: 0 0 10px rgba(160, 120, 210, 0.22);
}

html[data-theme="alyx"] .hl2-volume-popover {
    border: 1px solid rgba(120, 190, 230, 0.35);
    background: linear-gradient(165deg, rgba(34, 45, 58, 0.96), rgba(28, 38, 50, 0.98));
    box-shadow:
        0 10px 28px rgba(8, 16, 26, 0.52),
        0 0 18px rgba(90, 165, 210, 0.18);
}

html[data-theme="alyx"] .hl2-volume-value {
    color: rgba(204, 236, 250, 0.92);
}

html[data-theme="anime"] .hl2-volume-slider::-webkit-slider-runnable-track,
html[data-theme="anime"] .hl2-volume-slider::-moz-range-track {
    background: rgba(32, 28, 46, 0.72);
    border: 1px solid rgba(175, 158, 210, 0.35);
}

html[data-theme="anime"] .hl2-volume-slider::-webkit-slider-thumb,
html[data-theme="anime"] .hl2-volume-slider::-moz-range-thumb {
    background: linear-gradient(180deg, rgba(238, 212, 255, 1), rgba(200, 165, 235, 1));
    border: 1px solid rgba(22, 14, 38, 0.55);
    box-shadow:
        0 0 0 1px rgba(200, 165, 235, 0.25),
        0 0 12px rgba(160, 120, 210, 0.28);
}

html[data-theme="alyx"] .hl2-volume-slider::-webkit-slider-runnable-track,
html[data-theme="alyx"] .hl2-volume-slider::-moz-range-track {
    background: rgba(26, 38, 50, 0.75);
    border: 1px solid rgba(118, 176, 214, 0.38);
}

html[data-theme="alyx"] .hl2-volume-slider::-webkit-slider-thumb,
html[data-theme="alyx"] .hl2-volume-slider::-moz-range-thumb {
    background: linear-gradient(180deg, rgba(173, 233, 255, 1), rgba(103, 193, 233, 1));
    border: 1px solid rgba(15, 45, 62, 0.7);
    box-shadow:
        0 0 0 1px rgba(100, 175, 220, 0.28),
        0 0 12px rgba(100, 175, 220, 0.24);
}

.hl2-logo-container {
    margin-bottom: 25px;
}

.hl2-logo-image {
    display: block;
    width: min(520px, 80vw);
    height: auto;
    margin: 0;
    opacity: 0.95;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.hl2-logo-text {
    color: #ffffff;
    font-size: 52px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 12px; 
    text-transform: uppercase;
    opacity: 0.95;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.hl2-logo-sub {
    font-size: 26px;
    vertical-align: super;
    margin-left: -5px;
}

.hl2-game-title {
    color: #ffffff;
    font-size: 13px;
    margin: -5px 0 0 4px;
    letter-spacing: 6px;
    font-weight: normal;
    opacity: 0.8;
}

.hl2-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hl2-menu-item {
    display: inline-block;
    color: #bdbebe;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.1s;
    cursor: pointer;
}

.hl2-menu-item:hover {
    color: #ffffff;
}

html[data-theme="anime"] body.hl2-body .hl2-nav .hl2-menu-list {
    gap: 11px;
}

html[data-theme="anime"] body.hl2-body .hl2-nav .hl2-menu-list > li > a.hl2-menu-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: min(408px, 86vw);
    min-height: 54px;
    padding: 14px 40px 14px 44px;
    margin: 0;
    box-sizing: border-box;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(218, 188, 248, 0.42);
    background-color: rgba(42, 34, 62, 0.72);
    background-image:
        linear-gradient(145deg, rgba(255, 252, 255, 0.2) 0%, transparent 45%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, rgba(22, 14, 38, 0.55) 100%),
        url('../images/anime_theme/anime_menu_button_background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%, 100% 100%, cover;
    box-shadow:
        0 8px 28px rgba(14, 8, 28, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        inset 0 0 32px rgba(190, 155, 228, 0.07);
    backdrop-filter: saturate(1.15);
    -webkit-backdrop-filter: saturate(1.15);
    color: rgba(255, 252, 255, 0.98);
    font-weight: 700;
    text-shadow:
        0 1px 3px rgba(10, 6, 22, 0.95),
        0 0 20px rgba(120, 70, 160, 0.35);
    letter-spacing: 0.11em;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        color 0.15s ease;
}

html[data-theme="anime"] body.hl2-body .hl2-nav .hl2-menu-list > li > a.hl2-menu-item:hover {
    color: #ffffff;
    border-color: rgba(238, 212, 255, 0.72);
    box-shadow:
        0 10px 32px rgba(18, 10, 42, 0.58),
        0 0 36px rgba(190, 135, 235, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 0 rgba(255, 255, 255, 0.14) inset;
    transform: translateY(-2px);
}

html[data-theme="anime"] body.hl2-body .hl2-nav .hl2-menu-list > li > a.hl2-menu-item:active {
    transform: translateY(0);
    box-shadow:
        0 4px 16px rgba(14, 8, 28, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.hl2-menu-item-video {
    position: relative;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.25);
    overflow: hidden;
}

.hl2-menu-item-video .hl2-menu-item-label {
    position: relative;
    z-index: 2;
}

.hl2-menu-item-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 140ms ease;
    filter: saturate(1.15) contrast(1.05);
}

.hl2-menu-item-video::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
}

.hl2-menu-item-video:hover {
    border-color: rgba(255,255,255,0.35);
}

.hl2-menu-item-video:hover .hl2-menu-item-video-bg,
.hl2-menu-item-video:focus .hl2-menu-item-video-bg {
    opacity: 0.95;
}

.hl2-menu-spacer {
    height: 15px;
}

.hl2-leaderboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    align-items: stretch;
}

.hl2-leaderboard-actions > a.hl2-btn,
.hl2-leaderboard-actions > button.hl2-btn,
.hl2-leaderboard-actions > .hl2-window-btn {
    flex: 1;
    min-width: min(140px, 100%);
    text-align: center;
    justify-content: center;
}

button.hl2-leaderboard-tab--active {
    border-color: #ff9d00 !important;
    color: #ff9d00 !important;
}

html[data-theme="anime"] button.hl2-leaderboard-tab--active {
    border-color: rgba(215, 185, 245, 0.9) !important;
    color: #f4e9ff !important;
    box-shadow: 0 0 12px rgba(150, 110, 200, 0.22);
}

.hl2-footer-info {
    position: fixed;
    bottom: 40px;
    left: 10%;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

.hl2-value {
    color: rgba(255,255,255,0.7);
    font-weight: bold;
}

.hl2-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
}

.hl2-window {
    background: #4c4c4c;
    border: 1px solid #7a7a7a;
    width: 450px;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.8);
}

.hl2-pipes-game-window {
    width: min(920px, 96vw);
    max-width: 100%;
    box-sizing: border-box;
}

.hl2-pipes-field-shell {
    background: rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px;
    box-sizing: border-box;
}

.hl2-pipe-field-viewport {
    width: 100%;
    box-sizing: border-box;
    min-height: 180px;
    height: min(68vh, calc(100vh - 200px));
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

@supports (height: 100dvh) {
    .hl2-pipe-field-viewport {
        height: min(68vh, calc(100dvh - 200px));
    }
}

.hl2-pipe-field-fit {
    flex-shrink: 0;
    overflow: visible;
    line-height: 0;
}

.hl2-pipe-field-scale {
    transform-origin: top left;
    display: inline-block;
    vertical-align: top;
}

.hl2-pipe-layout {
    position: relative;
    display: inline-block;
    padding-left: 72px;
    padding-right: 72px;
}

.hl2-pipe-terminal {
    position: absolute;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl2-pipe-terminal-start {
    left: 0;
}

.hl2-pipe-terminal-end {
    right: 0;
}

.hl2-pipe-terminal-box {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.38);
    border-radius: 6px;
}

.hl2-pipe-terminal-box-start {
    border: 2px solid rgba(255, 157, 0, 0.82);
    box-shadow: 0 0 12px rgba(255, 157, 0, 0.18);
}

.hl2-pipe-terminal-box-end {
    border: 2px solid rgba(255, 206, 92, 0.82);
    box-shadow: 0 0 12px rgba(255, 206, 92, 0.18);
}

.hl2-pipe-terminal-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#scores-window .hl2-window {
    transform-origin: center center;
    backface-visibility: hidden;
}

#scores-window.hl2-lb-modal--shown .hl2-window {
    animation: hl2-modal-win-y-in 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#scores-window.hl2-lb-modal--closing .hl2-window {
    animation: hl2-modal-win-y-out 0.3s cubic-bezier(0.55, 0.06, 0.68, 0.19) both;
}

@keyframes hl2-modal-win-y-in {
    from {
        opacity: 0;
        transform: scaleY(0.06);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes hl2-modal-win-y-out {
    from {
        opacity: 1;
        transform: scaleY(1);
    }
    to {
        opacity: 0;
        transform: scaleY(0.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    #scores-window.hl2-lb-modal--shown .hl2-window,
    #scores-window.hl2-lb-modal--closing .hl2-window {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.hl2-window-header {
    background: #3d3d3d;
    color: #bdbebe;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 1px solid #2b2b2b;
    text-transform: uppercase;
}

.hl2-window-content {
    padding: 20px;
    color: #fff;
}

.hl2-section-title {
    color: #ff9d00;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

.hl2-comment {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px;
    margin-bottom: 8px;
}

.hl2-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
}

.hl2-comment-author {
    color: #ff9d00;
    font-weight: bold;
}

.hl2-comment-date {
    opacity: 0.6;
}

.hl2-comment-text {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255,255,255,0.85);
    white-space: pre-wrap;
    word-break: break-word;
}

.hl2-textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.hl2-textarea:focus {
    border-color: #ff9d00;
}

.hl2-btn {
    background: #5d5d5d;
    border: 1px solid #2b2b2b;
    color: #fff;
    padding: 7px 15px;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.hl2-btn:hover {
    background: #7a7a7a;
    border-color: #ffffff;
}

.hl2-btn.primary {
    background: #6d6d6d;
    border-color: #999;
}

.hl2-stars {
    display: flex;
    gap: 14px;
    justify-content: center;
    padding: 24px 0 15px 0;
}

.hl2-star {
    width: 120px;
    height: 120px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-image: var(--hl2-star-off, url('../images/default_theme/star_disabled.png'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    user-select: none;
    cursor: pointer;
}

.hl2-star.active {
    background-image: var(--hl2-star-on, url('../images/default_theme/star_enabled.png'));
    filter: drop-shadow(0 0 10px rgba(255,157,0,0.25));
}

.hl2-star.hit {
    animation: hl2-star-hit 180ms ease-out;
}

.hl2-rate-area {
    position: relative;
}

@keyframes hl2-star-hit {
    0% { transform: scale(1); filter: brightness(1); }
    40% { transform: scale(1.18); filter: brightness(1.6); }
    100% { transform: scale(1); filter: brightness(1); }
}

.hl2-hint {
    text-align: center;
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 10px;
}

.hl2-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.hl2-arena-grid-hl2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.hl2-arena-item {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.1s;
}

.hl2-arena-item:hover {
    background: rgba(255,157,0,0.1);
    border-color: #ff9d00;
}

.hl2-arena-size {
    color: #ff9d00;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

.hl2-arena-name {
    color: #bdbebe;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.hl2-window-btn {
    background: #5d5d5d;
    border: 1px solid #2b2b2b;
    color: #fff;
    padding: 6px 20px;
    cursor: pointer;
    font-size: 11px;
}

.hl2-map-select {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 520px;
}

.hl2-map-select.with-sidebar {
    grid-template-columns: 280px 1fr;
}

.hl2-map-sidebar {
    background: rgba(0,0,0,0.25);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 18px 16px;
}

.hl2-map-sidebar-title {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.hl2-map-sidebar-group {
    margin-top: 10px;
}

.hl2-map-sidebar-label {
    color: #ff9d00;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hl2-map-sidebar-item {
    padding: 10px 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.2);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
}

.hl2-map-sidebar-item.active {
    border-color: rgba(255,157,0,0.55);
    background: rgba(255,157,0,0.12);
}

.hl2-map-sidebar-item.disabled {
    opacity: 0.45;
}

.hl2-map-main {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hl2-map-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.hl2-map-card {
    position: relative;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    height: 380px;
    cursor: pointer;
    transition: border-color 120ms ease, transform 120ms ease;
}

.hl2-map-card:hover {
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

.hl2-map-card.selected {
    border-color: rgba(255,157,0,0.85);
    box-shadow:
        0 0 0 1px rgba(255,157,0,0.55),
        0 0 0 2px rgba(255,157,0,0.15);
    transform: translateY(1px) scale(0.99);
}

.hl2-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,157,0,0.18);
    border: 1px solid rgba(255,157,0,0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: rgba(255,255,255,0.95);
    flex: 0 0 auto;
    object-fit: cover;
}

.hl2-userbar {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.30);
    border: 1px solid rgba(255,255,255,0.10);
}

.hl2-userbar:hover {
    border-color: rgba(255,255,255,0.30);
}

.hl2-userbar-name {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hl2-mini-profile {
    position: absolute;
    left: 0;
    right: -220px;
    bottom: calc(100% + 8px);
    background: rgba(30,30,30,0.95);
    border: 1px solid rgba(255,157,0,0.35);
    box-shadow: 4px 4px 18px rgba(0,0,0,0.8);
    padding: 12px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
}

.hl2-mini-profile-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.30;
    pointer-events: none;
}

.hl2-mini-profile > *:not(.hl2-mini-profile-bg) {
    position: relative;
    z-index: 1;
}

.hl2-expbar {
    height: 100%;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.35);
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    box-sizing: border-box;
}

.hl2-expbar-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    min-width: 0;
    background: linear-gradient(90deg, rgba(57, 194, 91, 0.95), rgba(81, 227, 126, 0.95));
    overflow: hidden;
}

.hl2-expbar-fill {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: none;
    opacity: 0.65;
}

.hl2-userbar:hover .hl2-mini-profile {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hl2-mini-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.hl2-mini-profile-level {
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    margin-top: 2px;
}

.hl2-mini-profile-medals {
    margin-top: 8px;
    height: 28px;
    border: 1px dashed rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.25);
    padding: 2px;
    box-sizing: border-box;
}

.hl2-credits-text {
    text-align: center;
}

.hl2-credits-box {
    overflow: hidden;
}

.hl2-credits-roll {
    display: inline-block;
    width: 100%;
    will-change: transform;
    animation: hl2CreditsRoll 18s linear forwards;
}

@keyframes hl2CreditsRoll {
    0% { transform: translateY(120%); }
    100% { transform: translateY(-220%); }
}

.hl2-map-main.custom-edit {
    transform: translateY(18px);
    transition: transform 180ms ease;
}

.hl2-custom-inline {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 160ms ease;
}

.hl2-custom-inline.open {
    max-height: 120px;
    opacity: 1;
}

.hl2-map-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hl2-map-card-art {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.35));
}

.hl2-map-card-art.placeholder {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.55)),
        repeating-linear-gradient(45deg, rgba(255,157,0,0.12) 0, rgba(255,157,0,0.12) 12px, rgba(0,0,0,0.0) 12px, rgba(0,0,0,0.0) 24px);
}

.hl2-map-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 6px 10px;
    font-size: 12px;
    letter-spacing: 1px;
}

.hl2-map-card-name {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.hl2-map-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.hl2-map-go-form {
    display: flex;
    align-items: center;
}

.hl2-map-go {
    min-width: 180px;
    height: 42px;
    background: linear-gradient(90deg, rgba(0,255,110,0.18), rgba(0,255,110,0.38));
    border: 1px solid rgba(0,255,110,0.55);
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    cursor: pointer;
}

.hl2-map-go:hover {
    border-color: rgba(0,255,110,0.9);
    box-shadow: 0 0 14px rgba(0,255,110,0.18);
}

.hl2-map-go-video {
    position: relative;
    overflow: hidden;
}

.hl2-map-go-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 140ms ease;
    filter: saturate(1.15) contrast(1.05);
}

.hl2-map-go-label {
    position: relative;
    z-index: 2;
}

.hl2-map-go-video::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.05));
}

.hl2-map-go-video:hover .hl2-map-go-video-bg,
.hl2-map-go-video:focus .hl2-map-go-video-bg {
    opacity: 0.95;
}

.hl2-calendar-input {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
}

.hl2-calendar-input:focus {
    border-color: #ff9d00;
}

.hl2-eegg-video {
    width: min(980px, 92vw);
    height: auto;
    opacity: 0.75;
    display: block;
    background: #000;
}

.hl2-credits-box {
    max-height: 360px;
    overflow: auto;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 14px;
}

.hl2-credits-text {
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

@media (max-width: 920px) {
    .hl2-map-select {
        grid-template-columns: 1fr;
    }

    .hl2-map-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .hl2-map-card {
        height: 300px;
    }
}

html[data-theme="anime"] .bg-vignette {
    background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 25%, rgba(48, 38, 72, 0.38) 65%, rgba(32, 26, 48, 0.55) 100%);
}

html[data-theme="anime"] .hl2-modal {
    background: rgba(28, 22, 42, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

html[data-theme="anime"] .hl2-window {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(218, 195, 248, 0.55);
    background:
        linear-gradient(145deg, rgba(255, 248, 255, 0.07) 0%, transparent 42%),
        linear-gradient(165deg, rgba(88, 78, 112, 0.98) 0%, rgba(62, 54, 82, 0.99) 52%, rgba(52, 46, 72, 1) 100%);
    box-shadow:
        0 0 0 1px rgba(42, 34, 58, 0.85),
        0 10px 46px rgba(22, 14, 38, 0.58),
        0 0 36px rgba(188, 145, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -2px 12px rgba(28, 20, 48, 0.35);
}

html[data-theme="anime"] .hl2-window::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
    border: 1px solid rgba(240, 218, 255, 0.16);
    box-shadow: inset 0 0 28px rgba(180, 140, 220, 0.06);
}

html[data-theme="anime"] .hl2-window-header {
    position: relative;
    z-index: 3;
    border-radius: 14px 14px 0 0;
    letter-spacing: 0.14em;
    padding-top: 8px;
    padding-bottom: 8px;
    background:
        linear-gradient(180deg, rgba(255, 235, 252, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, rgba(104, 94, 128, 0.96) 0%, rgba(76, 68, 98, 0.97) 100%);
    color: rgba(248, 240, 255, 0.96);
    border-bottom: 1px solid rgba(200, 175, 235, 0.42);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="anime"] .hl2-window-content {
    position: relative;
    z-index: 3;
    border-radius: 0 0 14px 14px;
    color: rgba(248, 244, 255, 0.94);
}

html[data-theme="anime"] .hl2-section-title {
    color: #d8b8ec;
    text-shadow: 0 0 12px rgba(200, 160, 235, 0.22);
}

html[data-theme="anime"] .hl2-comment {
    background: rgba(38, 34, 54, 0.55);
    border: 1px solid rgba(180, 165, 215, 0.22);
}

html[data-theme="anime"] .hl2-comment-author {
    color: #e0c4f4;
}

html[data-theme="anime"] .hl2-textarea {
    background: rgba(32, 28, 46, 0.72);
    border: 1px solid rgba(175, 158, 210, 0.35);
    color: rgba(250, 246, 255, 0.95);
}

html[data-theme="anime"] .hl2-textarea:focus {
    border-color: rgba(210, 175, 238, 0.65);
    box-shadow: 0 0 0 1px rgba(200, 165, 235, 0.15);
}

html[data-theme="anime"] .hl2-btn {
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(92, 84, 118, 0.95) 0%, rgba(68, 62, 92, 0.98) 100%);
    border: 1px solid rgba(165, 148, 198, 0.4);
    color: rgba(246, 242, 255, 0.95);
}

html[data-theme="anime"] .hl2-btn:hover {
    background: linear-gradient(180deg, rgba(108, 98, 132, 0.98) 0%, rgba(82, 74, 108, 0.99) 100%);
    border-color: rgba(210, 185, 238, 0.55);
}

html[data-theme="anime"] .hl2-btn.primary {
    background: linear-gradient(180deg, rgba(118, 92, 148, 0.95) 0%, rgba(92, 72, 122, 0.98) 100%);
    border-color: rgba(200, 175, 235, 0.45);
}

html[data-theme="anime"] .hl2-window-btn {
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(88, 80, 112, 0.95) 0%, rgba(68, 62, 88, 0.98) 100%);
    border: 1px solid rgba(155, 138, 188, 0.38);
    color: rgba(242, 238, 252, 0.92);
}

html[data-theme="anime"] .hl2-window-btn:hover {
    border-color: rgba(215, 190, 242, 0.55);
}

html[data-theme="anime"] .hl2-arena-item {
    background: rgba(38, 34, 54, 0.45);
    border: 1px solid rgba(170, 155, 205, 0.22);
}

html[data-theme="anime"] .hl2-arena-item:hover {
    background: rgba(88, 72, 118, 0.35);
    border-color: rgba(200, 175, 235, 0.45);
}

html[data-theme="anime"] .hl2-arena-size {
    color: #ddb8f0;
}

html[data-theme="anime"] .hl2-arena-name {
    color: rgba(228, 222, 242, 0.82);
}

html[data-theme="anime"] .hl2-map-sidebar {
    background: rgba(34, 30, 48, 0.42);
    border-right: 1px solid rgba(165, 148, 198, 0.22);
}

html[data-theme="anime"] .hl2-map-sidebar-label {
    color: #d4b4ea;
}

html[data-theme="anime"] .hl2-map-sidebar-item {
    border: 1px solid rgba(165, 155, 198, 0.28);
    background: rgba(36, 32, 52, 0.5);
    color: rgba(238, 232, 250, 0.88);
}

html[data-theme="anime"] .hl2-map-sidebar-item.active {
    border-color: rgba(200, 175, 235, 0.55);
    background: rgba(92, 76, 128, 0.38);
}

html[data-theme="anime"] .hl2-map-card {
    border: 2px solid rgba(175, 160, 210, 0.28);
    background: rgba(34, 30, 50, 0.42);
}

html[data-theme="anime"] .hl2-map-card:hover {
    border-color: rgba(210, 188, 240, 0.42);
}

html[data-theme="anime"] .hl2-map-card.selected {
    border-color: rgba(215, 185, 245, 0.72);
    box-shadow:
        0 0 0 1px rgba(200, 170, 235, 0.35),
        0 0 24px rgba(160, 120, 210, 0.22);
}

html[data-theme="anime"] .hl2-map-card-badge {
    background: rgba(42, 36, 62, 0.72);
    border: 1px solid rgba(185, 168, 218, 0.35);
}

html[data-theme="anime"] .hl2-map-card-art.placeholder {
    background:
        linear-gradient(180deg, rgba(255,248,255,0.08), rgba(42, 34, 62, 0.5)),
        repeating-linear-gradient(45deg, rgba(180, 140, 220, 0.1) 0, rgba(180, 140, 220, 0.1) 12px, rgba(0,0,0,0) 12px, rgba(0,0,0,0) 24px);
}

html[data-theme="anime"] .hl2-userbar {
    background: rgba(38, 34, 54, 0.48);
    border: 1px solid rgba(168, 152, 205, 0.28);
}

html[data-theme="anime"] .hl2-userbar:hover {
    border-color: rgba(198, 178, 228, 0.42);
}

html[data-theme="anime"] .hl2-mini-profile {
    background: rgba(48, 42, 68, 0.96);
    border: 1px solid rgba(188, 168, 220, 0.38);
    box-shadow: 8px 12px 28px rgba(22, 16, 38, 0.45);
}

html[data-theme="anime"] .hl2-calendar-input {
    background: rgba(34, 30, 48, 0.72);
    border: 1px solid rgba(172, 155, 208, 0.35);
}

html[data-theme="anime"] .hl2-calendar-input:focus {
    border-color: rgba(208, 182, 238, 0.6);
}

html[data-theme="anime"] .hl2-credits-box {
    background: rgba(36, 32, 52, 0.55);
    border: 1px solid rgba(168, 152, 200, 0.28);
}

html[data-theme="anime"] .hl2-map-go {
    background: linear-gradient(90deg, rgba(120, 92, 168, 0.35), rgba(140, 108, 188, 0.48));
    border: 1px solid rgba(190, 165, 228, 0.55);
    border-radius: 16px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

html[data-theme="anime"] .hl2-map-go:hover {
    border-color: rgba(215, 195, 248, 0.75);
    box-shadow: 0 0 18px rgba(160, 130, 210, 0.28);
}

html[data-theme="anime"] .hl2-star.active {
    filter: drop-shadow(0 0 12px rgba(200, 165, 235, 0.35));
}

html[data-theme="alyx"] .hl2-star.active {
    filter: drop-shadow(0 0 14px rgba(100, 190, 235, 0.42));
}

@media (max-width: 760px) {
    html, body {
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .bg-image {
        background-attachment: scroll !important;
        background-position: center center !important;
    }

    .hl2-menu-container {
        min-height: 100dvh;
        height: auto;
        padding: 82px 18px 86px 18px !important;
        justify-content: flex-start;
        align-items: stretch !important;
    }

    .hl2-logo-container {
        margin-bottom: 20px;
    }

    .hl2-logo-text {
        font-size: clamp(34px, 11vw, 48px);
        letter-spacing: clamp(5px, 2vw, 10px);
    }

    .hl2-game-title {
        font-size: 11px;
        letter-spacing: 3px;
        line-height: 1.4;
    }

    .hl2-menu-list {
        gap: 10px;
    }

    .hl2-menu-item {
        font-size: 15px;
        line-height: 1.25;
        max-width: 100%;
    }

    html[data-theme="anime"] body.hl2-body .hl2-nav .hl2-menu-list > li > a.hl2-menu-item {
        min-width: 0;
        width: 100%;
        min-height: 48px;
        padding: 12px 18px;
        border-radius: 14px;
    }

    .hl2-footer-info {
        left: 18px;
        right: 18px;
        bottom: 18px;
        font-size: 11px;
        max-width: calc(100vw - 120px);
    }

    .hl2-userbar {
        max-width: min(240px, calc(100vw - 130px));
    }

    .hl2-mini-profile {
        left: 0;
        bottom: calc(100% + 10px);
        width: min(300px, calc(100vw - 36px));
    }

    .hl2-modal {
        align-items: flex-start;
        overflow-y: auto;
        padding: 70px 12px 24px 12px;
        box-sizing: border-box;
    }

    .hl2-window,
    .vgui-window {
        width: min(100%, 520px) !important;
        max-width: 100%;
        max-height: calc(100dvh - 96px);
        overflow: hidden;
    }

    .hl2-window-content,
    .vgui-body {
        padding: 14px;
        max-height: calc(100dvh - 148px);
        overflow-y: auto;
        box-sizing: border-box;
    }

    .hl2-btn,
    .hl2-window-btn,
    .vgui-button {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .vgui-footer,
    .hl2-map-footer,
    .hl2-leaderboard-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .vgui-footer > *,
    .hl2-map-footer > *,
    .hl2-leaderboard-actions > * {
        flex: 1 1 100% !important;
    }

    .hl2-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
    }

    .hl2-map-select {
        display: block;
    }

    .hl2-map-main {
        padding: 14px !important;
    }

    .hl2-map-cards {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .hl2-map-card {
        height: 150px;
    }

    .hl2-custom-inline {
        position: static;
        width: 100%;
        margin-top: 12px;
        box-sizing: border-box;
    }

    .hl2-map-go {
        width: 100%;
        min-height: 52px;
    }

    .hl2-volume-popover {
        position: fixed;
        top: 52px;
        right: 12px;
    }

    .hl2-volume-control:focus-within .hl2-volume-popover,
    .hl2-volume-control:hover .hl2-volume-popover {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(2px);
    }

    .hl2-pipes-game-window {
        width: 100% !important;
    }

    .hl2-pipes-game-window .hl2-window-content {
        padding: 10px !important;
    }

    .hl2-pipes-field-shell {
        padding: 8px;
    }

    .hl2-pipe-field-viewport {
        min-height: 220px;
        height: min(58vh, calc(100dvh - 260px));
    }

    .hl2-pipes-game-window .hl2-window-content > div:first-child {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
    }

    .hl2-pipes-game-window .hl2-window-content > div:first-child > div {
        text-align: center;
    }

    .hl2-pipes-game-window .hl2-window-content > div:last-child {
        flex-wrap: wrap;
    }

    .hl2-pipes-game-window .hl2-window-content > div:last-child > .hl2-btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .hl2-menu-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .hl2-logo-text {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .hl2-game-title {
        letter-spacing: 2px;
    }

    .hl2-footer-info {
        max-width: calc(100vw - 105px);
    }

    .hl2-map-card {
        height: 128px;
    }
}

