@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700&display=swap');

:root {
  --bg-color: #0d0f14;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --x-color: #00f2ff;
  --o-color: #ff007f;
  --text-color: #e0e0e0;
  --accent-color: #38ff42;
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 242, 255, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(255, 0, 127, 0.05) 0px, transparent 50%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav {
  background: rgba(22, 23, 29, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 80px;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 10%;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

.gameContainer {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 50px;
  gap: 80px;
}

.leftContainer {
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, 10vw);
  grid-template-columns: repeat(3, 10vw);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.box {
  border: 1px solid var(--glass-border);
  font-size: 6vw;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.box:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.boxText {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* X Color & Glow */
.boxText.x-marker {
  color: var(--x-color);
  text-shadow: 0 0 10px var(--x-color), 0 0 20px var(--x-color);
}

/* O Color & Glow */
.boxText.o-marker {
  color: var(--o-color);
  text-shadow: 0 0 10px var(--o-color), 0 0 20px var(--o-color);
}

.rightContainer {
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  min-width: 350px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rightContainer h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gameInfo {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info {
  font-size: 1.5rem;
  font-weight: 300;
}

#userType {
  font-weight: 700;
}

.imgBox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
}

.imgBox img {
  width: 0;
  transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 15px var(--accent-color));
}

/* Border visibility cleanup */
.br0 { border-right: 0; }
.bt0 { border-top: 0; }
.bl0 { border-left: 0; }
.bb0 { border-bottom: 0; }

.bRt { border-top-left-radius: 15px; }
.bRb { border-bottom-left-radius: 15px; }
.bRtR { border-top-right-radius: 15px; }
.bRbR { border-bottom-right-radius: 15px; }

#reset {
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  background: white;
  color: #000;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

#reset:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.4);
}

#reset:active {
  transform: translateY(0);
}

.line {
  background: var(--accent-color);
  width: 0;
  height: 4px;
  position: absolute;
  transition: width 0.8s ease-in-out;
  border-radius: 10px;
  box-shadow: 0 0 15px var(--accent-color);
  z-index: 10;
}

#userSelect {
  padding: 10px 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--glass-border);
  font-size: 16px;
  cursor: pointer;
  outline: none;
  width: 100%;
}

#userSelect option {
  background: var(--bg-color);
  color: #fff;
}

#userSelect[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

@media screen and (max-width: 950px) {
  .gameContainer {
    flex-direction: column;
    padding: 20px;
    gap: 40px;
  }

  .leftContainer {
    grid-template-rows: repeat(3, 20vw);
    grid-template-columns: repeat(3, 20vw);
  }

  .rightContainer {
    min-width: 100%;
    text-align: center;
  }
}