/* =============================================
   LUXOS & GRIFE — CHAT AO VIVO V5
   Design Dourado TikTok Style
   ============================================= */

/* Reset e variáveis */
:root {
    --lgc-primary: #C9A84C;
    --lgc-primary-light: #F5D485;
    --lgc-primary-dark: #8B6914;
    --lgc-bg: rgba(0, 0, 0, 0.0);
    --lgc-text: #ffffff;
    --lgc-shadow: 0 2px 8px rgba(0,0,0,0.8);
    --lgc-radius: 20px;
    --lgc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Wrapper principal */
#lgc-chat-wrapper {
    position: fixed;
    right: 0;
    bottom: 70px;
    width: 380px;
    max-width: 30vw;
    min-width: 280px;
    z-index: 99999;
    font-family: var(--lgc-font);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* =============================================
   CABEÇALHO
   ============================================= */
#lgc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    pointer-events: none;
    margin-bottom: 4px;
}

#lgc-live-badge {
    background: linear-gradient(135deg, var(--lgc-primary), var(--lgc-primary-light));
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    animation: lgc-pulse 2s infinite;
    pointer-events: none;
}

@keyframes lgc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#lgc-live-name {
    color: var(--lgc-primary-light);
    font-size: 13px;
    font-weight: 600;
    text-shadow: var(--lgc-shadow);
    pointer-events: none;
    flex: 1;
}

#lgc-viewers-count {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 500;
    text-shadow: var(--lgc-shadow);
    pointer-events: none;
    white-space: nowrap;
}

/* =============================================
   ÁREA DE MENSAGENS
   ============================================= */
#lgc-messages {
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px 14px;
    box-sizing: border-box;
    pointer-events: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent;
    gap: 6px;
}

#lgc-messages::-webkit-scrollbar {
    display: none;
}

/* =============================================
   MENSAGEM INDIVIDUAL
   ============================================= */
.lgc-message {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    width: 100%;
    pointer-events: none;
    animation: lgc-slide-in 0.3s ease-out;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@keyframes lgc-slide-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar circular */
.lgc-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50% !important;
    border: 2px solid var(--lgc-primary);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(201, 168, 76, 0.5);
}

/* Conteúdo da mensagem (sem caixa/fundo) */
.lgc-message-content {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Nome do usuário */
.lgc-user-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--lgc-primary-light);
    text-shadow: var(--lgc-shadow);
    margin-bottom: 1px;
    line-height: 1.2;
}

/* Texto da mensagem (flutuante, sem caixa) */
.lgc-message-text {
    font-size: 14px;
    color: #ffffff;
    text-shadow: var(--lgc-shadow);
    line-height: 1.4;
    word-break: break-word;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =============================================
   TOAST DE NOTIFICAÇÃO
   ============================================= */
#lgc-toast {
    position: fixed;
    bottom: 120px;
    right: 20px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 100000;
    border: 1px solid var(--lgc-primary);
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* =============================================
   INPUT DE MENSAGEM
   ============================================= */
#lgc-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    pointer-events: all;
    position: relative;
    z-index: 100000;
}

.lgc-input-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50% !important;
    border: 2px solid var(--lgc-primary);
    object-fit: cover;
    flex-shrink: 0;
}

#lgc-message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 25px !important;
    color: #fff;
    font-size: 13px;
    padding: 8px 14px;
    outline: none;
    font-family: var(--lgc-font);
    transition: border-color 0.2s;
}

#lgc-message-input::placeholder {
    color: rgba(255,255,255,0.45);
}

#lgc-message-input:focus {
    border-color: var(--lgc-primary);
    background: rgba(255,255,255,0.15);
}

#lgc-send-btn {
    background: linear-gradient(135deg, var(--lgc-primary), var(--lgc-primary-light));
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    min-width: 36px;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

#lgc-send-btn:hover {
    transform: scale(1.08);
    opacity: 0.9;
}

#lgc-send-btn:active {
    transform: scale(0.95);
}

/* =============================================
   PROMPT DE LOGIN
   ============================================= */
#lgc-login-prompt {
    text-align: center;
    padding: 14px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(201,168,76,0.25);
    pointer-events: all;
}

#lgc-login-prompt p {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin: 0 0 8px;
}

.lgc-login-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--lgc-primary), var(--lgc-primary-light));
    color: #000 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none !important;
    transition: opacity 0.2s;
}

.lgc-login-btn:hover {
    opacity: 0.85;
    text-decoration: none !important;
}

/* =============================================
   MODAL DE BOAS-VINDAS (primeira vez)
   ============================================= */
#lgc-welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

#lgc-welcome-box {
    background: linear-gradient(160deg, #1a1a1a 0%, #2a2000 100%);
    border: 2px solid var(--lgc-primary);
    border-radius: 20px;
    padding: 28px 24px;
    width: 320px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 0 40px rgba(201,168,76,0.3);
}

#lgc-welcome-box h3 {
    color: var(--lgc-primary-light);
    font-size: 20px;
    margin: 0 0 6px;
}

#lgc-welcome-box p {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin: 0 0 18px;
}

#lgc-avatar-preview-wrap {
    margin: 0 auto 16px;
    position: relative;
    width: 80px;
    height: 80px;
}

#lgc-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--lgc-primary);
    object-fit: cover;
    display: block;
    background: #333;
}

#lgc-avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--lgc-primary);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    color: #000;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#lgc-name-input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(201,168,76,0.4);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    padding: 10px 14px;
    box-sizing: border-box;
    outline: none;
    margin-bottom: 16px;
    font-family: var(--lgc-font);
}

#lgc-name-input::placeholder {
    color: rgba(255,255,255,0.4);
}

#lgc-welcome-confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--lgc-primary), var(--lgc-primary-light));
    border: none;
    border-radius: 14px;
    color: #000;
    font-weight: 700;
    font-size: 15px;
    padding: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#lgc-welcome-confirm-btn:hover {
    opacity: 0.88;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    #lgc-chat-wrapper {
        width: 100%;
        max-width: 100%;
        right: 0;
        bottom: 60px;
    }

    .lgc-message-content {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    #lgc-header {
        padding: 6px 10px;
    }

    #lgc-messages {
        padding: 6px 10px;
    }

    #lgc-input-area {
        padding: 6px 10px;
    }
}
