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

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    touch-action: none;
    user-select: none;
}

.header {
    position: relative;
    background: #1e1e1e;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.6);
    gap: 30px;
    flex-wrap: wrap;
    border-bottom: 2px solid #2d2d2d;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pixel-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #2d2d2d;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid #3d3d3d;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-item span:not(.label) {
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.user-info-item {
    flex-direction: column;
    gap: 4px;
}

.user-info-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pixel-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4a9eff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zoom-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: #2d2d2d;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
}

.zoom-info span:not(.label) {
    font-size: 18px;
    color: white;
    font-weight: 700;
}

/* Header Left */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-btn {
    padding: 8px;
    background: #2d2d2d;
    color: white;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 56px;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-btn:hover {
    background: #3d3d3d;
    border-color: #4d4d4d;
}

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

.preview-btn.active {
    background: #4d4d4d;
    border-color: #5d5d5d;
}

.eye-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.preview-btn.active .eye-icon {
    color: #4a9eff;
}

/* Support button */
.support-btn {
    padding: 8px;
    background: #2d2d2d;
    color: white;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 56px;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.support-btn:hover {
    background: #3d3d3d;
    border-color: #4d4d4d;
    color: #4a9eff;
}

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

.support-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* TikTok Timer */
.tiktok-timer {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
    padding: 8px 20px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #3d3d3d;
    border-top: none;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2), 0 5px 5px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.timer-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timer-value {
    font-size: 18px;
    color: #2196F3;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* TikTok Notification */
.tiktok-notification {
    position: fixed;
    top: 80px;
    right: -400px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #3d3d3d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 280px;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tiktok-notification.show {
    right: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.notification-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse-icon {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.2);
        filter: brightness(1.5);
    }
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.notification-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: #cccccc;
    font-size: 15px;
}

.detail-value {
    font-weight: 600;
    font-size: 15px;
    color: #ffffff; /* Білий колір за замовчуванням */
}

.detail-value.has-value {
    color: #4ade80; /* Зелений колір коли є значення */
}

.notification-title {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-message {
    font-size: 18px;
    color: #2196F3;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Online Counter */
.online-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2d2d2d;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
    height: 56px;
    min-width: 60px;
}

.online-icon {
    width: 12px;
    height: 12px;
    background: #00ff00;
    border-radius: 50%;
    position: relative;
    animation: pulse-green 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4);
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(0, 255, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}


.online-count-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    overflow: hidden;
    min-width: 20px;
}

.online-count {
    color: white;
    font-size: 18px;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    z-index: 1;
}

.online-count.flip-out {
    transform: translate(-50%, calc(-50% - 100%)) rotateX(90deg);
    z-index: 0;
}

.online-count.flip-in {
    transform: translate(-50%, calc(-50% + 100%)) rotateX(-90deg);
    z-index: 2;
}

.online-count.flip-in.active {
    transform: translate(-50%, -50%) rotateX(0);
    z-index: 2;
}

/* Loading dots animation */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dot {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: dot-bounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

.dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Google Login Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #2d2d2d;
    color: white;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 56px;
    width: 56px;
    text-decoration: none;
}

.google-btn:hover {
    background: #3d3d3d;
    border-color: #4d4d4d;
}

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

.google-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* User Info Block */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #2d2d2d;
    border: 2px solid #3d3d3d;
    border-radius: 8px;
    height: 56px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4a9eff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


.canvas-container {
    flex: 1;
    background: #2a2a2a;
    overflow: hidden;
    position: relative;
    cursor: grab;
}


.sidebar-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%) translateX(-100px);
    width: 45px;
    height: 45px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #4a4a4a;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    opacity: 0;
}

.sidebar-toggle.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    transition: all 0.3s ease;
}

.sidebar-toggle.hidden {
    transform: translateY(-50%) translateX(-100px);
    opacity: 0;
    transition: none;
}

.sidebar-toggle:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #5a5a5a;
    transform: translateY(-50%) translateX(0) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sidebar-toggle.visible:hover {
    transform: translateY(-50%) translateX(0) scale(1.1);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar {
    position: absolute;
    left: -70px;
    top: 0;
    height: 100%;
    width: 280px;
    background: #1e1e1e;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.7);
    border-right: 2px solid #2d2d2d;
    z-index: 99;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    transform: translateX(70px);
}

.sidebar-close {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #4a4a4a;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    z-index: 101;
}

.sidebar-close:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #5a5a5a;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
}

.sidebar-content {
    padding: 30px 20px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-content h2 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 28px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-stats {
    background: #2d2d2d;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #3d3d3d;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Results block */
.sidebar-results {
    margin-bottom: 20px;
}

.results-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid #0077bb;
}

.results-link:hover {
    background: linear-gradient(135deg, #0099dd, #0077cc);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.results-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.results-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.results-text {
    flex: 1;
}

.results-title {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
}

.results-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #3d3d3d;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: white;
    font-size: 14px;
    text-align: left;
}

.stat-value {
    font-size: 18px;
    color: #4a9eff;
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.progress-current {
    color: #4a9eff;
    white-space: nowrap;
}

.progress-separator {
    color: white;
    white-space: nowrap;
}

.progress-max {
    color: white;
    white-space: nowrap;
}

.sidebar-list {
    flex: 0 0 auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    padding: 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #4d4d4d;
}


.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.sidebar-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.sidebar-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    background: #4a4a4a;
    border: 2px solid #5a5a5a;
}

.sidebar-item:nth-child(1) .sidebar-rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
    color: #1a1a1a;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.sidebar-item:nth-child(2) .sidebar-rank {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border-color: #c0c0c0;
    color: #1a1a1a;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.4);
}

.sidebar-item:nth-child(3) .sidebar-rank {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    border-color: #cd7f32;
    color: white;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.4);
}

.sidebar-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4a4a4a;
    flex-shrink: 0;
}

.sidebar-item:nth-child(1) .sidebar-avatar {
    border-color: #ffd700;
}

.sidebar-item:nth-child(2) .sidebar-avatar {
    border-color: #c0c0c0;
}

.sidebar-item:nth-child(3) .sidebar-avatar {
    border-color: #cd7f32;
}

.sidebar-nick {
    color: white;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 140px;
}

.sidebar-count {
    color: #4a9eff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.sidebar-empty {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.canvas-container:active {
    cursor: grabbing;
}

#canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    z-index: 2;
}

/* Loading indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #667eea;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* Pulse animation for color preview */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }
    
    .header-left {
        gap: 12px;
        justify-content: center;
        width: 100%;
    }
    
    .header-right {
        justify-content: center;
        width: 100%;
        gap: 12px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .pixel-info {
        gap: 12px;
        padding: 6px 15px;
    }
    
    .color-preview {
        width: 35px;
        height: 35px;
    }
    
    .info-item span:not(.label) {
        font-size: 10px;
    }
    
    .pixel-user-avatar {
        width: 20px;
        height: 20px;
    }
    
    .user-info-content {
        gap: 6px;
    }
    
    .zoom-info {
        padding: 6px 15px;
    }
    
    .zoom-info span:not(.label) {
        font-size: 16px;
    }
    
    .sidebar {
        left: -55px;
        width: 90%;
        max-width: 320px;
    }
    
    .sidebar.open {
        transform: translateX(55px);
    }
    
    .sidebar-list {
        padding: 0;
    }
    
    .sidebar-item {
        padding: 10px 12px;
        gap: 10px;
        margin-bottom: 0;
    }
    
    .sidebar-rank {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .sidebar-avatar {
        width: 28px;
        height: 28px;
    }
    
    .sidebar-nick {
        font-size: 11px;
        max-width: 120px;
    }
    
    .sidebar-count {
        font-size: 14px;
        min-width: 50px;
    }
    
    .sidebar-toggle {
        width: 40px;
        height: 40px;
        left: 12px;
        transform: translateY(-50%) translateX(-80px);
    }
    
    .sidebar-toggle.visible {
        transform: translateY(-50%) translateX(0);
    }
    
    .sidebar-toggle.hidden {
        transform: translateY(-50%) translateX(-80px);
        opacity: 0;
        transition: none;
    }
    
    .sidebar-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .sidebar-close {
        width: 40px;
        height: 40px;
        right: -50px;
    }
    
    .sidebar-close svg {
        width: 18px;
        height: 18px;
    }

    .google-btn {
        width: 50px;
        height: 50px;
        padding: 6px;
    }

    .google-logo {
        width: 20px;
        height: 20px;
    }

    .user-info {
        padding: 6px 12px;
        gap: 8px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
    }

    .user-name {
        font-size: 12px;
        max-width: 100px;
    }

    .logout-btn {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .tiktok-timer {
        padding: 6px 15px;
    }
    
    .timer-label {
        font-size: 10px;
    }
    
    .timer-value {
        font-size: 16px;
    }
    
    .tiktok-notification {
        top: 10px;
        right: -350px;
        min-width: 240px;
        padding: 12px 16px;
    }
    
    .tiktok-notification.show {
        right: 10px;
    }
    
    .notification-icon {
        width: 28px;
        height: 28px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .detail-label {
        font-size: 13px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .online-counter {
        padding: 6px 10px;
        height: 50px;
        min-width: 50px;
    }
    
    .online-icon {
        width: 10px;
        height: 10px;
    }
    
    .online-count-container {
        height: 18px;
        min-width: 16px;
    }
    
    .online-count {
        font-size: 16px;
    }
    
    .preview-btn {
        padding: 6px;
        font-size: 12px;
        height: 50px;
        width: 50px;
    }
    
    .eye-icon {
        width: 18px;
        height: 18px;
    }
    
    .support-btn {
        padding: 6px;
        font-size: 12px;
        height: 50px;
        width: 50px;
    }
    
    .support-icon {
        width: 18px;
        height: 18px;
    }
    
    .dot {
        width: 3px;
        height: 3px;
    }
    
    .loading-dots {
        gap: 1px;
    }
    
    /* Mobile styles for pixel control panel */
    body .pixel-control-panel {
        padding: 20px 20px 15px 20px !important;
        gap: 12px !important;
        width: 90% !important;
        max-width: 350px !important;
        bottom: 8px !important;
        min-height: 110px !important;
    }
    
    .pixel-info-card {
        padding: 10px 12px;
        gap: 12px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    body .pixel-count {
        font-size: 20px !important;
    }
    
    body .recharge-progress {
        max-width: 160px !important;
    }
    
    body .place-pixel-btn {
        padding: 10px 15px !important;
        font-size: 13px !important;
        height: 40px !important;
    }
    
    .canvas-container {
        margin-bottom: 0; /* No margin on mobile either */
    }
    
    /* Results block mobile */
    .results-link {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .results-icon {
        width: 20px;
        height: 20px;
    }
    
    .results-title {
        font-size: 11px;
    }
    
    .results-subtitle {
        font-size: 11px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    body .pixel-control-panel {
        width: 85% !important;
        max-width: 320px !important;
        padding: 15px 15px 12px 15px !important;
        gap: 10px !important;
        min-height: 95px !important;
    }
    
    body .pixel-count {
        font-size: 18px !important;
    }
    
    body .place-pixel-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        height: 36px !important;
    }
    
    body .recharge-progress {
        max-width: 140px !important;
    }
    
    .pixel-control-toggle {
        width: 35px;
        height: 35px;
    }
    
    .pixel-control-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .pixel-control-close {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }
    
    .pixel-control-close svg {
        width: 14px;
        height: 14px;
    }
}

/* Fixed Pixel Control Panel */
.pixel-control-panel {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    background: rgba(30, 30, 30, 0.85);
    border: none;
    border-radius: 12px;
    padding: 30px 25px 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(8px);
    outline: none;
    min-height: 120px;
}

.pixel-info-card {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid rgba(60, 60, 60, 0.3);
}

.pixel-count {
    font-size: 24px;
    font-weight: 700;
    color: #4a9eff;
    text-align: center;
    flex-shrink: 0;
}

.recharge-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #3a3a3a;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #4a4a4a;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #6bb6ff 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.place-pixel-btn {
    padding: 12px 20px;
    background: #2a2a2a;
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    cursor: not-allowed;
    font-size: 14px;
    font-weight: 600;
    transition: none;
    width: 100%;
    height: 44px;
    box-shadow: none;
    transform: translateY(0);
    position: relative;
    overflow: hidden;
}

.place-pixel-btn:not(.disabled) {
    background: linear-gradient(135deg, #4a9eff 0%, #3a8bef 100%);
    color: white;
    border: 1px solid #4a9eff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    transition: all 0.3s ease;
}

.place-pixel-btn:not(.disabled):hover {
    background: linear-gradient(135deg, #3a8bef 0%, #2a7bdf 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.place-pixel-btn:not(.disabled):active {
    transform: translateY(0);
}

.place-pixel-btn.disabled {
    background: #2a2a2a;
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid #3a3a3a;
    cursor: not-allowed;
    box-shadow: none;
    transform: translateY(0);
    transition: none;
}

.place-pixel-btn.disabled:hover {
    background: #2a2a2a;
    transform: translateY(0);
    box-shadow: none;
}

/* Pixel Control Toggle Buttons */
.pixel-control-toggle {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #4a4a4a;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pixel-control-toggle:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #5a5a5a;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.pixel-control-toggle svg {
    width: 20px;
    height: 20px;
}

.pixel-control-close {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 32px;
    height: 32px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #4a4a4a;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pixel-control-close:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.pixel-control-close svg {
    width: 16px;
    height: 16px;
}

.pixel-control-toggle.show-btn {
    bottom: 12px;
}

.pixel-control-panel.hidden .hide-btn {
    display: none;
}

/* Force mobile styles with maximum specificity */
@media (max-width: 768px) {
    html body .pixel-control-panel {
        padding: 20px 20px 15px 20px !important;
        gap: 12px !important;
        width: 90% !important;
        max-width: 350px !important;
        min-height: 110px !important;
    }
    
    html body .pixel-count {
        font-size: 20px !important;
    }
    
    html body .place-pixel-btn {
        padding: 10px 15px !important;
        font-size: 13px !important;
        height: 40px !important;
    }
    
    html body .recharge-progress {
        max-width: 160px !important;
    }
}

/* Adjust canvas container to account for fixed panel */
.canvas-container {
    flex: 1;
    background: #2a2a2a;
    overflow: hidden;
    position: relative;
    cursor: grab;
    margin-bottom: 0; /* No margin - canvas should fill entire space */
}

