@font-face {
    font-family: 'BankGothic';
    src: local('BankGothic Md BT'), local('Bank Gothic');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: none;
}

body {
    background-color: #000;
    font-family: Arial, sans-serif;
    color: #ccc;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    /* Hide default cursor to use custom animated one */
}

/* Custom Animated Cursor */
#custom-cursor {
    width: 32px;
    height: 32px;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url('images/cursor0000.png');
    animation: cursor-anim 1.5s step-end infinite;
}

@keyframes cursor-anim {
    0% {
        background-image: url('images/cursor0000.png');
    }

    9.09% {
        background-image: url('images/cursor0001.png');
    }

    18.18% {
        background-image: url('images/cursor0002.png');
    }

    27.27% {
        background-image: url('images/cursor0003.png');
    }

    36.36% {
        background-image: url('images/cursor0004.png');
    }

    45.45% {
        background-image: url('images/cursor0005.png');
    }

    54.54% {
        background-image: url('images/cursor0006.png');
    }

    63.63% {
        background-image: url('images/cursor0007.png');
    }

    72.72% {
        background-image: url('images/cursor0008.png');
    }

    81.81% {
        background-image: url('images/cursor0009.png');
    }

    90.9% {
        background-image: url('images/cursor0010.png');
    }

    100% {
        background-image: url('images/cursor0010.png');
    }
}

.lobby-container {
    width: 800px;
    height: 600px;
    background-color: #131313;
    background-image: url('images/bgtxtr_grd.png');
    background-repeat: repeat;
    background-position: center;
    position: relative;
    border: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.95);
    transform-origin: center center;
    overflow: hidden;
}

/* Scanline/Grid overlay simulation - keep as subtle global effect */
.lobby-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.1;
}

/* Redundant global stripe removed - now using authentic XML-based placements */


.bg-layer {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Top bar background - main_bg_t.png */
.top-bar .bg-layer {
    top: 0;
    height: 100%;
    object-fit: cover;
}

/* Bottom bar background - main_bg_b.png */
.bottom-bar .bg-layer {
    bottom: 0;
    top: auto;
    height: 100%;
    object-fit: cover;
}

/* Header */
.top-bar {
    height: 92px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 10px 10px 10px;
    z-index: 2;
}

/* Header Stripe Overlay (Authentic XML placement) */
.top-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 512px;
    /* Original XML width */
    height: 100%;
    background-image: url('images/stripe.webp');
    background-repeat: no-repeat;
    background-size: 100% auto;
    /* Stretched wide, natural height (zoomed in) */
    opacity: 0.35;
    mix-blend-mode: plus-lighter;
    /* Additive blending */
    pointer-events: none;
    z-index: 1;
}

.logo-container {
    position: absolute;
    top: 10px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo img {
    height: 65px;
}

.logo-subtitle {
    font-size: 13px;
    color: #fff;
    margin-top: -10px;
    margin-left: 4px;
    letter-spacing: 4px;
    font-weight: bold;
    text-shadow: 2px 2px 2px #000;
    opacity: 0.95;
    font-family: 'BankGothic', sans-serif;
}

.top-buttons {
    display: flex;
    justify-content: space-between;
    flex: 1;
    margin-left: 280px;
    margin-right: 10px;
    margin-bottom: 15px;
}

.btn-group {
    display: flex;
    gap: 0px;
}

.btn-group.right-group {
    margin-left: auto;
}

.btn {
    cursor: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: filter 0.1s, transform 0.1s;
    position: relative;
}

.btn:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Authentic GunZ Glow: Green tint applied via code (ZButton.cpp) */
.btn::after {
    content: "";
    position: absolute;
    inset: -2px;
    /* Restored original size */

    /* Use standard background approach which is more reliable */
    background-image: url('images/button_glow.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;

    /* Authentically tint the white glow to Neon Green (#20ff20) 
       Sepia forces colorization, Hue 90deg moves to greener green, Saturate boosts intensity */
    filter: sepia(1) hue-rotate(45deg) saturate(8000%) brightness(1.1);

    pointer-events: none;
    z-index: 10;
    opacity: 0;
    mix-blend-mode: screen;
    /* Ensures it glows nicely on dark backgrounds */
}

@keyframes flash-green {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Triggered by JS on click release */
.btn.anim-flash::after {
    opacity: 1;
    animation: flash-green 0.15s linear 2;
    /* Flash twice quickly */
}



/* Using copied WEBP files */
.shop-btn {
    background-image: url('images/shop_off_kr.webp');
    width: 93px;
    height: 38px;
}

.shop-btn:hover {
    background-image: url('images/shop_on_kr.webp');
}

.inventory-btn {
    background-image: url('images/equip_off_kr.webp');
    width: 100px;
    height: 38px;
}

.inventory-btn:hover {
    background-image: url('images/equip_on_kr.webp');
}

.channels-btn {
    background-image: url('images/channel_off_kr.webp');
    width: 118px;
    height: 38px;
}

.channels-btn:hover {
    background-image: url('images/channel_on_kr.webp');
}

.options-btn {
    background-image: url('images/option_off_kr.webp');
    width: 91px;
    height: 38px;
}

.options-btn:hover {
    background-image: url('images/option_on_kr.webp');
}

/* Channel Info Bar */
.channel-info {
    height: 25px;
    background: url('images/frame_b.png') repeat-x center;
    background-size: auto 200%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 0 15px 45px;
    font-size: 13px;
    color: #fff;
    text-transform: none;
    text-shadow: 1px 1px 1px #000;
    font-family: Arial, sans-serif;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1001;
    /* Above scanline overlay (999) */
}

.channel-info span {
    position: relative;
    z-index: 10;
    /* Topmost */
}

.channel-info::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 600px;
    height: 36px;
    background: url('images/title_bar.webp') no-repeat left center;
    background-size: contain;
    z-index: 5;
    /* Behind text */
}

.channel-info::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;
    height: 64px;
    background: url('images/frame_t.png') repeat-x center top;
    background-size: auto 100%;
    z-index: 2;
    /* Below title_bar */
    pointer-events: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

/* Metallic Frames - decorative border for bottom of main content */

.main-content::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 64px;
    background: url('images/frame_b.png') repeat-x center bottom;
    background-size: auto 100%;
    z-index: 10;
    pointer-events: none;
}

.room-list-container {
    width: 784px;
    height: 192px;
    position: relative;
    margin: 5px auto 0 auto;
    overflow: hidden;
}

.panel-bg {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.room-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 340px 340px;
    grid-template-rows: repeat(4, 36px);
    grid-gap: 4px 34px;
    padding: 18px 23px 8px 35px;
    height: 100%;
}

/* Room Item Stripe Overlay (Authentic XML placement) - Remove since container is handled */
.room-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #808080;
    display: flex;
    align-items: center;
    padding: 0;
    padding-left: 0;
    gap: 0;
    position: relative;
    width: 340px;
    height: 36px;
    overflow: hidden;
}

/* Active room highlight removed as per user request */
.room-item.active {
    border: 1px solid #808080;
}

/* Authentic Room Stripe Overlay - restricted to the room box only */
.room-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('images/stripe.webp');
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
    mix-blend-mode: plus-lighter;
    pointer-events: none;
    z-index: 1;
    /* Above map banner (0), behind text elements (2+) */
}

.room-item.full::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10;
    pointer-events: none;
}

/* Full room text greying */
.room-item.full .room-name,
.room-item.full .level-limit {
    color: #7b7b7b !important;
    text-shadow: 1px 1px 0 #000;
}

.room-item.full {
    background: rgba(0, 0, 0, 0.6);
}

.room-item.full .room-id-box {
    border-right-color: #333;
}

/* Full rooms retain normal icons behind the overlay */
.room-item.full .room-mode-icon,
.room-item.full .room-playing-icon {
    filter: none;
    opacity: 1;
}

/* Room ID Box - contains number and player count */
.room-id-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 100%;
    background: transparent;
    border-right: 0px solid #555;
    position: relative;
    z-index: 2;
    padding: 2px;
}

.room-id-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(to right, #000 25%, transparent);
    z-index: -1;
    pointer-events: none;
}

.room-number {
    color: #88dd00;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    font-family: Arial, sans-serif;
    line-height: 1.1;
}

.room-players {
    font-size: 9px;
    color: #88dd00;
    font-family: Arial, sans-serif;
    line-height: 1.1;
}

.room-players.full {
    color: #88dd00;
    /* Reverted from grey to green */
}

.room-status-icon {
    width: 24px;
    height: 24px;
    background: #333;
    border: 1px solid #555;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-left: 4px;
}

.room-status-icon.skull {
    background: url('images/slot_icon_skull.webp') no-repeat center;
    background-size: 20px 20px;
    border: none;
}

.room-status-icon.book {
    background: url('images/slot_icon_book.webp') no-repeat center;
    background-size: 20px 20px;
    border: none;
}

.room-info {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 100%;
    padding: 0 6px;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.room-name {
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    text-shadow: 1px 1px 1px #000, 0 0 2px #000;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-locked {
    display: none;
    /* Removed from name, handled by .room-item.locked */
}

.room-playing-icon {
    width: 12px;
    height: 12px;
    background: url('images/icon_play.webp') no-repeat center;
    background-size: contain;
    position: absolute;
    bottom: 2px;
    right: 2px;
    z-index: 4;
}

.level-limit {
    font-size: 10px;
    color: #A0C254;
    text-shadow: 1px 1px 0 #000;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
    font-family: Arial, sans-serif;
    margin-right: 4px;
}

/* Room mode icon (assassin, gladiator, berserk, deathmatch, etc) */
.room-mode-icon {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 4px;
    /* Default death mode icon */
    background-image: url('images/death-mode.webp');
}

.room-item.locked .room-mode-icon {
    background-image: url('images/in_key.png');
}

.room-mode-icon.assassin {
    background-image: url('images/Assasin-mode.webp');
}

.room-mode-icon.gladiator {
    background-image: url('images/Gladiator-mode.webp');
}

.room-mode-icon.berserk {
    background-image: url('images/berserk-mode.webp');
}

.room-mode-icon.duel {
    background-image: url('images/duel-mode.webp');
}

.room-mode-icon.quest {
    background-image: url('images/quest-mode.webp');
}

.room-mode-icon.teamdeath {
    background-image: url('images/teamdeath-mode.webp');
}

.map-banner {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-size: cover;
    background-position: center right;
    border: none;
    filter: brightness(1) saturate(0.8);
    z-index: 0;
}

.room-item:hover .map-banner {
    filter: brightness(0.75) saturate(0.9);
}

.map-banner.mansion {
    background-image: url('images/banner_Mansion.webp');
}

.map-banner.prison {
    background-image: url('images/banner_Prison.webp');
}

.map-banner.dungeon {
    background-image: url('images/banner_Dungeon.webp');
}

.map-banner.town {
    background-image: url('images/banner_Town.webp');
}

.map-banner.castle {
    background-image: url('images/banner_Castle.webp');
}

.map-banner.factory {
    background-image: url('images/banner_Factory.webp');
}

.map-banner.station {
    background-image: url('images/banner_Station.webp');
}

.map-banner.ruin {
    background-image: url('images/banner_Ruin.webp');
}


/* Interaction Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background: transparent;
    border-top: 0px solid #333;
    border-bottom: 0px solid #333;
    height: 40px;
    position: relative;
}

.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page {
    width: 14px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
    color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
}

/* Page Numbers 1-6 */
.page[data-page="1"] {
    background-image: url('images/1-off.webp');
}

.page.active[data-page="1"] {
    background-image: url('images/1-on.webp');
}

.page[data-page="2"] {
    background-image: url('images/2-off.webp');
}

.page.active[data-page="2"] {
    background-image: url('images/2-on.webp');
}

.page[data-page="3"] {
    background-image: url('images/3-off.webp');
}

.page.active[data-page="3"] {
    background-image: url('images/3-on.webp');
}

.page[data-page="4"] {
    background-image: url('images/4-off.webp');
}

.page.active[data-page="4"] {
    background-image: url('images/4-on.webp');
}

.page[data-page="5"] {
    background-image: url('images/5-off.webp');
}

.page.active[data-page="5"] {
    background-image: url('images/5-on.webp');
}

.page[data-page="6"] {
    background-image: url('images/6-off.webp');
}

.page.active[data-page="6"] {
    background-image: url('images/6-on.webp');
}

.page-nav {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    cursor: none;
    margin-left: 2px;
}

.page-nav.prev {
    background-image: url('images/left-off.webp');
}

.page-nav.prev:hover {
    background-image: url('images/left-on.webp');
}

.page-nav.next {
    background-image: url('images/right-off.webp');
}

.page-nav.next:hover {
    background-image: url('images/right-on.webp');
}

.main-actions {
    display: flex;
    gap: 5px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.join-btn {
    background-image: url('images/game_join_off.webp');
    width: 100px;
    height: 30px;
}

.join-btn:hover {
    background-image: url('images/game_join_on.webp');
}

.create-btn {
    background-image: url('images/game_create_off.webp');
    width: 100px;
    height: 30px;
}

.create-btn:hover {
    background-image: url('images/game_create_on.webp');
}

.btn.join-btn:hover,
.btn.create-btn:hover,
.btn.playnow-btn:hover {
    filter: brightness(1.1);
}

.playnow-btn {
    background-image: url('images/playnow_off_kr.webp');
    width: 140px;
    height: 30px;
    position: relative;
}

.playnow-btn:hover {
    background-image: url('images/playnow_on_kr.webp');
}


/* Bottom Section */
.bottom-section {
    width: 784px;
    height: 190px;
    position: relative;
    display: flex;
    padding: 12px 6px 6px 6px;
    gap: 0px;
    margin: 0 auto;
    overflow: hidden;
}

/* Bottom Section Area Stripe Overlay (Middle #2) */
.bottom-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('images/stripe.webp');
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.12;
    mix-blend-mode: plus-lighter;
    pointer-events: none;
    z-index: 1;
}


.character-pane {
    width: 150px;
    z-index: 2;
    padding: 15px 15px;
    font-size: 10px;
    color: #cdcdcd;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: Arial, sans-serif;
}

.player-name {
    color: #FF7828;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: bold;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    font-family: Arial, sans-serif;
}

.character-pane p {
    margin: 1px 0;
    line-height: 1.3;
}

/* Bounty (Tournament Currency) Styling */
.bounty-value {}

/* Tournament chat message style */
.tournament-msg {
    color: #FFFF00;
    /* Alert / Highlight */
}

.tournament-msg::before {
    content: "⚔ ";
}

.stats {
    margin-top: 4px;

    padding-top: 4px;
}

.chat-pane {
    flex: 1;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 10px;
    padding: 5px;
}

.chat-output-wrapper {
    flex: 1;
    display: flex;
    gap: 0;
    min-height: 0;
}

.chat-output {
    flex: 1;
    padding: 8px;
    font-size: 10px;
    color: #CDCDCD;
    overflow-y: auto;
    position: relative;
    font-family: Arial, sans-serif;
    background: rgba(0, 0, 0, 0.2);
}

/* Chat Scrollbar - sizes based on GunZ XML (22x22 per button) */
.chat-scrollbar {
    display: none;
    /* Hidden by default, shown via JS when needed */
    flex-direction: column;
    width: 22px;
    background: transparent;
}

.chat-scroll-up {
    width: 22px;
    height: 22px;
    background-image: url('images/scroll-up.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: none;
    flex-shrink: 0;
}

.chat-scroll-up:active {
    background-image: url('images/scroll-up-on.webp');
}

.chat-scroll-end-up {
    width: 22px;
    height: 4px;
    background-image: url('images/scroll-end-up.webp');
    background-size: 22px 4px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.chat-scroll-track {
    flex: 1;
    width: 22px;
    background: #000;
    min-height: 22px;
    position: relative;
    overflow: hidden;
}

.chat-scroll-track-fill {
    position: absolute;
    left: 0;
    width: 22px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.chat-scroll-track-segment {
    width: 22px;
    flex: 1 1 0;
    min-height: 0;
    background-image: url('images/new-scroll-track.webp');
    background-size: 22px auto;
    background-repeat: repeat-y;
    background-position: center;
}

.chat-scroll-thumb {
    width: 22px;
    height: 22px;
    background-image: url('images/new-scroll-middle.webp');
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: center center;
    cursor: none;
    flex-shrink: 0;
}

.chat-scroll-end-down {
    width: 22px;
    height: 4px;
    background-image: url('images/scroll-end-down.webp');
    background-size: 22px 4px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.chat-scroll-down {
    width: 22px;
    height: 22px;
    background-image: url('images/scroll-down.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: none;
    flex-shrink: 0;
}

.chat-scroll-down:active {
    background-image: url('images/scroll-down-on.webp'), url('images/button-frame2.webp');
}

/* Hide default scrollbar on chat output */
.chat-output::-webkit-scrollbar {
    width: 0;
    display: none;
}

.chat-output {
    scrollbar-width: none;
    /* Firefox */
}

.chat-output::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 80px;
    background-size: contain;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

.system-msg {
    color: #00FF00;
}

.chat-clan {
    color: #FF7828;
}

.chat-whisper {
    color: #00F1F1;
}

.chat-tm {
    color: #00F1F1;
    /* TM/Whisper often similar in GunZ */
}

.chat-normal {
    color: #CDCDCD;
}

.chat-red {
    color: #D20000;
}

.chat-blue {
    color: #0000D2;
}

.chat-alert {
    color: #FFFF00;
}

.chat-output p,
.chat-output span {
    margin: 1px 0;
    line-height: 1.3;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.chat-input-box {
    height: 24px;
    margin: 0px 0px 10px 0px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.chat-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 5px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    outline: none;
}

.lobby-list-pane {
    width: 241px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0px 5px 2px 5px;
}

.list-tabs {
    display: block;
    width: 231px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: 0 0;
    cursor: none;
    position: relative;
}

/* Glow effect for list-tabs (same as .btn) */
.list-tabs::after {
    content: "";
    position: absolute;
    inset: -2px;
    background-image: url('images/button_glow.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    filter: sepia(1) hue-rotate(45deg) saturate(8000%) brightness(1.1);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    mix-blend-mode: screen;
}

.list-tabs.anim-flash::after {
    opacity: 1;
    animation: flash-green 0.15s linear 2;
}

/* Show the appropriate full tab strip image based on which tab is active */
.list-tabs.lobby-active {
    background-image: url('images/pltab_lobby_off.webp');
}

.list-tabs.friends-active {
    background-image: url('images/pltab_friends_off.webp');
}

.list-tabs.clan-active {
    background-image: url('images/pltab_clan_off.webp');
}

/* On versions for when clicked */
.list-tabs.lobby-active.pressed {
    background-image: url('images/pltab_lobby_on.webp');
}

.list-tabs.friends-active.pressed {
    background-image: url('images/pltab_friends_on.webp');
}

.list-tabs.clan-active.pressed {
    background-image: url('images/pltab_clan_on.webp');
}

.player-list-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.scroll-arrows {
    display: flex;
    flex-direction: row;
    gap: 0px;
    justify-content: center;
    align-items: center;
    padding: 0px 0px;
    margin-top: auto;
    width: 100%;
}

.scroll-arrow {
    flex: 1;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto;
    cursor: none;
}

.scroll-arrow.up {
    background-image: url('images/pageup_off.webp');
}

.scroll-arrow.up:active,
.scroll-arrow.up.pressed {
    background-image: url('images/pageup_on.webp');
}

.scroll-arrow.down {
    background-image: url('images/pagedown_off.webp');
}

.scroll-arrow.down:active,
.scroll-arrow.down.pressed {
    background-image: url('images/pagedown_on.webp');
}

/* Disable general button hover effects for scroll arrows */
.scroll-arrow.btn:hover {
    filter: none;
    transform: none;
}

.player-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 3px;
}

.player-list::-webkit-scrollbar {
    width: 0px;
}

.player-item {
    font-size: 11px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    padding: 1px 4px;
    gap: 4px;
}

/* Status icon (S, P, G, L) */
.status-icon {
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-size: contain;
}

/* L - Lobby (Green ball) */
.status-icon.l {
    background-image: url('images/icon-l.webp');
}

/* P - Playing (Red ball) */
.status-icon.p {
    background-image: url('images/icon-p.webp');
}

/* G - Game/Guild (Cyan ball) */
.status-icon.g {
    background-image: url('images/icon-g.webp');
}

/* S - Special/Staff (Blue ball) */
.status-icon.s {
    background-image: url('images/icon-s.webp');
}

.lvl {
    width: 5px;
    text-align: right;
    color: #aaa;
    font-size: 10px;
    font-family: Arial, sans-serif;
}

.name {
    margin-left: 3px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    font-family: Arial, sans-serif;
    font-size: 10px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border: 1px solid #222;
}

/* Footer */
.bottom-bar {
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    z-index: 2;
}

.bottom-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 400px;
    height: 100%;
    background: linear-gradient(to right, #000 25%, transparent);
    z-index: 1;
    pointer-events: none;
}

/* Footer Stripe Overlay (Authentic XML placement) */
.bottom-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('images/stripe.webp');
    background-repeat: no-repeat;
    background-size: 100% auto;
    /* Avoid squashing vertically */
    background-position: center;
    opacity: 1;
    mix-blend-mode: plus-lighter;
    /* Match header / original logic */
    pointer-events: none;
    z-index: 1;
}

.bottom-actions {
    display: flex;
    gap: 10px;
    z-index: 2;
    margin-left: auto;
}

.replay-btn {
    background-image: url('images/replay_off_kr.webp');
    width: 80px;
    height: 30px;
    z-index: 2;
}

.replay-btn:hover {
    background-image: url('images/replay_on_kr.webp');
}

.character-btn {
    background-image: url('images/char_off_kr.webp');
    width: 100px;
    height: 30px;
}

.character-btn:hover {
    background-image: url('images/char_on_kr.webp');
}

.btn.replay-btn,
.btn.character-btn,
.btn.logout-btn {

    transition: transform 0.05s;
}

.btn.replay-btn:active,
.btn.character-btn:active,
.btn.logout-btn:active {
    transform: translate(1px, 1px);
}

.logout-btn {
    background-image: url('images/logout_off_kr.webp');
    width: 90px;
    height: 30px;
}

.logout-btn:hover {
    background-image: url('images/logout_on_kr.webp');
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content.gunz-panel {
    width: 400px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid #444;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-header {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #ffd700;
    font-size: 14px;
    font-family: 'BankGothic', Tahoma, sans-serif;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: none;
    padding: 0 5px;
}

.modal-close-btn:hover {
    color: #ff4444;
}

/* Tournament Selection */
.tournament-select {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tournament-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    cursor: none;
    transition: all 0.15s;
}

.tournament-option:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.05);
}

.tournament-option.selected {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.tournament-icon {
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.tournament-icon.blitz-icon {
    background-image: url('images/duel-mode.webp');
}

.tournament-icon.draft-icon {
    background-image: url('images/teamdeath-mode.webp');
}

.tournament-icon.clanwar-icon {
    background-image: url('images/berserk-mode.webp');
}

.tournament-info {
    flex: 1;
}

.tournament-info h3 {
    color: #fff;
    font-size: 12px;
    margin: 0 0 4px 0;
    font-family: Tahoma, sans-serif;
}

.tournament-info p {
    color: #888;
    font-size: 10px;
    margin: 0 0 4px 0;
}

.tournament-cost {
    font-size: 10px;
    color: #ff6b6b;
    font-weight: bold;
}

.tournament-cost.free {
    color: #88dd00;
}

.tournament-cost.premium {
    color: #ff4444;
}

.queue-count {
    text-align: center;
    min-width: 50px;
}

.count-num {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #88dd00;
}

.count-label {
    font-size: 8px;
    color: #666;
    text-transform: uppercase;
}

/* Queue Status Bar */
.queue-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 215, 0, 0.1);
    border-top: 1px solid #ffd700;
    border-bottom: 1px solid #ffd700;
}

.queue-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.queue-status-text {
    flex: 1;
    color: #ffd700;
    font-size: 11px;
}

.queue-time {
    color: #fff;
    font-family: monospace;
    font-size: 12px;
}

/* Modal Actions */
.modal-actions {
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.queue-join-btn {
    background-image: url('images/game_join_off.webp');
    width: 100px;
    height: 30px;
}

.queue-join-btn:hover {
    background-image: url('images/game_join_on.webp');
}

.queue-cancel-btn {
    background: linear-gradient(180deg, #442222 0%, #331111 100%);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 8px 20px;
    font-size: 11px;
    cursor: none;
}

.queue-cancel-btn:hover {
    background: linear-gradient(180deg, #552222 0%, #441111 100%);
}


/* Tournament Room Styling */
.room-item.tournament-match {
    cursor: default;
    pointer-events: none;
}

.room-item.tournament-match .room-number {}

.room-item.tournament-match .room-name {}



/* Status icon for queue (Gold ball) */
.status-icon.q {
    background-image: url('images/icon-l.webp');
    filter: sepia(1) hue-rotate(10deg) saturate(5) brightness(1.2);
}


/* Map Veto Modal */
.veto-panel {
    width: 500px;
}

.veto-match-info {
    color: #888;
    font-size: 11px;
}

.map-grid-veto {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
}

.map-tile {
    position: relative;
    border: 1px solid #333;
    background: #000;
    cursor: none;
    overflow: hidden;
    transition: all 0.2s;
}

.map-tile:hover {
    border-color: #666;
}

.map-tile.banned {
    opacity: 0.4;
    filter: grayscale(1);
}

.map-tile.banned::after {
    content: "BANNED";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    font-weight: bold;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.map-tile.selected-map {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.map-preview {
    width: 100%;
    height: 60px;
    background-size: cover;
    background-position: center;
}

.map-name {
    display: block;
    padding: 6px;
    font-size: 10px;
    text-align: center;
    color: #ccc;
    background: rgba(0, 0, 0, 0.6);
}

.veto-status {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid #444;
}

.veto-turn {
    color: #ffd700;
    font-size: 11px;
    margin-bottom: 8px;
    text-align: center;
}

.veto-timer-bar {
    width: 100%;
    height: 4px;
    background: #222;
    margin-bottom: 5px;
}

.veto-timer-fill {
    height: 100%;
    background: #ffd700;
    width: 100%;
    transition: width 1s linear;
}

.veto-countdown {
    display: block;
    text-align: center;
    color: #fff;
    font-size: 12px;
    font-family: monospace;
}


/* Match Report Modal */
.report-panel {
    width: 420px;
}

.match-summary {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.match-players-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.match-players-display .player-name {
    font-size: 16px;
    font-weight: bold;
}

.match-players-display .you {
    color: #88dd00;
}

.match-players-display .opponent {
    color: #ff6a00;
}

.match-players-display .vs {
    color: #666;
    font-size: 12px;
}

.match-details-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #888;
    font-size: 11px;
}

.match-details-row strong {
    color: #fff;
}

/* Screenshot Upload */
.screenshot-section {
    padding: 15px;
}

.upload-zone {
    border: 2px dashed #444;
    padding: 20px;
    text-align: center;
    cursor: none;
    transition: all 0.2s;
}

.upload-zone:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.02);
}

.upload-zone.dragover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.upload-zone p {
    margin: 5px 0;
    color: #888;
    font-size: 12px;
}

.upload-hint {
    font-size: 10px !important;
    color: #555 !important;
}

.screenshot-preview {
    position: relative;
    max-height: 150px;
    overflow: hidden;
}

.screenshot-preview img {
    width: 100%;
    height: auto;
    border: 1px solid #444;
}

.remove-screenshot {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 24px;
    height: 24px;
    cursor: none;
    font-size: 12px;
}

/* Result Buttons */
.result-buttons {
    display: flex;
    gap: 15px;
    padding: 15px;
    justify-content: center;
}

.result-btn {
    flex: 1;
    max-width: 150px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    cursor: none;
    transition: all 0.15s;
}

.result-btn:hover {
    border-color: #666;
}

.victory-btn.selected {
    border-color: #88dd00;
    box-shadow: 0 0 15px rgba(136, 221, 0, 0.3);
}

.defeat-btn.selected {
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

.result-icon {
    font-size: 24px;
}

.result-btn span:last-child {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Report Status */
.report-status {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
    font-size: 11px;
}

.status-text {
    color: #888;
}

.report-countdown {
    color: #fff;
    font-family: monospace;
}

/* Steam Login Button */
#steam-login-container {
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 4px;
    text-align: center;
}

.steam-login-btn {
    display: inline-block;
    transition: transform 0.1s, filter 0.1s;
    cursor: none;
    /* Keep the custom GunZ cursor */
}

.steam-login-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.steam-login-btn:active {
    transform: scale(0.98);
}

.steam-login-btn img {
    display: block;
    max-width: 154px;
    /* Standard Steam Big Button width */
    height: auto;
    border: 1px solid #555;
    border-radius: 2px;
}