body {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-family: Inter, sans-serif;
	background-color: #ebebeb;
	width: 100vw;
	overflow-x: hidden;
	box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* .top-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 90%;
	max-width: 1200px;
	margin: 12px auto;
	padding: 0 20px;
} */

.header-group {
	text-align: center;
	width: 90%;
	max-width: 800px;
	margin: 0 auto;
	padding: 0 10px;
}

h1 {
	font-size: clamp(28px, 5vw, 64px);
	margin-top: 0.25em;
	margin-bottom: 0.25em;
}

.tagline {
	font-size: clamp(9px, 1.12vw, 16px);
	color: #828282;
	margin: 0.5em 0;
}

.masked-text {
    font-size: clamp(9px, 1.12vw, 16px);
    font-weight: bold;
    color: transparent;
    background-image: url('https://images.unsplash.com/photo-1557682250-33bd709cbe85?q=80&w=1429&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); 
	background-size: 200%;
    background-position: 0 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-background 2s infinite alternate linear;
}

@keyframes animate-background {
    0% {
        background-position: 0 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.status {
	background-color: white;
	border: clamp(0.5px, 1vw, 2px) solid white;
	border-radius: 50px;
	margin: 2% 0 0 0;
	font-size: clamp(9px, 1.12vw, 24px);
	font-weight: bold;
	padding: clamp(8px, 2vw, 14px) clamp(12px, 3vw, 24px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	transition: all 0.2 ease;
}

.game-board {
	resize: both;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	aspect-ratio: 1 / 1;
	max-width: 500px;
	width: min(80%, 500px);
	margin: 20px auto;
}

.cell {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: white;
	cursor: pointer;
	border: clamp(0.5px, 1vw, 2px) solid white;
	border-radius: 10%;
	margin: 3%;
	font-size: clamp(16px, 5vw, 48px);
	font-weight: bold;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	transition: all 0.2 ease;
}

.cell:hover {
	box-shadow: 0 4px 8px rgba(0,0,0,0.2);
	transform: translateY(-3px);
}

.player1 {
	color: rgba(0, 0, 0, 1);
}

.player2 {
	color: rgba(128, 0, 128, 1);
}

.buttons-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.version-button {
	background-color: white;
	color: rgba(0, 0, 0, 1);
	border: clamp(0.5px, 1vw, 2px) solid rgba(0, 0, 0, 1);
	border-radius: max(6px, 1%);
	cursor: pointer;
	font-size: clamp(12px, 1vw, 16px);
	font-weight: bold;
	padding: clamp(8px, 2vw, 14px) clamp(12px, 3vw, 24px);
	text-align: center;
	text-decoration: none;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
}

.restart-button {
	background-color: black;
	color: white;
	border: clamp(0.5px, 1vw, 2px) solid rgba(0, 0, 0, 1);
	border-radius: max(6px, 1%);
	cursor: pointer;
	font-size: clamp(12px, 1vw, 16px);
	font-weight: bold;
	padding: clamp(8px, 2vw, 14px) clamp(12px, 3vw, 24px);
	text-align: center;
	text-decoration: none;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
}

@keyframes fade-loop {
	0% { opacity: 1; }
	50% { opacity: 0.2; }
	100% { opacity: 1; }
}

.faded {
	animation: 1.25s fade-loop infinite ease-in-out;
}

@keyframes winner {
	0% { transform: scale(1); }
	50% { transform: scale(1.1); }
	100% { transform: scale(1); }
}

.winner-announcement {
	animation: winner 1s ease infinite;
	background-color: #f7f1fc;
	border: 2px solid #8e44ad;
}

/* Small laptops (14" and similar) */
@media only screen and (max-width: 1540px) {
    .game-board {
        width: min(75%, 400px);
    }
    
    h1 {
        font-size: clamp(24px, 4vw, 32px);
    }
}

/* Tablets and small laptops */
@media only screen and (max-width: 992px) {
	.game-board {
        width: min(85%, 350px);
    }
    
    .cell {
        font-size: clamp(16px, 4vw, 36px);
    }
}

/* phones, 600px and down */
@media only screen and (max-width: 600px) {
    body {
        justify-content: space-between;
        padding: 10px 0;
    }

    .game-board {
        width: min(90%, 300px);
    }

    .cell {
        margin: 2%;
        font-size: clamp(14px, 8vw, 32px);
    }
}