/* TIC-TAC-TOE page (You vs CPU) */

.ttt-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px 40px;
}

.ttt-header {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 25px;
}

.ttt-title {
    font-size: 18.8px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px;
    letter-spacing: 2px;
}

.ttt-subtitle {
    margin: 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.ttt-wrap {
    display: flex;
    gap: 22px;
    align-items: stretch;
}

.ttt-left {
    width: 380px;
    min-width: 340px;
    background: rgba(15, 18, 35, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
}

.ttt-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 18, 35, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    min-height: 520px;
}

.ttt-board {
    width: min(820px, 100%);
    padding: 26px;
    border-radius: 18px;
    background:
        radial-gradient(120% 120% at 18% 16%, rgba(255,255,255,0.06), rgba(0,0,0,0) 60%),
        linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 18px 50px rgba(0,0,0,0.30),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.ttt-board-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ttt-turn {
    flex: 1;
    min-width: 220px;
}

.ttt-turn-title {
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 900;
    color: rgba(255,255,255,0.60);
    margin-bottom: 6px;
}

.ttt-turn-value {
    font-size: 12.5px;
    font-weight: 800;
    color: rgba(255,255,255,0.92);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    display: block;
}

.ttt-legend {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ttt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 800;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}

.badge {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    font-size: 13px;
}

.badge.x {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.40);
}

.badge.o {
    background: rgba(236,72,153,0.16);
    border-color: rgba(236,72,153,0.35);
}

.ttt-rules {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.ttt-rules-title {
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 900;
    color: rgba(255,255,255,0.70);
    margin-bottom: 10px;
}

.ttt-rules-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ttt-rules-lines .line {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 800;
    color: rgba(255,255,255,0.86);
}

.ttt-rules-lines .line span:first-child {
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.75);
}

.ttt-rules-lines .line span:last-child {
    font-weight: 900;
    color: #fff;
}

.ttt-rules-note {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    display: block;
}

.ttt-block-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
}

.ttt-bet-row {
    display: grid;
    grid-template-columns: 1fr 62px 62px;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.ttt-bet-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
}

.ttt-bet-input img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ttt-bet-input input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.ttt-small-btn {
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.9);
    font-weight: 800;
    cursor: pointer;
}

.ttt-small-btn:hover {
    background: rgba(255,255,255,0.06);
}

.ttt-diff-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.ttt-chip {
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.85);
    font-weight: 800;
    cursor: pointer;
}

.ttt-chip.active {
    background: rgba(0, 255, 170, 0.18);
    border-color: rgba(0, 255, 170, 0.45);
    color: #dffff6;
}

.ttt-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.ttt-stat {
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 10px;
    text-align: center;
}

.ttt-stat .label {
    font-size: 10px;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.55);
    font-weight: 800;
}

.ttt-stat .value {
    font-size: 13px;
    margin-top: 3px;
    font-weight: 900;
}

.ttt-actions {
    margin-top: 10px;
}

.ttt-primary, .ttt-secondary {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 900;
    letter-spacing: 0.6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ttt-primary {
    background: rgba(65, 135, 255, 0.85);
    color: #fff;
}

.ttt-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ttt-secondary {
    margin-top: 10px;
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.9);
}

.ttt-secondary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ttt-hint {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.ttt-balance {
    margin-top: 16px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ttt-balance .left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: rgba(255,255,255,0.9);
}

.ttt-balance .right {
    font-weight: 900;
    color: #fff;
}

.ttt-login-hint {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

.ttt-grid {
    width: min(500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ttt-cell {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-size: 42px;
    font-weight: 900;
    color: rgba(255,255,255,0.92);
    transition: transform 120ms ease, background 120ms ease;
}

.ttt-cell:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.06);
}

.ttt-cell.disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.ttt-status {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.72);
    font-weight: 800;
}

.ttt-status strong {
    color: rgba(255,255,255,0.95);
}

@media (max-width: 1024px) {
    .ttt-wrap {
        flex-direction: column;
    }
    .ttt-left {
        width: 100%;
        min-width: 0;
    }
    .ttt-right {
        min-height: 420px;
    }
}