.connection-status-host { display:flex; justify-content:center; }
/* Status Indicators - Connection Status and Server Stats */

/* Server Stats */
.server-stats {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Host wrapper ensures centering regardless of internal grid */
.server-stats-host { display:flex; justify-content:center; margin-top: 4px; }

.stats-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

.stats-container h3 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #F59E0B;
}

.stats-grid,
.stats-grid.centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    text-align: center;
    min-width: 200px;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-content { flex: 0 1 auto; }

.stat-value { font-size: 1.35rem; font-weight: 800; color: #ffffff; line-height: 1; margin-top: 0.1rem; }

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem; /* tighter spacing below connection bar */
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: auto;
    margin-right: auto;
}

.connection-status .status-indicator,
.connection-status .auth-text { display:inline-flex; align-items:center; gap: 0.5rem; }

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.status-disconnected {
    background: #ff4757 !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

.status-connected {
    background: #00ff88 !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.status-connecting {
    background: #ffaa00 !important;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.status-waiting {
    background: #ffaa00 !important;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.status-error {
    background: #ff4757 !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

.auth-text { font-weight: 700; font-size: 0.95rem; color: #e5e7eb; }

/* Game status */
.game-status {
    text-align: center;
    margin-bottom: 1rem;
}

.game-status h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.game-status p {
    color: #a0a0a0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Player indicator at bottom of game board */
.player-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Game header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.leave-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    margin-left: 12px; /* visual spacing from username */
}

.leave-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Player info */
.player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-label {
    font-size: 0.8rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-symbol {
    font-size: 1.2rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}

.player-symbol.x {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.player-symbol.o {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
} 