* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    position: fixed;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#gameCanvas {
    display: block;
    background-color: #2d5016;
    touch-action: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100vw;
    max-height: 100vh;
}

/* Multiplayer Wizard Styles */
.mp-lobby {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.mp-panel {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    width: min(92%, 600px);
        max-height: 85%;
        overflow-y: auto;
        padding: 20px;
        border-radius: 16px;
        background: rgba(14, 14, 16, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        color: #fff;
        font-family: 'Inter', sans-serif;
    }
    
    .mp-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
}

.mp-title {
    font-size: 18px;
    font-weight: 700;
}

.mp-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
}

.mp-status-bar {
    display: flex;
    justify-content: space-between;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 20px;
        background: rgba(255, 255, 255, 0.05);
        padding: 8px 12px;
        border-radius: 8px;
}

.mp-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    text-align: center;
}

/* Steps */
.hidden {
    display: none !important;
}

.mp-actions-vertical {
    display: flex;
    flex-direction: column;
        gap: 12px;
}

.mp-btn {
    padding: 12px 20px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mp-btn:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.15);
}

.mp-btn:disabled {
    opacity: 0.5;
        cursor: not-allowed;
}

.mp-primary {
    background: #4f46e5;
        border-color: #4f46e5;
    }
    
    .mp-primary:hover:not(:disabled) {
        background: #4338ca;
    }
    
    .mp-large {
        font-size: 16px;
        padding: 16px;
    }
    
    /* Step Content */
    .mp-section {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
}

.mp-step-num {
    background: rgba(255, 255, 255, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
        flex-shrink: 0;
    }
    
    .mp-step-content {
        flex: 1;
    }
    
    .mp-step-content p {
        margin-bottom: 10px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .mp-qr-wrapper {
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        width: fit-content;
        margin-bottom: 15px;
}

.mp-row-tight {
    display: flex;
    gap: 10px;
}

.mp-input-area {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: #fff;
    padding: 10px;
    margin-bottom: 10px;
        font-family: monospace;
    font-size: 12px;
}

.mp-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.mp-status-msg {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 20px;
}

/* Lobby / Connected */
.mp-lobby-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #4ade80;
    margin: 40px 0;
}

.mp-connection-dot {
    width: 12px;
    height: 12px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
}

.mp-actions-center {
    display: flex;
    justify-content: center;
}

.mp-ready-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mp-ready-btn.active {
    background: #4ade80;
    color: #000;
}
/* Setup Step Styles */
.mp-section-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.mp-scroll-x {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.mp-scroll-x::-webkit-scrollbar {
    height: 6px;
}

.mp-scroll-x::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.mp-option-card {
    flex: 0 0 120px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.mp-option-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mp-option-card.selected {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.1);
}

.mp-card-name {
    font-size: 14px;
    font-weight: 600;
    z-index: 1;
}

.disabled-container {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}