/* Core Layout */
.tic_tac_outer {
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    color: #fff;
}

.container.tic_tac_container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    align-items: center;
    padding: 20px;
}    .tic_tac_outer {
        padding: 40px 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        width: 100%;
        max-width: 100%;
    }

    #win-line {
        position: absolute;
        height: 4px;
        width: 0;
        transform-origin: left center;
        top: 0;
        left: 0;
        z-index: 5;
        pointer-events: none;
        transition: all 0.4s ease;
    }

/* Columns */
.tic_tac_column_1,
.tic_tac_column_2 {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Game Board */
.tic_tac_game_bord {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.tic-tac-toe-board {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

/* Title Styles */
.game-title {
text-align: center;
  font-size: 40px;
  color: #08a3ee;
  margin-bottom: 15px;
  font-weight: 800
}

.play-type-title {
    font-size: 28px;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Game Board Grid */
.board {
    display: grid;
    grid-template-columns: repeat(3, 90px);
    grid-gap: 10px;
}

.cell {
    width: 90px;
    height: 90px;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    border-radius: 12px;
    box-shadow: inset 0 0 6px #bdc3c7;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.cell:hover {
    background-color: #d0e4f1;
    transform: scale(1.05);
}

/* Win Line */
#win-line {
    position: absolute;
    height: 4px;
    background-color: #000;
    width: 0;
    transform-origin: left center;
    z-index: 5;
    pointer-events: none;
    transition: all 0.4s ease;
}

/* Buttons */
button {
    padding: 12px 24px;
    margin: 8px 5px 0;
    border: none;
    border-radius: 8px;
    background-color: #ff7e5f;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
}

button:hover {
    background-color: #feb47b;
    transform: scale(1.05);
}

button.hide {
    display: none;
}

/* Message */
#message_container {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: #000;
}

/* Scoreboard */
.scoreboard_outer {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 0 10px #ccc;
    width: 100%;
    max-width: 400px;
}

.scoreboard h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.scoreboard p {
    font-size: 1.1rem;
    margin: 12px 0;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid #2c3e50;
}

/* Avatar Image */
img.player_avtarimage {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* Responsive */
/* Additional Responsive Tweaks */
@media screen and (max-width: 767px) {
    .tic_tac_outer {
        padding: 12px 10px;  /* less padding */
    }

    .container.tic_tac_container {
        flex-direction: column;  /* stack columns vertically */
        gap: 20px;
        padding: 10px;
    }

    .tic_tac_column_1,
    .tic_tac_column_2 {
        min-width: auto;
        width: 100%;  /* take full width on small screens */
        padding: 10px 0;
        justify-content: center;
    }

    .tic_tac_game_bord {
        max-width: 100%;  /* allow board to shrink */
        padding: 16px;
    }

  .tic_tac_outer  .board {
        grid-template-columns: repeat(3, 1fr);  /* flexible columns */
        grid-gap: 6px;
        width: 100%;
        max-width: 320px;  /* max width to prevent being too wide */
        margin: 0 auto;  /* center board */
    }

.tic_tac_outer    .cell {
        width: 100%;
        font-size: 2rem;
        border-radius: 10px;
        box-shadow: inset 0 0 4px #bdc3c7;
        cursor: pointer;
    }

  .tic_tac_outer  button {
        width: 100%;  /* full width buttons */
        padding: 14px 0;
        font-size: 18px;
        margin: 10px 0 0;
        border-radius: 12px;
    }

    #message_container {
        font-size: 1.3rem;
        padding: 0 10px;
    }

    .scoreboard_outer {
        max-width: 100%;
        padding: 15px;
        box-shadow: none;  /* simpler on mobile */
        text-align: center;
    }

    .game-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .play-type-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    img.player_avtarimage {
        width: 60px;
        height: 60px;
        margin-bottom: 8px;
    }
}
