* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #09070f;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* Default cursor styles for desktop */
@media (min-width: 601px) {
    body {
        cursor: none;
    }
    
    button, a, input, select, textarea, [role="button"], [tabindex] {
        cursor: none !important;
    }
    
    .custom-cursor {
        position: fixed;
        width: 30px;
        height: 30px;
        background-color: white;
        border-radius: 50%;
        pointer-events: none;
        mix-blend-mode: difference;
        transform: translate(-50%, -50%);
        z-index: 2147483647;
        will-change: transform;
    }
}

/* Mobile cursor styles */
@media (max-width: 600px) {
    body {
        cursor: auto !important;
    }
    
    button, a, input, select, textarea, [role="button"], [tabindex] {
        cursor: pointer !important;
    }
    
    .custom-cursor {
        display: none !important;
    }
    
    .mode-btns {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: fixed !important;
        bottom: 115px !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        gap: 0.7em !important;
        z-index: 1000 !important;
    }

    #spbtn, #mpbtn {
        position: static !important;
        width: 90% !important;
        height: auto !important;
        font-size: 1rem !important;
        padding: 0.8em 0 !important;
        margin: 0.5em auto !important;
        border-radius: 0.5em !important;
        background-color: #4077c9 !important;
        color: #000e4e !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.07) !important;
        display: block !important;
        text-align: center !important;
        box-sizing: border-box !important;
        transform: none !important;
        position: relative;
        overflow: hidden;
        transition: color 0.3s ease;
        clip-path: inset(0 0 0 0);
    }

    .hover-effect {
        position: absolute;
        width: 0;
        height: 0;
        background-color: #000e4e;
        border-radius: 50%;
        left: var(--x, 50%);
        top: var(--y, 50%);
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        z-index: 0;
        pointer-events: none;
    }

    #spbtn:hover, #mpbtn:hover {
        color: #4077c9;
    }

    #spbtn:hover .button-text, #mpbtn:hover .button-text {
        color: #4077c9;
    }

    #spbtn:hover .hover-effect, #mpbtn:hover .hover-effect {
        width: 200%;
        height: 200%;
    }

    .button-text {
        position: relative;
        z-index: 1;
    }

    #spbtn {
        top: auto !important;
        left: auto !important;
    }

    #mpbtn {
        top: auto !important;
        right: auto !important;
    }
}

.container {
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    margin: 0 auto;
}

#bghome{
	position: absolute;
	top: 10px;
	left: 25px;
	font-size: 20px;  /* Adjust this value to make the arrow larger */
	transition: transform 0.3s ease;
	font-weight: 900;
	color:#000e4e;
}	

#bghome img {
	transition: transform 0.2s ease;
	transform-origin: center;
}

#bghome:hover img {
	animation: subtleTwist 0.4s ease 1;
}

@keyframes subtleTwist {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(-13deg); }
	50% { transform: rotate(6.5deg); }
	75% { transform: rotate(-3.25deg); }
}

#bghome:hover {
	transform:scale(1.1);
}

.game {
    height: 60vmin;
    width: 60vmin;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
    position: relative;
    margin: 0 auto;
}

.box {
    height: 18vmin;
    width: 18vmin;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
    font-size: 8vmin;
    color: #042215;
    background-color: #0090a3;
    transition: all ease 0.6s;
}

.box:hover {
    background-color: #004e5c;
    transition: linear 0.1s;
}


.new-btn {
	appearance: none;
	background-color: #4077c9;
	color: #000e4e;
	border: none;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-block;
	font-family: Clarkson, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1em;
	margin: 0;
	opacity: 1;
	outline: 0;
	padding: 1.5em 2.2em;
	position: relative;
	text-align: center;
	text-decoration: none;
	text-rendering: geometricprecision;
	text-transform: uppercase;
	transition: all 0.3s ease;
	touch-action: manipulation;
	vertical-align: baseline;
	white-space: nowrap;
	margin-top: 10%;
}
.new-btn:hover {
	color: #4077c9;
}
.new-btn:before {
	animation: opacityFallbackOut 0.5s step-end forwards;
	backface-visibility: hidden;
	background-color: #000e4e;
	color: #4077c9;
	clip-path: polygon(-1% 0, 0 0, -25% 100%, -1% 100%);
	content: "";
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	transform: translateZ(0);
	transition: clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
		-webkit-clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
	width: 100%;
}
.new-btn:hover:before {
	animation: opacityFallbackIn 0s step-start forwards;
	clip-path: polygon(0 0, 101% 0, 101% 101%, 0 101%);
	color: #ffffff;
}
.new-btn:after {
	color: #ffffff;
}
.new-btn span {
	z-index: 1;
	position: relative;
	font-weight: bold;
}
.reset-btn {
	appearance: none;
	background-color: #4077c9;
	color: #000e4e;
	border:none;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-block;
	font-family: Clarkson, Helvetica, sans-serif;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1em;
	margin: 0;
	opacity: 1;
	outline: 0;
	padding: 1.5em 2.2em;
	position: relative;
	text-align: center;
	text-decoration: none;
	text-rendering: geometricprecision;
	text-transform: uppercase;
	transition:all 0.3s ease;
	touch-action: manipulation;
	vertical-align: baseline;
	white-space: nowrap;
	margin: 10px auto;
	z-index: 2;
	width: fit-content;
	display: block;
}
.reset-btn:hover {
	color: #4077c9;
}
.reset-btn:before {
	animation: opacityFallbackOut 0.5s step-end forwards;
	backface-visibility: hidden;
	background-color: #000e4e;
	clip-path: polygon(-1% 0, 0 0, -25% 100%, -1% 100%);
	content: "";
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	transform: translateZ(0);
	transition: clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
		-webkit-clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
	width: 100%;
	color: #4077c9;
}
.reset-btn:hover:before {
	animation: opacityFallbackIn 0s step-start forwards;
	clip-path: polygon(0 0, 101% 0, 101% 101%, 0 101%);
	color: #ffffff;
}
.reset-btn:after {
	color: #ffffff;
}
.reset-btn span {
	z-index: 1;
	position: relative;
	font-weight: bold;
}



.msg {
	color: #002b5c;
	font-size: 10vmin;
	transition: ease 0.3s;
	position: sticky;
}

.msg {
    font-size: 4vmin;
    color: #002b5c;
}
.msg2 {
	color: #002b5c;
	font-size: 1.8vmin;
	transition: ease 0.3s;
	position: absolute;
	top: 83%;

}

.msg2 {
    font-size: 2vmin;
    color: #002b5c;
}

.ttt {
	color: #002b5c;
	font-size: 6vmin;
	transition: ease 0.3s;
	z-index: -2;
}

#b:hover {
	color: #0e8aa0;
}

h1 {
    font-size: 6vmin;
    color: #002b5c;
    margin: 20px 0;
}

.msg-container {
	height: 100vmin;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	gap: 4rem;
}

h4 {
	position: fixed;
	bottom: 2%;
	right: 2%;
	color: #034a57;
	transition: all ease-in-out 0.3s;
}

a {
	font: italic bold;
	text-decoration: none;
	color: #035742;
	transition: all ease-in-out 0.3s;
}

h4:hover {
	transform: scale(1.25);
}

a:hover {
	transform: scale(1.25);
}

.hide {
	display: none;
}

h1 {
	position: relative;
	top: 10%;
	margin-left: 37%;
	margin-right: 37%;
}

.msg-container {
	height: 100vmin;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	gap: 4rem;
}

h4 {
	position: fixed;
	bottom: 2%;
	right: 2%;
	color: #034a57;
	transition: all ease-in-out 0.3s;
}

a {
	font: italic bold;
	text-decoration: none;
	color: #035742;
	transition: all ease-in-out 0.3s;
}

.help {
	text-overflow: ellipsis;
	font-weight: 900;
	text-align: center;
	height: 45px;
	width: 45px;
	position: fixed;
	bottom: 40px;
	left: 40px;
	align-items: center;
	background-color: #4077c9;
	color: #000e4e;
	opacity: 0.5;
	border: none;
	border-radius: 50px;
	padding: 10px 10px;
	cursor: pointer;
	box-shadow: 5px 2px 4px rgba(0, 0, 0, 0.7);
	transition: all 0.5s ease;
	font-size: 13px;
	overflow: hidden;
	white-space: nowrap;
	font-weight: 900;
}
.help:hover {
	opacity: 1;
	height: 45px;
	width: 455px;
	font-size: 1.2em;
	padding: 10px 20px;
	border-radius: 10px;
	background-color: #000e4e;
	color: #4077c9;
}

.hide {
	display: none;
}

h5 {
	margin: 5% 5% 5% 5%;
	padding: 5% 5% 5% 5%;
	position: static;
	color: #026d80;
	transition: all ease-in-out 0.3s;
	text-align: justify;
	text-justify: auto;
	font-size: 2.5vmin;
	font-family: cursive;
}
/* For ttt homepage |down onward| */
.gamemode {
	position: fixed;
	top: 20%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #0e4a55;
	font-size: 3vmin;
	transition: ease 0.3s;
}

.gamemode:hover {
	color: #002b5c;
}
#modebtn{
	display: flex;
	justify-content: center;
	align-items: center;
}
#spbtn {
	outline: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 50%;
	height: 100vh;
	background-color: #09070f;
	color: #2769a7;
	opacity: 0.5;
	border: none;
	font-weight: 800;
	cursor: pointer;
	z-index: -1;
	opacity: 1;
	transition: all 0.2s linear;
	font-size: 6.75vmin;
}

#spbtn:hover {
	opacity: 0.8;
	background-color: #130f20;
	color: #2077c9;
}

#mpbtn {
	outline: none;
	position: fixed;
	top: 0;
	right: 0;
	width: 50%;
	height: 100%;
	background-color: #09070f;
	color: #2769a7;
	opacity: 0.5;
	border: none;
	font-weight: 800;
	cursor: pointer; 
	z-index: -1;
	opacity: 1;
	transition: all 0.3s linear;
	font-size: 6.75vmin;
}

#mpbtn:hover {
	opacity: 0.8;
	background-color: #130f20;
	color: #2077c9;
}

/* For responsive website */

@media (max-width: 900px) {
  .mode-btns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: fixed !important;
    bottom: 120px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    gap: 0.7em !important;
    z-index: 1000 !important;
  }

  #spbtn, #mpbtn {
    position: static !important;
    width: 90% !important;
    height: auto !important;
    font-size: 1.1rem !important;
    padding: 0.9em 0 !important;
    margin: 0.7em auto !important;
    border-radius: 0.7em !important;
    background-color: #4077c9 !important;
    color: #000e4e !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #spbtn {
    top: auto !important;
    left: auto !important;
  }

  #mpbtn {
    top: auto !important;
    right: auto !important;
  }

  .container {
    height: 50vh;
    padding: 2vw 0;
    margin-top: 10vh;
  }
  .game {
    width: 90vw;
    height: 90vw;
    gap: 2vw;
    max-width: 400px;
    max-height: 400px;
  }
  .box {
    width: 28vw;
    height: 28vw;
    max-width: 120px;
    max-height: 120px;
    font-size: 8vw;
  }
  .msg, .ttt, h1 {
    font-size: 7vw;
  }
  .new-btn, .reset-btn {
    font-size: 3.2vw;
    padding: 0.7em 1.2em;
    margin-top: 5vw;
    font-weight: 400 !important;
  }
  .reset-btn {
    position: fixed !important;
    bottom: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
  }
  .help {
    width: 32px;
    height: 32px;
    font-size: 12px;
    bottom: 10%;
    left: 20px;
  }
  #spbtn, #mpbtn {
    font-size: 5vw;
    padding: 0.5em 0.5em;
  }
  .help:hover {
    font-size: 1em;
    width: 300px;
  }
}

@media (max-width: 600px) {
    body {
        cursor: auto !important;
    }
    
    button, a, input, select, textarea, [role="button"], [tabindex] {
        cursor: pointer !important;
    }
    
    .custom-cursor {
        display: none !important;
    }
    
    .mode-btns {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: fixed !important;
        bottom: 115px !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        gap: 0.7em !important;
        z-index: 1000 !important;
    }

    #spbtn, #mpbtn {
        position: static !important;
        width: 90% !important;
        height: auto !important;
        font-size: 1rem !important;
        padding: 0.8em 0 !important;
        margin: 0.5em auto !important;
        border-radius: 0.5em !important;
        background-color: #4077c9 !important;
        color: #000e4e !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.07) !important;
        display: block !important;
        text-align: center !important;
        box-sizing: border-box !important;
        transform: none !important;
        position: relative;
        overflow: hidden;
        transition: color 0.3s ease;
        clip-path: inset(0 0 0 0);
    }

    .hover-effect {
        position: absolute;
        width: 0;
        height: 0;
        background-color: #000e4e;
        border-radius: 50%;
        left: var(--x, 50%);
        top: var(--y, 50%);
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        z-index: 0;
        pointer-events: none;
    }

    #spbtn:hover, #mpbtn:hover {
        color: #4077c9;
    }

    #spbtn:hover .button-text, #mpbtn:hover .button-text {
        color: #4077c9;
    }

    #spbtn:hover .hover-effect, #mpbtn:hover .hover-effect {
        width: 200%;
        height: 200%;
    }

    .button-text {
        position: relative;
        z-index: 1;
    }

    #spbtn {
        top: auto !important;
        left: auto !important;
    }

    #mpbtn {
        top: auto !important;
        right: auto !important;
    }
}

.new-btn span, .reset-btn span {
    z-index: 1;
    position: relative;
    font-weight: 400 !important;
}

.custom-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    z-index: 2147483647; /* Maximum z-index value */
    will-change: transform;
}

@media (min-width: 601px) {
    body {
        cursor: none;
    }

    .custom-cursor {
        position: fixed;
        width: 30px;
        height: 30px;
        background-color: white;
        border-radius: 50%;
        pointer-events: none;
        mix-blend-mode: difference;
        transform: translate(-50%, -50%);
        z-index: 2147483647; /* Maximum z-index value */
        will-change: transform;
    }
}
