/**
 * Funquizo Games - 1 vs 1 Match UI Styles
 *
 * Centralized theme variables & styles for all 1 vs 1 games.
 * Change primary button colors in ONE place here.
 */

:root {
    --fq-1v1-btn-create-bg: rgb(5, 150, 105);
    --fq-1v1-btn-create-color: #ffffff;
}

/* Override Funquizo base layout main.container */
main.container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Outer Shell Container for 1 vs 1 playable games - matches 1280px standard */
.gh-game-container {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
    padding: 0.5rem 0 3.5rem;
}

@media (max-width: 760px) {
    .gh-game-container {
        width: calc(100% - 14px);
    }
}

/* Global Breadcrumbs spacing for all 1 vs 1 game views */
.gh-game-container .breadcrumb-container.gh-breadcrumbs,
.breadcrumb-container.gh-breadcrumbs {
    margin-bottom: 2rem !important;
}

/* Centralized 1 vs 1 Action Buttons (Lobby / Ready card) */
.fq-1v1-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 850;
    border: none;
    cursor: pointer;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.fq-1v1-btn-action:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ➕ Create Match Button - Central green rgb(5, 150, 105) without hover effect */
.fq-1v1-btn-create,
.fq-1v1-btn-action--create,
.ttt-btn-action--primary {
    background-color: var(--fq-1v1-btn-create-bg) !important;
    color: var(--fq-1v1-btn-create-color) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.fq-1v1-btn-create:hover,
.fq-1v1-btn-action--create:hover,
.ttt-btn-action--primary:hover {
    background-color: var(--fq-1v1-btn-create-bg) !important;
    color: var(--fq-1v1-btn-create-color) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2) !important;
}

/* Modal Overlays */
.fq-1v1-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.fq-1v1-modal-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.fq-1v1-modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 460px;
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.fq-1v1-modal-overlay.is-visible .fq-1v1-modal-card {
    transform: translateY(0) scale(1);
}

.fq-1v1-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.fq-1v1-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Big Code Display */
.fq-1v1-code-box {
    font-size: 3.2rem;
    font-weight: 950;
    color: #1e293b;
    letter-spacing: 0.12em;
    line-height: 1;
    margin: 0.75rem 0;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Lobby Players Card */
.fq-1v1-lobby-players {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.fq-1v1-lobby-player {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.fq-1v1-lobby-role {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.fq-1v1-lobby-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.fq-1v1-lobby-name {
    font-size: 0.9rem;
    font-weight: 850;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fq-1v1-lobby-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    width: fit-content;
}

.fq-1v1-lobby-badge--ready {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.fq-1v1-lobby-badge--waiting {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.fq-1v1-lobby-vs {
    font-size: 0.8rem;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.fq-1v1-input {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.fq-1v1-input:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Copy & Action Buttons */
.fq-1v1-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 0.6rem 1.15rem;
    border-radius: 12px;
    font-weight: 750;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fq-1v1-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.fq-1v1-btn-secondary#fq-1v1-copy-link-btn {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.fq-1v1-btn-secondary#fq-1v1-copy-link-btn:hover {
    background: #bbf7d0;
    border-color: #4ade80;
    color: #14532d;
}

.fq-1v1-btn-secondary#fq-1v1-copy-link-btn:focus-visible {
    outline: 3px solid rgba(34, 197, 94, 0.28);
    outline-offset: 2px;
}

.fq-1v1-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 14px;
    font-weight: 850;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.18s ease;
}

.fq-1v1-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.fq-1v1-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Head-to-Head HUD */
.fq-1v1-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 520px;
    margin: 0 auto 1.5rem auto;
    width: 100%;
}

.fq-1v1-hud-player {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.65rem 0.85rem;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.fq-1v1-hud-player--active {
    border-color: #6366f1;
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.fq-1v1-hud-role {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 950;
    flex-shrink: 0;
}

.fq-1v1-hud-role--x {
    background: #fee2e2;
    color: #ef4444;
}

.fq-1v1-hud-role--o {
    background: #dbeafe;
    color: #3b82f6;
}

.fq-1v1-hud-info {
    min-width: 0;
    flex: 1;
}

.fq-1v1-hud-name {
    font-size: 0.85rem;
    font-weight: 850;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.fq-1v1-hud-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.fq-1v1-hud-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.fq-1v1-hud-dot--offline {
    background: #cbd5e1;
}

.fq-1v1-hud-score {
    font-size: 1.25rem;
    font-weight: 950;
    color: #0f172a;
    padding-left: 0.25rem;
}

.fq-1v1-hud-vs {
    font-weight: 900;
    font-size: 0.78rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.35rem 0.65rem;
    border-radius: 100px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Turn Indicator Banner */
.fq-1v1-turn-banner {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    font-weight: 850;
    padding: 0.55rem 1rem;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    margin-right: auto;
}

.fq-1v1-turn-banner--my-turn {
    background: #dcfce7;
    color: #166534;
    box-shadow: 0 2px 6px rgba(22, 101, 52, 0.08);
    animation: pulseTurn 2s infinite ease-in-out;
}

.fq-1v1-turn-banner--opp-turn {
    background: #f1f5f9;
    color: #64748b;
}

@keyframes pulseTurn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Mode Switcher Buttons (Solo vs 1v1) */
.fq-1v1-mode-bar {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: 14px;
    max-width: 380px;
    margin: 0 auto 1.5rem auto;
}

.fq-1v1-mode-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.fq-1v1-mode-btn.is-active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
