.game-area {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
}

.online-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.opponent-name {
    color: var(--text-muted);
    font-weight: 600;
}

.status {
    margin: 12px auto 14px;
    padding: 14px 18px;
    max-width: 760px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #1a1a2e, #2c3e50);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.nmm-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 18px;
    color: var(--secondary-color);
    font-weight: 700;
}

.nmm-summary span {
    padding: 8px 12px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}

.nmm-layout {
    display: grid;
    grid-template-columns: minmax(130px, 180px) minmax(280px, 620px) minmax(130px, 180px);
    gap: 22px;
    align-items: center;
    justify-content: center;
}

.player-card {
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: var(--transition);
}

.player-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.14), 0 12px 26px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.player-card h2 {
    margin: 8px 0 10px;
    color: var(--secondary-color);
    font-size: 1.25rem;
}

.player-card p {
    color: var(--text-muted);
    margin: 6px 0;
}

.player-card strong {
    color: var(--text-color);
    font-size: 1.25rem;
}

.player-token {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.25rem;
    border: 3px solid #334155;
}

.white-token {
    color: #111827;
    background: radial-gradient(circle at 35% 30%, #ffffff, #e5e7eb 65%, #cbd5e1);
}

.black-token {
    color: #ffffff;
    background: radial-gradient(circle at 35% 30%, #475569, #111827 65%, #020617);
}

.board-shell {
    position: relative;
    width: min(88vw, 620px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 24px;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.82), rgba(241,245,249,0.92)),
        linear-gradient(135deg, #dbeafe, #fef3c7);
    border: 8px solid #8b5a2b;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.38), 0 18px 42px rgba(44, 62, 80, 0.22);
    overflow: hidden;
}

.morris-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.morris-lines rect,
.morris-lines line {
    fill: none;
    stroke: #4b2e13;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.morris-board {
    position: absolute;
    inset: 0;
}

.point {
    position: absolute;
    width: clamp(34px, 7.4vw, 56px);
    height: clamp(34px, 7.4vw, 56px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0;
    border: 4px solid #4b2e13;
    background: #fff7ed;
    color: #1f2937;
    font-weight: 900;
    font-size: clamp(0.9rem, 2.8vw, 1.2rem);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    z-index: 2;
}

.point:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.08);
}

.point.white {
    color: #111827;
    background: radial-gradient(circle at 35% 30%, #ffffff, #e2e8f0 62%, #cbd5e1);
    border-color: #1e293b;
}

.point.black {
    color: #ffffff;
    background: radial-gradient(circle at 35% 30%, #64748b, #111827 62%, #020617);
    border-color: #f8fafc;
}

.point.selectable {
    outline: 4px solid rgba(41, 128, 185, 0.32);
}

.point.selected {
    outline: 5px solid #f59e0b;
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.24), 0 8px 16px rgba(15, 23, 42, 0.24);
}

.point.legal-target {
    border-color: #16a34a;
    background: #dcfce7;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2), 0 5px 12px rgba(15, 23, 42, 0.22);
}

.point.removable {
    border-color: #dc2626;
    outline: 5px solid rgba(239, 68, 68, 0.26);
}

.point.last-move {
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.22), 0 6px 14px rgba(15, 23, 42, 0.24);
}

.point:disabled {
    cursor: not-allowed;
    opacity: 0.88;
}

.rules-panel {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 14px 18px;
    border-radius: var(--border-radius);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-weight: 600;
}

.game-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

@media (max-width: 860px) {
    .game-area {
        padding: 16px;
    }

    .nmm-layout {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .board-shell {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(94vw, 560px);
        border-width: 6px;
    }

    #player-white-card {
        grid-column: 1;
        grid-row: 2;
    }

    #player-black-card {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (max-width: 560px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }

    .nmm-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .player-card {
        padding: 12px 8px;
    }

    .player-token {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .player-card h2 {
        font-size: 1rem;
    }

    .player-card p {
        font-size: 0.9rem;
    }

    .status {
        font-size: 0.98rem;
    }

    .rules-panel {
        font-size: 0.92rem;
    }
}
