@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

:root {
--primary: #ED5931; --primary-glow: #A9300F;
--bg: #0f1115; --panel: #1a1d23; --text: #ffffff; --border: #2d323a; --card-off: #121418;
--edit-glow: #06b6d4;
}

[data-mode="light"] { --bg: #f8fafc; --panel: #ffffff; --text: #0f172a; --border: #e2e8f0; --card-off: #f1f5f9; }
[data-theme="blue"] { --primary: #39B7C0; --primary-glow: #1F6F75; --edit-glow: #ef4444; }

body { font-family: 'Inter', sans-serif; background-color: var(--bg); color: var(--text); height: 100vh; overflow: hidden; transition: all 0.4s ease; }
.table-area { position: relative; width: 100%; max-width: 850px; height: 380px; background: var(--panel); border: 8px solid var(--primary); border-radius: 200px; display: flex; align-items: center; justify-content: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
#participants-wrapper {
    pointer-events: none;
}
.participant-node { position: absolute; z-index: 100; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center;
    pointer-events: auto !important;
    cursor: default;
}

.card-edited { border-color: var(--edit-glow) !important; box-shadow: 0 0 20px var(--edit-glow) !important; background-color: var(--edit-glow) !important; }

.sidebar { position: fixed; right: -350px; top: 0; height: 100%; width: 350px; background: var(--panel); border-left: 1px solid var(--border); transition: right 0.3s ease; z-index: 500; padding: 20px; }

.sidebar.open { right: 0; }

.toast-notify { position: fixed; top: 20px; right: 20px; z-index: 3000; background: var(--panel); color: var(--text); padding: 12px 24px; border-radius: 14px; border-left: 4px solid var(--primary); font-weight: 700; animation: slideIn 0.3s forwards; }

@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }

/* Espaciado de la mesa: aumentamos margen para que las cartas no choquen */

.table-area {
margin: 60px 0; /* Más espacio arriba y abajo */
border-width: 4px; /* Un poco más fino para que se vea elegante */
}

/* Colores para las secciones de acceso */
#view-signin, #view-name {
background: radial-gradient(circle at bottom left, var(--primary-glow), var(--bg));
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}

.auth-card {
background: var(--panel);
border: 2px solid var(--primary); /* Borde color primary */
border-radius: 24px;
padding: 2rem;
width: 100%;
max-width: 400px;
box-shadow: 0 0 40px -10px var(--primary-glow);
}

input:focus {
border-color: var(--primary) !important;
box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Botón Primary estándar */
.btn-primary {
background-color: var(--primary);
color: white;
font-weight: 900;
text-transform: uppercase;
letter-spacing: 1px;
padding: 1rem;
border-radius: 12px;
transition: all 0.2s;
}



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

/* Animación de pulso para cartas editadas */

.card-edited {

animation: pulse-cyan 2s infinite;

}

@keyframes pulse-cyan {

0% { box-shadow: 0 0 0 0px rgba(6, 182, 212, 0.7); }

70% { box-shadow: 0 0 0 15px rgba(6, 182, 212, 0); }

100% { box-shadow: 0 0 0 0px rgba(6, 182, 212, 0); }

}

.emoji-picker-container {
    display: flex;
    gap: 4px;
    background: var(--panel);
    padding: 4px 8px;
    border-radius: 99px;
    border: 1px solid var(--border);
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: auto; /* Permite hacer clic en los emojis */
}

.emoji-picker-container button {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.emoji-picker-container button:hover {
    transform: scale(1.3);
}


#global-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000; /* Por encima de la mesa y el sidebar */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

#global-picker.hidden {
    display: none;
}

/* Animación tipo Meet */
.reaction-float {
    position: absolute;
    bottom: 100%; /* Empieza arriba del contenedor de emojis */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 2s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translate(-50%, 0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.2);
    }
    100% {
        transform: translate(-50%, -150px) scale(1);
        opacity: 0;
    }
}

/* ============================
   SPECTATOR MODE
   ============================ */

.spectator-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 9999px;
    border: 2px solid var(--spectator-color, #8b5cf6);
    background: rgba(139, 92, 246, 0.08);
    color: var(--spectator-color, #8b5cf6);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: spectator-pulse 3s ease-in-out infinite;
    max-width: 400px;
    margin: 0 auto;
}

@keyframes spectator-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

/* Badge en la lista de participantes */
.spectator-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 6px;
    padding: 1px 5px;
}

/* Nodo de participante espectador (más tenue) */
.participant-node.is-spectator .emoji-picker-container {
    display: none !important;
}