/* ============================================================
   BlindSector — Estilos del Lobby (index.html)
   ============================================================ */

.lobby-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* ---- Header ---- */
.lobby-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn .5s ease both;
}

.lobby-title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0,212,255,.5), 0 0 60px rgba(0,212,255,.2);
    line-height: 1;
    animation: glitch 8s ease-in-out infinite, pulse-glow-text 3s ease-in-out infinite;
    display: inline-block;
}

.lobby-subtitle {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-secondary);
    letter-spacing: .2em;
    margin-top: .5rem;
    animation: fadeIn .6s .2s ease both;
}

.lobby-version {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-secondary);
    letter-spacing: .25em;
    opacity: .45;
    margin-top: .35rem;
    animation: fadeIn .6s .35s ease both;
}

/* ---- Cards de lobby ---- */
.lobby-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 760px;
}

@media (max-width: 600px) {
    .lobby-grid { grid-template-columns: 1fr; }
}

.lobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    animation: fadeIn .4s ease both;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s, transform .25s;
}

.lobby-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 24px rgba(0,212,255,.08), 0 4px 24px rgba(0,0,0,.4);
    transform: translateY(-2px);
}

/* Línea superior animada */
.lobby-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: .7;
    transition: left .5s ease;
}

.lobby-card:hover::before {
    left: 0;
    animation: scanline-sweep 1.5s ease forwards;
}

@keyframes scanline-sweep {
    from { left: -100%; opacity: .7; }
    to   { left: 100%;  opacity: 0; }
}

/* Scanline interna al hover */
.lobby-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,212,255,.03) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}

.lobby-card:hover::after {
    opacity: 1;
}

.lobby-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.lobby-card .form-group {
    margin-bottom: 1rem;
}

.lobby-card .btn {
    width: 100%;
    margin-top: .5rem;
}

/* ---- Sección de estado de sala ---- */
.room-status {
    width: 100%;
    max-width: 760px;
    margin-top: 1.5rem;
    animation: scaleIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

.room-status-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.room-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
    animation: fadeIn .3s ease both;
}

.room-info-row:last-child {
    border-bottom: none;
}

.room-info-key {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: .8rem;
    letter-spacing: .08em;
}

.room-info-val {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: .85rem;
    word-break: break-all;
    max-width: 60%;
    text-align: right;
}

.room-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
}

.room-actions .btn {
    flex: 1;
}

/* ---- Waiting indicator ---- */
.waiting-indicator {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--warning);
}

.waiting-dot {
    width: 7px;
    height: 7px;
    background: var(--warning);
    border-radius: 50%;
    animation: blink 1.1s ease-in-out infinite;
    box-shadow: 0 0 6px var(--warning);
}

/* Tres puntos pulsantes (si hay múltiples dots) */
.waiting-dots {
    display: inline-flex;
    gap: 3px;
}

.waiting-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--warning);
    animation: blink 1.2s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }

/* ---- Log de mensajes ---- */
#lobby-log {
    width: 100%;
    max-width: 760px;
    margin-top: 1rem;
}

.log-entry {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-secondary);
    padding: .2rem 0;
    animation: logSlide .25s ease both;
    overflow: hidden;
}

.log-entry.log-ok    { color: var(--success); }
.log-entry.log-error { color: var(--danger); }
.log-entry.log-info  { color: var(--accent); }
