@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Rajdhani:wght@500;700&display=swap');

        :root {
            --cs-orange: #eebc51;
            --cs-blue: #5d79ae;
            --cs-dark: #1b1b1b;
            --cs-darker: #0d1117;
            --cs-text: #e1e1e1;
            --cs-blur: rgba(20, 20, 20, 0.85);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            overflow: hidden;
            background: var(--cs-darker);
            font-family: 'Inter', sans-serif;
            color: var(--cs-text);
        }

        #game-container {
            width: 100vw;
            height: 100vh;
            position: relative;
        }

        canvas {
            display: block;
        }

        #crosshair {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 100;
        }

        .crosshair-line {
            position: absolute;
            background: rgba(0, 255, 0, 0.9);
            box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
        }

        .crosshair-h {
            width: 10px;
            height: 2px;
            top: 50%;
            transform: translateY(-50%);
        }

        .crosshair-v {
            width: 2px;
            height: 10px;
            left: 50%;
            transform: translateX(-50%);
        }

        .crosshair-left { left: -14px; }
        .crosshair-right { right: -14px; }
        .crosshair-top { top: -14px; }
        .crosshair-bottom { bottom: -14px; }

        /* HUD */
        #hud {
            position: fixed;
            bottom: 40px;
            left: 40px;
            right: 40px;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            pointer-events: none;
            z-index: 100;
        }

        /* Health Bar */
        .health-container {
            display: flex;
            align-items: center;
            gap: 15px;
            background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
            padding: 10px 20px;
            border-radius: 4px;
        }

        .health-icon {
            font-size: 24px;
            color: #fff;
            font-weight: bold;
        }

        .health-text {
            font-family: 'Rajdhani', sans-serif;
            font-size: 42px;
            font-weight: 700;
            color: #fff;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
        }

        /* Ammo Display */
        .ammo-container {
            display: flex;
            align-items: baseline;
            gap: 8px;
            background: linear-gradient(-90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
            padding: 10px 20px;
            border-radius: 4px;
        }

        .ammo-current {
            font-family: 'Rajdhani', sans-serif;
            font-size: 48px;
            font-weight: 700;
            color: #fff;
        }

        .ammo-divider {
            font-size: 24px;
            color: rgba(255, 255, 255, 0.5);
        }

        .ammo-reserve {
            font-family: 'Rajdhani', sans-serif;
            font-size: 24px;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.7);
        }

        /* Kill Counter */
        .kills-container {
            position: fixed;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 100;
            background: rgba(0, 0, 0, 0.5);
            padding: 5px 15px;
            border-radius: 4px;
        }

        .kills-icon {
            width: 24px;
            height: 24px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
            background-size: contain;
        }

        .kills-count {
            font-family: 'Rajdhani', sans-serif;
            font-size: 24px;
            font-weight: 700;
            color: #fff;
        }

        /* Hit Marker */
        #hitmarker {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 101;
            opacity: 0;
            transition: opacity 0.1s ease;
        }

        #hitmarker.active {
            opacity: 1;
        }

        .hitmarker-line {
            position: absolute;
            width: 12px;
            height: 2px;
            background: #fff;
            box-shadow: 0 0 2px rgba(0,0,0,0.5);
        }

        .hitmarker-line:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
        .hitmarker-line:nth-child(2) { transform: rotate(-45deg) translate(-6px, 6px); }
        .hitmarker-line:nth-child(3) { transform: rotate(45deg) translate(-6px, -6px); }
        .hitmarker-line:nth-child(4) { transform: rotate(-45deg) translate(6px, -6px); }

        /* Damage Overlay */
        #damage-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            z-index: 99;
            background: radial-gradient(circle, transparent 50%, rgba(255, 0, 0, 0.4) 100%);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        #damage-overlay.active {
            opacity: 1;
        }

        /* Start Screen */
        #start-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/clans/3381077/8942040040040040040040040040040040040040.jpg') no-repeat center center fixed; 
            background-size: cover;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }
        
        #start-screen::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(13, 17, 23, 0.85);
            backdrop-filter: blur(5px);
            z-index: -1;
        }

        .game-title {
            font-family: 'Rajdhani', sans-serif;
            font-size: 84px;
            font-weight: 900;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 4px;
            margin-bottom: 10px;
            font-style: italic;
        }

        .game-subtitle {
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            color: var(--cs-orange);
            letter-spacing: 4px;
            text-transform: uppercase;
            margin-bottom: 40px;
            font-weight: 600;
        }

        /* Room Selection */
        .room-container {
            background: rgba(30, 30, 30, 0.6);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            padding: 0;
            width: 600px;
            margin: 20px auto;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .room-tabs {
            display: flex;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .room-tab {
            flex: 1;
            padding: 15px;
            background: transparent;
            border: none;
            color: #888;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 14px;
            transition: all 0.2s;
        }

        .room-tab:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
        }

        .room-tab.active {
            color: var(--cs-orange);
            border-bottom: 2px solid var(--cs-orange);
            background: rgba(238, 188, 81, 0.1);
        }

        .room-content {
            display: none;
            padding: 20px;
            min-height: 300px;
        }

        .room-content.active {
            display: block;
        }

        .rooms-list {
            max-height: 250px;
            overflow-y: auto;
            margin-bottom: 15px;
        }
        
        .rooms-list::-webkit-scrollbar {
            width: 6px;
        }
        
        .rooms-list::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.2);
        }
        
        .rooms-list::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
        }

        .room-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background: rgba(255, 255, 255, 0.03);
            margin-bottom: 4px;
            border-radius: 2px;
            cursor: pointer;
            transition: background 0.2s;
            border-left: 3px solid transparent;
        }

        .room-item:hover {
            background: rgba(255, 255, 255, 0.08);
            border-left: 3px solid var(--cs-orange);
        }

        .room-name {
            color: #fff;
            font-weight: 600;
            font-size: 15px;
        }

        .room-id {
            color: #888;
            font-size: 12px;
            font-family: monospace;
        }

        .refresh-btn {
            width: 100%;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #ccc;
            border-radius: 2px;
            cursor: pointer;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 12px;
            transition: all 0.2s;
        }

        .refresh-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .start-button {
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(90deg, #2b6e4f, #3a9e70);
            border: none;
            padding: 15px 40px;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.2s ease;
            border-radius: 2px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }

        .start-button:hover {
            background: linear-gradient(90deg, #3a9e70, #4bc28d);
            transform: translateY(-1px);
        }
        
        .start-button.small {
            width: 100%;
            margin-top: 15px;
        }

        .controls-info {
            margin-top: 40px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px 40px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 13px;
            background: rgba(0,0,0,0.4);
            padding: 20px;
            border-radius: 4px;
        }

        .control-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .control-key {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: 4px 8px;
            font-family: monospace;
            font-size: 12px;
            color: #fff;
            min-width: 30px;
            text-align: center;
            border-radius: 2px;
        }

        /* Game Over Screen */
        #game-over {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(13, 17, 23, 0.95);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .game-over-title {
            font-family: 'Rajdhani', sans-serif;
            font-size: 64px;
            font-weight: 900;
            color: #ff4757;
            text-transform: uppercase;
            margin-bottom: 20px;
            font-style: italic;
        }

        .final-score {
            font-family: 'Inter', sans-serif;
            font-size: 20px;
            color: #ccc;
            margin-bottom: 40px;
        }

        .final-kills {
            color: #fff;
            font-weight: 700;
            font-size: 28px;
        }

        /* Settings Menu */
        #settings-menu {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(13, 17, 23, 0.9);
            backdrop-filter: blur(10px);
            display: none;
            z-index: 3000;
            font-family: 'Inter', sans-serif;
        }

        #settings-menu.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .settings-container {
            background: #1e2329;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        .settings-header {
            font-family: 'Rajdhani', sans-serif;
            font-size: 28px;
            font-weight: 700;
            color: #fff;
            margin-bottom: 25px;
            text-transform: uppercase;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 15px;
        }

        .settings-section {
            margin-bottom: 20px;
        }

        .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
        }

        .setting-label {
            font-size: 14px;
            color: #ccc;
            font-weight: 500;
        }

        .setting-control {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .setting-slider {
            width: 150px;
            height: 4px;
            -webkit-appearance: none;
            appearance: none;
            background: #333;
            outline: none;
            border-radius: 2px;
        }

        .setting-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 14px;
            height: 14px;
            background: var(--cs-blue);
            cursor: pointer;
            border-radius: 50%;
        }

        .setting-value {
            font-family: monospace;
            font-size: 13px;
            color: #fff;
            min-width: 50px;
            text-align: right;
        }

        .settings-button {
            width: 100%;
            padding: 12px;
            margin-top: 20px;
            background: #333;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            color: #fff;
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-transform: uppercase;
            transition: all 0.2s;
        }

        .settings-button:hover {
            background: #444;
        }

        /* Login Screen */
        #login-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/clans/3381077/8942040040040040040040040040040040040040.jpg') no-repeat center center fixed;
            background-size: cover;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5000;
            font-family: 'Inter', sans-serif;
        }
        
        #login-screen::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(13, 17, 23, 0.9);
            backdrop-filter: blur(8px);
            z-index: -1;
        }

        #login-screen.hidden {
            display: none;
        }

        .login-container {
            background: rgba(30, 30, 30, 0.8);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            padding: 40px;
            max-width: 450px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
            text-align: center;
        }

        .login-title {
            font-family: 'Rajdhani', sans-serif;
            font-size: 32px;
            font-weight: 700;
            color: #fff;
            margin-bottom: 10px;
            text-transform: uppercase;
            font-style: italic;
        }

        .login-subtitle {
            color: #888;
            font-size: 14px;
            margin-bottom: 30px;
        }

        .login-input-group {
            margin-bottom: 20px;
        }

        .login-label {
            display: block;
            color: #ccc;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 8px;
            text-align: left;
            text-transform: uppercase;
        }

        .login-input {
            width: 100%;
            padding: 12px 15px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            color: #fff;
            font-size: 15px;
            font-family: 'Inter', sans-serif;
            transition: all 0.2s;
        }

        .login-input:focus {
            outline: none;
            border-color: var(--cs-blue);
            background: rgba(0, 0, 0, 0.5);
        }

        .login-button {
            width: 100%;
            padding: 14px;
            background: linear-gradient(90deg, #2b6e4f, #3a9e70);
            border: none;
            border-radius: 2px;
            color: #fff;
            font-family: 'Inter', sans-serif;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.2s;
            margin-top: 10px;
        }

        .login-button:hover {
            background: linear-gradient(90deg, #3a9e70, #4bc28d);
            transform: translateY(-1px);
        }

        .login-status {
            margin-top: 20px;
            padding: 12px;
            border-radius: 2px;
            font-size: 13px;
            display: none;
            text-align: left;
        }

        .login-status.info {
            background: rgba(93, 121, 174, 0.2);
            border-left: 3px solid var(--cs-blue);
            color: #aabce0;
            display: block;
        }

        .login-status.success {
            background: rgba(43, 110, 79, 0.2);
            border-left: 3px solid #3a9e70;
            color: #8fdcb3;
            display: block;
        }

        .login-status.error {
            background: rgba(180, 40, 40, 0.2);
            border-left: 3px solid #d63031;
            color: #ff8a8a;
            display: block;
        }

        .login-help {
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            color: #666;
            font-size: 12px;
        }

        .login-help a {
            color: var(--cs-blue);
            text-decoration: none;
            font-weight: 600;
        }

        .login-help a:hover {
            text-decoration: underline;
        }
    display: none;
}

.room-content.active {
    display: block;
}

.rooms-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.room-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.room-name {
    color: white;
    font-weight: 600;
}

.room-id {
    color: #888;
    font-size: 12px;
}

.refresh-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    border-radius: 8px;
    cursor: pointer;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.start-button.small {
    font-size: 16px;
    padding: 12px 30px;
    margin-top: 10px;
}