@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    color: #fff;
    background: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
                linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    background-color: #f0f0f0;
}

.button-bar {
    width: 100%;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.nav-button {
    display: inline-block;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 12px;
    background-color: #666;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.nav-button#homeButton {
    background-color: #00aaff;
}

.nav-button#homeButton:hover {
    background-color: #0088cc;
}

.nav-button#profileButton {
    background-color: #00cc00;
}

.nav-button#profileButton:hover {
    background-color: #009900;
}

.nav-button.admin-button {
    background-color: #ff3333;
}

.nav-button.admin-button:hover {
    background-color: #cc0000;
}

.nav-button[href$="logout"] {
    background-color: #ffaa00;
}

.nav-button[href$="logout"]:hover {
    background-color: #cc8800;
}

.nav-button#toggleSidebar {
    background-color: #aa00ff;
}

.nav-button#toggleSidebar:hover {
    background-color: #8800cc;
}

.nav-button#luckButton {
    background-color: #ff00ff;
}

.nav-button#luckButton:hover {
    background-color: #cc00cc;
}

.nav-button:active {
    background-color: #444;
}

.pixel-points-counter {
    position: absolute;
    right: 10px;
    padding: 6px 12px;
    background-color: #ffcc00;
    color: #000;
    font-size: 12px;
    border: 2px solid #000;
    border-radius: 0;
    box-shadow: none;
}

.main-content {
    margin-top: 50px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 50px);
    position: relative;
    background: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
                linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    position: relative;
}

#pixelCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    image-rendering: pixelated;
    object-fit: contain;
    background: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
                linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    background-color: #f0f0f0;
}

#pixelCanvas {
    touch-action: none;
}

.coordinates-display {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    padding: 4px 8px;
    border: 2px solid #fff;
    font-size: 10px;
    color: #fff;
    margin-bottom: 5px;
    z-index: 201;
}

#timelapseControls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #333;
    padding: 10px;
    border: 2px solid #000;
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 199;
}

.timelapse-time-display {
    font-size: 12px;
    color: #fff;
    background-color: #666;
    padding: 4px 8px;
    border: 2px solid #000;
}

.timelapse-sliders {
    display: flex;
    gap: 10px;
    align-items: center;
}

.timelapse-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.timelapse-slider-label {
    font-size: 10px;
    color: #fff;
}

.timelapse-slider {
    width: 80px;
    height: 12px;
    background: #666;
    border: 2px solid #000;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.timelapse-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    background: #00aaff;
    border: 2px solid #000;
    cursor: pointer;
}

.timelapse-date-select {
    padding: 4px;
    font-size: 10px;
    border: 2px solid #000;
    background-color: #666;
    color: #fff;
    cursor: pointer;
    width: 120px;
}

.controls {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background-color: #333;
    padding: 8px;
    border: 2px solid #000;
    z-index: 200;
    flex-wrap: wrap;
}

.pixel-counter {
    font-size: 16px;
    color: #fff;
    width: 70px;
    text-align: center;
    background-color: #ff3333;
    border: 2px solid #000;
    padding: 4px;
}

#colorPicker {
    width: 40px;
    height: 40px;
    border: 2px solid #000;
    padding: 0;
    cursor: pointer;
    background: none;
}

.progress-bar {
    width: 80px;
    height: 8px;
    background-color: #666;
    border: 2px solid #000;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: #00cc00;
    transition: width 0.5s linear, background-color 0.5s linear;
}

.center-btn, .photo-btn, .sketch-btn, .cancel-btn, .track-btn {
    padding: 8px 16px;
    color: #fff;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
}

.center-btn {
    background-color: #ffaa00;
}

.center-btn:hover {
    background-color: #cc8800;
}

.photo-btn {
    background-color: #aa00ff;
}

.photo-btn:disabled {
    background-color: #666;
}

.photo-btn:hover:not(:disabled) {
    background-color: #8800cc;
}

.sketch-btn {
    background-color: #00cc00;
}

.sketch-btn:disabled {
    background-color: #666;
}

.sketch-btn:hover:not(:disabled) {
    background-color: #009900;
}

.cancel-btn {
    background-color: #ff3333;
}

.cancel-btn:hover {
    background-color: #cc0000;
}

.track-btn {
    background-color: #00aaff;
}

.track-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.track-btn:hover:not(:disabled) {
    background-color: #0088cc;
}

.tracked-username {
    font-size: 14px;
    color: #fff;
    margin-left: 8px;
}

.top-players {
    width: 350px;
    max-width: 90%;
    background-color: #333;
    border: 2px solid #000;
    padding: 16px;
    height: fit-content;
    position: fixed;
    top: 60px;
    right: 0px;
    transition: transform 0.3s ease;
    z-index: 99;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.top-players.hidden {
    transform: translateX(100%);
}

.top-players h3 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 8px 0;
}

.top-players-table {
    width: 100%;
    border-collapse: collapse;
}

.top-players-table th,
.top-players-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #000;
    font-size: 14px;
}

.top-players-table th {
    background-color: #00cc00;
    color: #fff;
}

.top-players-table tr.current-user {
    background-color: #00a0ff;
}

.user-rank {
    margin-top: 10px;
    font-size: 14px;
    color: #fff;
}

.user-rank p {
    margin: 4px 0;
    background: crimson;
    padding: 5px;
}

.profile-container {
    max-width: 750px;
}

.profile-header {
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #aa00ff;
    text-align: center;
}

.profile-title {
    color: #aa00ff;
    font-size: 20px;
    margin: 0;
}

.profile-card {
    display: flex;
    gap: 15px;
    background-color: #2a2a2a;
    border: 2px solid #000;
    padding: 15px;
    width: 100%;
}

.profile-avatar {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background-color: #aa00ff;
    border: 2px solid #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.profile-status {
    text-align: center;
}

.status-badge {
    padding: 5px 10px;
    border: 2px solid #000;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
}

.status-badge.admin {
    background-color: #ff3333;
    color: #fff;
}

.status-badge.player {
    background-color: #00aaff;
    color: #fff;
}

.profile-details {
    flex: 1;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table th,
.profile-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #444444;
    font-size: 20px;
    color: #fff;
}

.profile-table th {
    background-color: #aa00ff;
    color: #fff;
    text-transform: uppercase;
}

.profile-table td {
    background-color: #333333;
}

.error-card {
    background-color: #ff3333;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 15px;
    width: 100%;
    text-align: center;
}

.error {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

.admin-container {
    max-width: 900px;
}

.admin-title {
    color: #ff0000;
    font-size: 16px;
    margin-bottom: 10px;
}

.admin-card {
    background-color: #333;
    border: 2px solid #000;
    padding: 10px;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: center;
    border-bottom: 2px solid #000;
    font-size: 10px;
}

.admin-table th {
    background-color: #00cc00;
    color: #fff;
    padding: 10px;
}

.delete-btn, .kick-btn, .set-pp-btn {
    padding: 4px 8px;
    color: #fff;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 10px;
    text-decoration: none;
}

.delete-btn {
    background-color: #ff3333;
}

.delete-btn:hover {
    background-color: #cc0000;
}

.kick-btn {
    background-color: #ffaa00;
    margin-left: 4px;
}

.kick-btn:hover {
    background-color: #cc8800;
}

.set-pp-btn {
    background-color: #00cc00;
}

.set-pp-btn:hover {
    background-color: #009900;
}

.auth-container {
    max-width: 400px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background-color: #333;
    border: 4px solid #000;
    padding: 20px;
    width: 100%;
    text-align: center;
}

.auth-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 50%;
    padding: 8px;
    font-size: 12px;
    border: 2px solid #000;
    background-color: #666;
    color: #fff;
    outline: none;
}

.form-input::placeholder {
    color: #ccc;
}

.auth-btn {
    background-color: #00aaff;
    color: #fff;
    padding: 8px;
    font-size: 12px;
    border: 2px solid #000;
    cursor: pointer;
}

.auth-btn:hover {
    background-color: #0088cc;
}

.no-pixels-warning {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ff3333;
    z-index: 10;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #333;
    padding: 20px;
    border: 4px solid #000;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.modal-content h3 {
    color: #00aaff;
    font-size: 14px;
    margin-bottom: 10px;
}

.modal-content button {
    background-color: #0a954f;
    color: #fff;
    padding: 8px 16px;
    border: 2px solid #000;
    cursor: pointer;
    margin: 0 auto;
}

.captcha-image {
    display: block;
    margin: 10px auto;
    border: 2px solid #000;
    width: 300px;
    height: 100px;
    background-color: #fff;
}

.error {
    color: #ff3333;
    font-size: 10px;
    margin-top: 10px;
}

.chat-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    height: 450px;
}

.chat-container h3 {
    color: #fff;
    font-size: 12px;
    margin-bottom: 8px;
}

.chat-messages {
    flex-grow: 1;
    background-color: #666;
    border: 2px solid #000;
    padding: 8px;
    overflow-y: auto;
    max-height: 400px;
    font-size: 10px;
    color: #fff;
    word-break: break-word;
    overflow-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #333;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #333;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #00aaff;
    border: 2px solid #333;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #0088cc;
}

.chat-message {
    margin-bottom: 4px;
    background: #575757;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.chat-message strong {
    color: #00cc00;
    background: #272727;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
}

.chat-message .timestamp {
    color: #bbb;
    font-size: 10px;
    margin-right: 8px;
}

.chat-input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.chat-input input {
    flex-grow: 1;
    padding: 8px;
    border: 2px solid #000;
    background-color: #353535;
    color: #fff;
    font-size: 10px;
}

.chat-input button {
    padding: 4px 8px;
    background-color: #00aaff;
    color: #fff;
    border: 2px solid #000;
    font-size: 10px;
    cursor: pointer;
}

.chat-input button:hover {
    background-color: #0088cc;
}

.admin-username {
    color: #ff3333 !important;
}

.admin-notification {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #666;
    border: 2px solid #000;
}

.admin-notification h3 {
    color: #fff;
    font-size: 12px;
    margin-bottom: 8px;
}

.notification-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#notificationMessage {
    min-height: 80px;
    padding: 8px;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    font-size: 16px;
}

.send-notification-btn {
    padding: 8px 16px;
    background-color: #00aaff;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    width: 150px;
    align-self: flex-end;
}

.send-notification-btn:hover {
    background-color: #0088cc;
}

.notification-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.notification-modal-content {
    background-color: #333;
    padding: 20px;
    border: 4px solid #000;
    text-align: center;
    width: 80%;
    max-width: 350px;
}

.notification-modal-content h3 {
    color: #00aaff;
    font-size: 14px;
}

.notification-modal-content p {
    margin: 10px 0;
    font-size: 10px;
}

.notification-modal-content button {
    background-color: #00cc00;
    color: #fff;
    padding: 8px 16px;
    border: 2px solid #000;
    cursor: pointer;
}

.online-users h3 {
    color: #fff;
    font-size: 12px;
    margin-bottom: 8px;
    background: #666;
    padding: 8px;
    border: 2px solid #000;
}

.photo-size-selector,
.sketch-size-selector {
    position: absolute;
    top: -45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    border: 2px solid #000;
    padding: 8px;
    z-index: 300;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.size-btn {
    padding: 4px 8px;
    background-color: #aa00ff;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 14px;
}

.size-btn:hover {
    background-color: #8800cc;
}

.auto-color-btn {
    background-color: #6d6d6d;
}

.auto-color-btn:hover {
    background-color: #535353;
}

.auto-color-btn.active {
    background-color: #00cc00;
}

.auto-color-btn.active:hover {
    background-color: #009900;
}

.notification-container {
    position: fixed;
    top: 50px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.site-notification {
    background-color: #ff3333;
    color: #fff;
    padding: 8px 16px;
    border: 2px solid #000;
    font-size: 10px;
    max-width: 250px;
}

.bonus-container {
    max-width: 600px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bonus-title {
    color: #0029c5;
    font-size: 16px;
    margin-bottom: 20px;
}

.bonus-card {
    background-color: #333;
    border: 4px solid #000;
    padding: 20px;
    width: 100%;
    text-align: center;
}

.prize-tape-container {
    width: 100%;
    overflow: hidden;
    background-color: #666;
    border: 2px solid #000;
    margin-bottom: 20px;
    height: 60px;
}

.prize-tape {
    display: flex;
    width: fit-content;
    height: 100%;
}

.prize-item {
    width: 120px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #00aaff;
    border-right: 2px solid #000;
    color: #fff;
    font-size: 14px;
}

.spin-btn {
    background-color: #ffaa00;
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    border: 2px solid #000;
    cursor: pointer;
    text-transform: uppercase;
}

.spin-btn:hover {
    background-color: #cc8800;
}

.spin-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.captcha-container {
    position: relative;
    display: inline-block;
}

.captcha-image {
    display: block;
    margin: 10px auto;
    border: 2px solid #000;
}

.captcha-canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    cursor: pointer;
}

.captcha-text {
    font-size: 16px;
    color: #fff;
    background-color: #666;
    padding: 4px 8px;
    border: 2px solid #000;
    margin: 10px 0;
    text-align: center;
}

.captcha-text span.selected {
    color: #00ff00;
    font-weight: bold;
}

.captcha-btn {
    background-color: #ffaa00;
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    border: 2px solid #000;
    cursor: pointer;
    margin-top: 5px;
}

.captcha-btn:hover {
    background-color: #cc8800;
}

#captchaStatus {
    font-size: 12px;
    margin-top: 5px;
    color: #fff;
}

#captchaStatus.error {
    color: #ff3333;
}

.rate-limit-modal-content {
    background: linear-gradient(1deg, #000000, #ab000094);
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
}

.rate-limit-modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rate-limit-modal-content p {
    font-size: 16px;
    line-height: 1.5;
}

#rateLimitTimer {
    display: inline-block;
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.chat-input {
    position: relative;
    margin-top: 10px;
}

#chatCooldown {
    position: absolute;
    bottom: -25px;
    left: 0;
    background: #333333;
    padding: 3px 8px;
    font-size: 0.8em;
}

#afkModal .modal-content {
    background-color: #333;
    padding: 20px;
    border: 4px solid #000;
    text-align: center;
    width: 80%;
    max-width: 350px;
}

#afkModal .modal-content h3 {
    color: #ffaa00;
    font-size: 16px;
    margin-bottom: 10px;
}

#afkModal .modal-content p {
    font-size: 12px;
    color: #fff;
    margin-bottom: 15px;
}

#afkModal .modal-content button {
    background-color: #0a954f;
    color: #fff;
    padding: 8px 16px;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
}

#afkModal .modal-content button:hover {
    background-color: #009900;
}

/* Media queries for responsiveness */
@media (max-width: 480px) {
    .nav-button {
        padding: 4px 8px;
        font-size: 8px;
    }

    .pixel-points-counter {
        font-size: 8px;
        padding: 2px 4px;
    }

    #pixelCanvas {
        width: 100vw;
        height: 100vh;
    }

    .controls {
        bottom: 5px;
        gap: 4px;
        padding: 4px;
        flex-wrap: wrap;
        z-index: 250;
    }

    .pixel-counter {
        font-size: 12px;
        width: 50px;
        padding: 2px;
    }

    #colorPicker {
        width: 30px;
        height: 30px;
    }

    .progress-bar {
        width: 60px;
        height: 6px;
    }

    .center-btn, .photo-btn, .sketch-btn, .cancel-btn, .track-btn {
        padding: 4px 8px;
        font-size: 8px;
    }

    .tracked-username {
        font-size: 8px;
        margin-left: 4px;
    }

    .auth-title {
        font-size: 12px;
    }

    .form-input {
        font-size: 8px;
    }

    .auth-btn {
        font-size: 8px;
    }

    .chat-container {
        height: 250px;
    }

    .chat-messages {
        max-height: 200px;
        font-size: 10px;
        padding: 6px;
    }

    .chat-message {
        padding: 6px;
        margin-bottom: 3px;
    }

    .chat-message strong {
        font-size: 10px;
        padding: 3px 6px;
    }

    .chat-message .timestamp {
        font-size: 8px;
    }

    .bonus-title {
        font-size: 12px;
    }

    .prize-item {
        width: 80px;
        font-size: 10px;
    }

    .spin-btn {
        padding: 4px 8px;
        font-size: 8px;
    }

    .admin-table th,
    .admin-table td {
        padding: 4px;
        font-size: 7px;
    }

    .admin-table input[type="number"] {
        width: 30px;
    }

    .top-players {
        width: 100%;
        max-width: none;
        padding: 8px;
        top: 40px;
        right: 0;
        gap: 8px;
    }

    .top-players h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .top-players-table th,
    .top-players-table td {
        padding: 4px;
        font-size: 10px;
    }

    .user-rank {
        font-size: 10px;
        margin-top: 6px;
    }

    .user-rank p {
        padding: 3px;
    }

    .chat-container {
        height: 200px;
    }

    .chat-messages {
        max-height: 150px;
        font-size: 10px;
        padding: 4px;
    }

    .chat-container h3 {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .chat-input input {
        font-size: 8px;
        padding: 6px;
    }

    .chat-input button {
        font-size: 8px;
        padding: 3px 6px;
    }

    .online-users h3 {
        font-size: 10px;
        padding: 6px;
    }

    .photo-size-selector, .sketch-size-selector {
        top: -50px;
        padding: 4px;
        gap: 2px;
    }

    .size-btn {
        padding: 2px 4px;
        font-size: 8px;
    }

    .profile-container {
        max-width: 100%;
        padding: 10px;
    }

    .profile-title {
        font-size: 16px;
    }

    .profile-card {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .profile-avatar {
        flex: none;
    }

    .avatar-placeholder {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 8px;
    }

    .profile-table th,
    .profile-table td {
        padding: 8px;
        font-size: 11px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .button-bar {
        flex-wrap: wrap;
        padding: 5px;
        gap: 5px;
    }

    .nav-button {
        padding: 6px 12px;
        font-size: 10px;
    }

    .pixel-points-counter {
        right: 5px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .pixelCanvas {
        width: 100vw;
        height: 100vh;
    }

    .controls {
        bottom: 8px;
        gap: 6px;
        padding: 6px;
        flex-wrap: wrap;
        z-index: 250;
    }

    .pixel-counter {
        font-size: 14px;
        width: 60px;
        padding: 3px;
    }

    #colorPicker {
        width: 35px;
        height: 35px;
    }

    .progress-bar {
        width: 70px;
        height: 7px;
    }

    .center-btn, .photo-btn, .sketch-btn, .cancel-btn, .track-btn {
        padding: 6px 12px;
        font-size: 9px;
    }

    .tracked-username {
        font-size: 10px;
        margin-left: 6px;
    }

    .auth-container {
        padding: 5px;
    }

    .auth-card {
        padding: 10px;
    }

    .auth-title {
        font-size: 14px;
    }

    .form-input {
        font-size: 10px;
        padding: 6px;
    }

    .auth-btn {
        font-size: 10px;
        padding: 6px;
    }

    .chat-container {
        height: 350px;
    }

    .chat-messages {
        max-height: 300px;
        font-size: 11px;
        padding: 8px;
    }

    .chat-message {
        padding: 7px;
        margin-bottom: 3px;
    }

    .chat-message strong {
        font-size: 11px;
        padding: 3px 7px;
    }

    .chat-message .timestamp {
        font-size: 9px;
    }

    .bonus-title {
        font-size: 14px;
    }

    .prize-item {
        width: 100px;
        font-size: 12px;
    }

    .spin-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .admin-container {
        max-width: 100%;
        padding: 5px;
    }

    .admin-table th,
    .admin-table td {
        padding: 6px;
        font-size: 8px;
    }

    .admin-table input[type="number"] {
        width: 40px;
    }

    .top-players {
        width: 300px;
        max-width: 90%;
        padding: 12px;
        top: 50px;
        right: 5px;
        gap: 10px;
    }

    .top-players h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .top-players-table th,
    .top-players-table td {
        padding: 6px;
        font-size: 12px;
    }

    .user-rank {
        font-size: 12px;
        margin-top: 8px;
    }

    .user-rank p {
        padding: 4px;
    }

    .chat-container {
        height: 300px;
    }

    .chat-messages {
        max-height: 250px;
        font-size: 11px;
        padding: 6px;
    }

    .chat-container h3 {
        font-size: 11px;
        margin-bottom: 7px;
    }

    .chat-input input {
        font-size: 9px;
        padding: 7px;
    }

    .chat-input button {
        font-size: 9px;
        padding: 4px 7px;
    }

    .online-users h3 {
        font-size: 11px;
        padding: 7px;
    }

    .photo-size-selector, .sketch-size-selector {
        top: -55px;
        padding: 6px;
        gap: 3px;
    }

    .size-btn {
        padding: 3px 6px;
        font-size: 9px;
    }

    .profile-container {
        max-width: 90%;
        padding: 15px;
    }

    .profile-title {
        font-size: 18px;
    }

    .profile-card {
        gap: 12px;
        padding: 12px;
    }

    .avatar-placeholder {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 9px;
    }

    .profile-table th,
    .profile-table td {
        padding: 9px;
        font-size: 12px;
    }
}