/* Top navy blue band styles */
.top-band {
    width: 100%;
    background-color: #001f3f;
    padding: 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
}

.top-title {
    color: #fff;
    margin: 0;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 0 16px;
    line-height: 60px;
    text-shadow: 0 2px 8px rgba(44,62,80,0.10);
}
@media (max-width: 600px) {
    .xo-game-card {
        width: fit-content;
        max-width: 98vw;
        min-width: 0;
        padding: 4px 0 4px 0;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(44,62,80,0.08);
        border: 2px solid #1976d2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
    #xo-board {
        grid-template-columns: repeat(15, 18px) !important;
        grid-template-rows: repeat(15, 18px) !important;
        max-width: 98vw;
        min-width: 0;
        gap: 1px;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(44,62,80,0.08);
        justify-content: center;
        align-items: center;
        margin-left: center;
        margin-right: center;
    }
    .xo-cell {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        vertical-align: middle;
        box-sizing: border-box;
    }
    .xo-info-row {
        flex-direction: column;
        gap: 12px;
        max-width: 98vw;
        align-items: center;
        justify-content: center;
    }
    .xo-history-card, .xo-rules-card {
        width: 98vw;
        min-width: 0;
        padding: 12px 4px;
        font-size: 1rem;
        align-items: center;
    }
    .xo-controls {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }
}
body {
    background: #f6f8fa;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.xo-container {
    max-width: 900px;
    margin: 32px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.xo-container h1 {
    margin-bottom: 24px;
    color: #222;
    font-size: 2rem;
    text-align: center;
}
#xo-board {
    display: grid;
    grid-template-columns: repeat(15, 28px);
    grid-template-rows: repeat(15, 28px);
    gap: 2px;
    margin-bottom: 24px;
    background: #e3eaf2;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(44,62,80,0.04);
}
.xo-cell {
    width: 28px;
    height: 28px;
    background: #f9fafb;
    border: 1px solid #cfd8dc;
    font-size: 1.2rem;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.xo-cell.x {
    color: #d32f2f;
    font-weight: bold;
}
.xo-cell.o {
    color: #388e3c;
    font-weight: bold;
}
.xo-cell:hover {
    background: #e0f7fa;
}
.xo-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}
#xo-message {
    font-size: 1.1rem;
    color: #333;
}
#restart {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
#restart:hover {
    background: #1565c0;
}

    .xo-info-row {
        display: flex;
        flex-wrap: wrap;
        gap: 32px;
        justify-content: center;
        margin: 48px auto;
        max-width: 1500px;
    }

    .xo-game-card {
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 24px rgba(44,62,80,0.08);
        padding: 32px 32px 18px 32px;
        margin: 32px auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        border: 1px solid #e0e3e6;
        max-width: 900px;
    }
    #xo-board {
        grid-template-columns: repeat(15, 24px) !important;
        grid-template-rows: repeat(15, 24px) !important;
        max-width: 98vw;
        min-width: 0;
        gap: 2px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(44,62,80,0.08);
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }
    .xo-cell {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        max-width: 24px;
        max-height: 24px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        vertical-align: middle;
        box-sizing: border-box;
    }

    .xo-board-card, .xo-controls-card {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(44,62,80,0.13);
        padding: 44px 36px;
        width: 650px;
        min-width: 320px;
        font-size: 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 32px auto;
    }
    .xo-board-card {
        border: 2px solid #1976d2;
    }
    .xo-controls-card {
        border: 2px solid #43a047;
    }

    .xo-history-rules {
        display: flex;
        flex-wrap: wrap;
        gap: 32px;
        justify-content: center;
        margin: 48px auto;
        max-width: 1500px;
    }
    .xo-history-card, .xo-rules-card {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(44,62,80,0.13);
        padding: 44px 36px;
        width: 650px;
        min-width: 320px;
        font-size: 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .xo-history-card {
        border: 2px solid #1976d2;
    }
    .xo-rules-card {
        border: 2px solid #43a047;
    }
    .xo-history-card h2 {
        color: #1976d2;
        font-size: 1.5rem;
        margin-top: 0;
        margin-bottom: 18px;
    }
    .xo-rules-card h2 {
        color: #43a047;
        font-size: 1.5rem;
        margin-top: 0;
        margin-bottom: 18px;
    }
    .xo-history-text p, .xo-rules-text p {
        margin: 10px 0 6px 0;
        color: #333;
    }
    .xo-history-text ul, .xo-rules-text ul {
        margin: 0 0 10px 18px;
        padding-left: 18px;
        color: #444;
    }
