body {
    margin: 0px;
    padding: 0px;
    overflow: hidden;
}
.webgl-content * {
    border: 0;
    margin: 0;
    padding: 0;
}

#gameContainer canvas {
    display: block;
    background: #222;
    /*background: url('tunnelRush.jpg') no-repeat center;*/
    /*background-color: black;*/
}

#gameContainer canvas.blur-game {
    pointer-events: none;
    filter: blur(3px);
    opacity: 0.5;
}

.webgl-content {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    /*disable selection in games which select content when dragging mouse*/
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .webgl-content .logo,
    .progress,
    .text {
        position: absolute;
        left: 50%;
        top: 40%;
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
    }

    .webgl-content .logo {
        background: url('logo.png') no-repeat center / contain;
        width: 500px;
        height: 155px;
    }

    .webgl-content .progress {
        height: 26px;
        width: 211px;
        margin-top: 120px;
    }

        .webgl-content .progress .empty {
            background: url('progressEmpty.Light.png') no-repeat right / cover;
            float: right;
            width: 100%;
            height: 100%;
            display: inline-block;
        }

        .webgl-content .progress .full {
            background: url('progressFull.Light.png') no-repeat left / cover;
            float: left;
            width: 0%;
            height: 100%;
            display: inline-block;
        }

    .webgl-content .text {
        margin-top: 170px;
        /*color: blueviolet;*/
        color: white;
        font-family: 'Times New Roman', Times, serif, Haettenschweiler, 'Arial Narrow Bold', sans-serif, Helvetica, Verdana, sans-serif;
        font-weight: 700;
        font-size: 25px;
        width: 500px;
        text-align: center;
    }

    .webgl-content .spinner {
        vertical-align: middle;
        height: 100px;
    }

    .webgl-content .logo.Dark {
        //background-image: url('logo.png');
    }

    .webgl-content .progress.Dark .empty {
        background: white;
    }

    .webgl-content .progress.Dark .full {
        background: royalblue;
    }

    .webgl-content .footer {
        margin-top: 5px;
        height: 38px;
        line-height: 38px;
        font-family: Helvetica, Verdana, Arial, sans-serif;
        font-size: 18px;
        background: #fff;
    }

        .webgl-content .footer .webgl-logo,
        .title,
        .fullscreen {
            height: 100%;
            display: inline-block;
            background: transparent center no-repeat;
        }

        .webgl-content .footer .webgl-logo {
            background-image: url('webgl-logo.png');
            width: 204px;
            float: left;
        }

        .webgl-content .footer .title {
            margin-right: 10px;
            float: right;
        }

        .webgl-content .footer .fullscreen {
            background-image: url('fullscreen.png');
            width: 38px;
            float: right;
        }

/* Leaderboard Styles */
.leaderboard-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.manual-score-btn {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
    transition: all 0.3s ease;
}

.leaderboard-btn:hover,
.manual-score-btn:hover,
.scan-score-btn:hover,
.remove-scores-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.scan-score-btn {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
    transition: all 0.3s ease;
}

.remove-scores-btn {
    position: fixed;
    top: 140px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: block;
}

.modal.active ~ .webgl-content {
    pointer-events: none !important;
}

#welcomeModal {
    z-index: 99999 !important;
}

#welcomeModal.active ~ .webgl-content,
#welcomeModal.active ~ .webgl-content * {
    pointer-events: none !important;
}

.modal.active ~ .webgl-content * {
    pointer-events: none !important;
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: white;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-modal {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%) !important;
    color: #000 !important;
    text-align: center;
    max-width: 400px;
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}

.welcome-modal h2 {
    color: #000;
    margin-bottom: 10px;
}

.welcome-modal p {
    color: #222;
}

.welcome-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border-radius: 10px;
    border: 3px solid #000;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    box-sizing: border-box;
    font-weight: bold;
    pointer-events: auto;
    cursor: text;
    position: relative;
    z-index: 10002;
}

.welcome-input::placeholder {
    color: #666;
}

.welcome-input:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: white;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.leaderboard-header h2 {
    margin-bottom: 10px;
}

.leaderboard-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
}

.status-badge.online {
    background: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.status-badge.offline {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.player-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    color: white;
    border-bottom-color: #667eea;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.leaderboard-entry {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.leaderboard-entry.rank-1 {
    border-left-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-entry.rank-2 {
    border-left-color: #C0C0C0;
    background: rgba(192, 192, 192, 0.2);
}

.leaderboard-entry.rank-3 {
    border-left-color: #CD7F32;
    background: rgba(205, 127, 50, 0.2);
}

.rank {
    font-size: 24px;
    font-weight: bold;
    min-width: 40px;
}

.player-name {
    flex-grow: 1;
    margin: 0 15px;
    font-size: 18px;
}

.player-info {
    flex-grow: 1;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-info .player-name {
    margin: 0;
    font-size: 18px;
}

.player-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.delete-score-btn {
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    margin-left: 10px;
}

.delete-score-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

.score {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
}

.clear-btn,
.submit-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.clear-btn:hover,
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

#playerName {
    width: calc(100% - 24px);
    padding: 12px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    pointer-events: auto;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    z-index: 10000;
    position: relative;
}

#playerName:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10000;
}

#playerName::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#currentScore {
    font-size: 32px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-list::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Active Players Badge */
.active-players-badge {
    position: fixed;
    top: 100px;
    left: 20px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #000;
    padding: 12px 18px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.2);
    z-index: 1000;
    animation: pulse-glow 2s ease-in-out infinite;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.active-players-badge #activePlayers {
    display: inline-block;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 255, 136, 0.6), 0 0 30px rgba(0, 255, 136, 0.4);
        transform: scale(1.05);
    }
}

/* Active Players Dropdown */
.active-players-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 15px;
    min-width: 250px;
    max-width: 300px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.active-players-badge:hover .active-players-dropdown,
.active-players-dropdown.show {
    display: block;
}

.dropdown-header {
    color: #00ff88;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

.players-list-content {
    color: #fff;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
}

.player-item {
    padding: 8px 10px;
    margin: 4px 0;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    border-left: 3px solid #00ff88;
    font-weight: normal;
}

.player-item:hover {
    background: rgba(0, 255, 136, 0.2);
}

.players-list-content::-webkit-scrollbar {
    width: 6px;
}

.players-list-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.players-list-content::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

.players-list-content::-webkit-scrollbar-thumb:hover {
    background: #00cc66;
}

/* Chat styles removed */