body {
    margin: 0;
    overflow: hidden;
    background-color: #0d1b1e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    display: block;
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2rem;
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#controller-ui {
    background-color: #f0f0f5;
    color: #111;
    touch-action: manipulation;
}

/* Tool select buttons */
.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 90px;
    height: 80px;
    border-radius: 16px;
    border: 2px solid #ddd;
    background: white;
    font-size: 0.75rem;
    font-weight: bold;
    color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.1s, border-color 0.15s, background 0.15s;
    user-select: none;
}

.tool-btn .tool-icon {
    font-size: 1.6rem;
}

.tool-btn.selected {
    border-color: #2563eb;
    background: #dbeafe;
    color: #1d4ed8;
    transform: scale(1.05);
}

.tool-btn:active {
    transform: scale(0.95);
}

/* Big operate / action button */
.btn-operate {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 12px 24px rgba(255, 75, 43, 0.4);
    border: none;
    user-select: none;
}

.btn-operate:active {
    transform: scale(0.95);
    box-shadow: 0 6px 12px rgba(255, 75, 43, 0.4);
}


/* ================================
   SAHAWAS OT BRANDING / CREDITS
   ================================ */
.brand-footer {
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
}

.brand-footer-panel {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.68);
}

.brand-footer-controller {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 0 14px;
    color: rgba(100,116,139,0.9);
    z-index: 20;
}

.brand-footer-active {
    bottom: max(8px, env(safe-area-inset-bottom));
}

.brand-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 3px;
}

.brand-footer a {
    color: inherit;
    text-decoration: none;
}

.brand-footer a:hover,
.brand-footer a:active {
    text-decoration: underline;
}

.host-lobby-title {
    letter-spacing: -0.04em;
}

.controller-logo {
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

@media (max-width: 600px) {
    .brand-links {
        gap: 4px 12px;
        font-size: 10px;
    }
}
