/* ============================================================
   LOBBY 3D CSS - Social Area
   ============================================================ */

#screen-social-lobby {
    background: var(--bg-void);
}

.lobby-starfield {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at center, rgba(108, 92, 231, 0.15) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='1' fill='rgba(255,255,255,0.3)'/%3E%3Ccircle cx='50' cy='50' r='1' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='90' cy='30' r='1' fill='rgba(255,255,255,0.2)'/%3E%3C/svg%3E");
    background-size: cover, 150px 150px;
    animation: driftStars 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes driftStars {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 0, 1000px 500px; }
}

.lobby-top-bar {
    position: absolute;
    top: var(--safe-top);
    left: 0; right: 0;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    background: linear-gradient(180deg, rgba(3,5,9,0.9) 0%, transparent 100%);
}

.lobby-title {
    font-size: 16px;
    font-weight: 800;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.lobby-online-badge {
    background: rgba(0, 245, 160, 0.15);
    border: 1px solid rgba(0, 245, 160, 0.3);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-success);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: var(--neon-green);
    animation: pulse 1.5s infinite alternate;
}

.lobby-world-container {
    position: absolute;
    inset: 0;
    z-index: 10;
}

#lobby3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Virtual Joystick */
.lobby-joystick {
    position: absolute;
    bottom: 100px;
    left: 30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    backdrop-filter: blur(4px);
}

.joystick-knob {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    pointer-events: none;
}

/* Emotes Bar */
.lobby-emotes-bar {
    position: absolute;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 30;
}

.emote-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.emote-btn:active {
    transform: scale(1.2);
    background: rgba(255,255,255,0.2);
}

/* Bottom Bar Chat */
.lobby-bottom-bar {
    position: absolute;
    bottom: var(--safe-bottom);
    left: 0; right: 0;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(0deg, rgba(3,5,9,0.9) 0%, transparent 100%);
    z-index: 20;
}

.lobby-chat-input-wrap {
    flex: 1;
}

#lobby-chat-input {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #FFF;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    backdrop-filter: blur(10px);
}

#lobby-chat-input:focus {
    border-color: var(--color-primary);
    box-shadow: var(--neon-purple);
    outline: none;
}

.lobby-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #FFF;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lobby-action-btn:hover {
    background: var(--bg-hover);
}

.lobby-action-btn.primary-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    width: auto;
    padding: 0 24px;
    border-radius: var(--radius-full);
    font-weight: 800;
    gap: 8px;
}

.lobby-action-btn.danger-btn {
    background: rgba(255,56,96,0.15);
    border-color: rgba(255,56,96,0.3);
    color: var(--color-danger);
}

/* Player Panel Slide Up */
.lobby-player-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: var(--glass-bg-heavy);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
    padding: var(--space-xl);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-spring);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.lobby-player-panel.active {
    transform: translateY(0);
}

.panel-handle {
    width: 60px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    margin: 0 auto;
    cursor: pointer;
}

.panel-player-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.panel-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-gold);
    color: #000;
    font-size: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-md);
}

.panel-player-details h3 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 4px;
}

.panel-level {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 700;
}

.panel-actions {
    display: flex;
    gap: var(--space-md);
}

.panel-action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-xl);
    border: none;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    color: #FFF;
}

.panel-action-btn.invite-btn {
    background: var(--color-primary);
    box-shadow: var(--neon-purple);
}

.panel-action-btn.friend-btn {
    background: var(--color-success);
    color: #000;
    box-shadow: var(--neon-green);
}

/* Chat Overlays */
.lobby-chat-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
}

.lobby-bubble {
    position: absolute;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #FFF;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    transition: all 0.1s linear;
    animation: popBubble 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.lobby-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: rgba(0,0,0,0.8) transparent;
}

@keyframes popBubble {
    from { opacity: 0; transform: translate(-50%, -80%) scale(0.5); }
    to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}
