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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #31184b 100%);
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Indicador de conexão - círculo fixo no canto superior direito */
.status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f39c12;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.status-indicator.connected {
    background: #27ae60;
}

.status-indicator.disconnected {
    background: #e74c3c;
}

.status-indicator.connecting {
    background: #f39c12;
}

/* Contador de pessoas online - pill fixa no canto inferior direito */
.online-count-pill {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.online-count-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.online-count-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

main {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 100px 20px;
}

/* Controles posicionados nos espaços vazios */
.control-top,
.control-bottom {
    position: absolute;
    z-index: 100;
}

/* Por padrão (portrait ou quadrado), controles em cima e embaixo */
.control-top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.control-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Para telas horizontais (landscape), controles nas laterais */
@media (min-aspect-ratio: 1/1) {
    main {
        padding: 20px 120px;
    }
    
    .control-top {
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
    }
    
    .control-bottom {
        bottom: 50%;
        right: 20px;
        left: auto;
        transform: translateY(50%);
    }
}

.color-picker-container,
.brush-size-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.color-picker-container label,
.brush-size-container label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    text-align: center;
}

#colorPicker {
    width: 60px;
    height: 60px;
    border: 3px solid #2f5489;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#colorPicker:hover {
    transform: scale(1.1);
}

#brushSize {
    width: 150px;
    cursor: pointer;
    margin-top: 5px;
}

#brushSizeValue {
    font-weight: bold;
    color: #2f5489;
    font-size: 1rem;
}

#canvas {
    background: white;
    border: 4px solid #2f5489;
    border-radius: 12px;
    cursor: crosshair;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .control-top,
    .control-bottom {
        padding: 8px 12px;
    }
    
    .color-picker-container,
    .brush-size-container {
        padding: 10px 12px;
    }
    
    #colorPicker {
        width: 50px;
        height: 50px;
    }
    
    #brushSize {
        width: 120px;
    }
    
    main {
        padding: 70px 10px;
    }
}
