/* Body and general styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #340034 0%, #240090 50%, #1a005b 100%);
    color: #fff;
}

/* Container styles */
.container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header styles */
h1,
h2 {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Game board styles */
.board {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 10px;
    padding: 15px;
    max-width: 260px;
    margin: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cell {
    position: relative;
    width: 80px;
    height: 80px;
    background-color: #1d1d1d;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    animation: popIn 0.3s ease;
}

.cell:hover {
    background-color: #2c2c2c;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.cell.x::before,
.cell.o::before {
    content: '';
    position: absolute;
    font-size: 2rem;
    color: transparent;
    text-shadow: 0 0 10px transparent;
    border-radius: inherit;
}

.cell.x::before {
    content: 'X';
    color: #00a0ff;
    text-shadow: 0 0 10px #00a0ff,
        0 0 20px #00e0ff;
}

.cell.o::before {
    content: 'O';
    color: #ff00e0;
    text-shadow: 0 0 10px #ff00e0;
}

.cell.winning {
    background-color: #444;
    box-shadow: 0 0 15px #ff00f9, 0 0 15px #00f9ff;
}

/* Button styles */
button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    background-color: #1a005b;
    border: none;
    border-radius: 5px;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

button:hover {
    background-color: #240090;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

button:active {
    background-color: #340034;
    transform: translateY(0);
    box-shadow: none;
}

/* Message styles */
.message {
    margin-top: 20px;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Utility classes for layout */
.hidden {
    display: none;
}

/* Dropdown container styles */
.dropdown-container {
    display: flex;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.dropdown-container label {
    flex: 1;
    text-align: left;
    color: #fff;
}

.dropdown-container select {
    flex: 0;
    margin-left: 20px;
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    max-width: 200px;
    text-align: right;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cell {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        border-radius: 10px;
    }

    .board {
        gap: 10px;
    }

    button {
        font-size: 1rem;
        padding: 8px 16px;
    }

    .message {
        font-size: 1rem;
    }
}

/* Screen-specific container styles */
.startScreenButton-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 5px;
    width: 100%;
    margin-top: 0px;
}

.gameScreenButton-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin-top: 5px;
}

.game-type-label {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Scoreboard styles */
.score-board {
    display: flex;
    justify-content: space-between;
    width: 300px;
    margin-bottom: 10px;
}

.score-board div {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Switch container styles */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.label-container {
    flex: 0 0 150px;
    text-align: left;
}

.switch-wrapper {
    flex: 0 0 auto;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 7px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Toggle Button */
.toggle-container {
    display: flex;
    align-items: center;
    margin: 30px 0;
    width: 100%;
}

.toggle-container label {
    color: #fff;
    margin-right: 15px;
}

.toggle-button {
    display: flex;
    align-items: center;
}

.toggle-option {
    width: 30px;
    height: 30px;
    background-color: #ccc;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.toggle-option.selected {
    background-color: #2196F3;
    border-color: #2196F3;
}

.toggle-button {
    margin-left: auto;
}

#toggleO {
    margin-left: 20px;
}

/* Animation for cells */
@keyframes popIn {
    0% {
        transform: scale(0.8) rotate(-10deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}
