/* Color variables */
:root {
  --primary-color: #6200ee;
  --primary-hover-color: #5300d6;
  --white: #f4f4f4;
  --black: #333;
  --gray: #ccc;
  --yellow: #ffaf00;
  --red: #ff3d00;
  --green: #6ec207;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* styles.css */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--white);
  color: var(--black);
}

header {
  background-color: var(--primary-color);
  color: #fff;
  width: 100%;
  padding: 1rem;
  text-align: center;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav a {
  /* a game style button */
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.burger-menu {
  display: none;
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

canvas {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  width: 600px;
  height: 600px;
}

#input-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#item-config {
  background-color: var(--white);
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid var(--gray);
  font-size: 1.2rem;
  font-weight: bold;
  resize: none;
}

#item-config:focus {
  outline: none;
}

#input-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

#input-fields button {
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  font-size: 1.5rem;
  border-radius: 5px;
  cursor: pointer;
}

#input-fields button:hover {
  background-color: var(--primary-hover-color);
}

#controls {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
}

#controls button {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#controls button:hover {
  background-color: var(--primary-hover-color);
}

#winner-dialog {
  border: none !important;
  border-radius: 1rem;
  box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1.6rem;
  max-width: 450px;
}

#winner-dialog p {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.winner-title,
#winner-txt {
  font-size: 64px;
  font-weight: bold;
  text-align: center;
  color: var(--black);
  margin: 1rem 0;
}

#winner-txt {
  color: var(--yellow);
}

#winner-dialog div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.divider-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--black);
  text-align: center;
  margin: 1rem 0;
}

#play-again-btn,
.submit-btn,
.close-btn {
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
  margin: 1rem auto 0 auto;

  font-size: 2rem;
  font-weight: bold;
  color: var(--white);
}

.close-btn {
  background-color: var(--red);
}

.close-btn:hover {
  color: var(--gray);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-btn:active {
  transform: scale(0.95);
}

.close-btn:focus {
  outline: none;
}

#play-again-btn {
  background-color: var(--green);
}

#play-again-btn:hover {
  color: var(--gray);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#play-again-btn:active {
  transform: scale(0.95);
}

#play-again-btn:focus {
  outline: none;
}

::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0.75;
}

footer {
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
}

dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--white);
  margin: 0;
}

#button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.login-dialog-btn,
.signup-dialog-btn {
  padding: 0.5rem 1rem;
  background-color: var(--green);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.form-dialog {
  border: none;
  width: 100%;
  max-width: 450px;
  border-radius: 10px;
  padding: 2rem 1rem;
}

.form-dialog h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--black);
  margin: 0 0 2rem 0;
  letter-spacing: -1px;
}

.form-dialog form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: left;
  width: 100%;
}

.form-dialog .input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-dialog label {
  text-align: left;
  font-size: 1.2rem;
  font-weight: bold;
}
.form-dialog input {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--gray);
  border-radius: 5px;
}

.form-dialog input::placeholder {
  color: var(--gray);
  text-transform: capitalize;
}

.form-dialog input:focus {
  outline: none;
  border: 1px solid var(--primary-color);
}

.form-dialog .button-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.form-dialog .submit-btn {
  background-color: var(--primary-color);
}

.hint-txt {
  text-align: right;
  font-size: 0.8rem;
  color: var(--black);
}

.hint-txt .link-btn {
  all: unset;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
}

.error-txt {
  color: var(--red);
  font-size: 0.6rem;
  font-weight: bold;
  height: 20px;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background-color: var(--red);
  color: var(--white);
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

#save-wheel-items {
  list-style: disc inside;
  padding: 0.5rem 1rem;
  border: none;
  display: flex;
  font-weight: 500;
  flex-direction: column;
  gap: 0.2rem;
  height: 200px;
  overflow-y: auto;
  margin: 1rem 0;
}

#saved-wheels-list {
  list-style: disc inside;
  height: 200px;
  border: 1px solid var(--gray);
  overflow-y: auto;
  padding: 0.5rem;
  border-radius: 5px;
  margin-top: 0.5rem;
}

.saved-wheel-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.select-wheel-btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

.delete-wheel-btn {
  padding: 0.5rem 1rem;
  background-color: var(--red);
  color: var(--white);
  border: none;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

.google-btn {
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  gap: 0.5rem;
  background-color: var(--white);

  padding: 12px 16px 12px 42px;
  border: none;
  border-radius: 3px;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.25);

  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

  cursor: pointer;
}

@media screen and (max-width: 768px) {
  nav {
    padding: 0;
  }

  nav h1 {
    font-size: 1.2rem;
  }

  #button-container {
    gap: 0.7rem;
  }

  .login-dialog-btn,
  .signup-dialog-btn {
    font-size: 0.7rem;
    padding: 0.5rem;
  }

  main {
    grid-template-columns: 1fr;
    padding: 0.7rem;
  }

  canvas {
    width: 100%;
    height: 100%;
  }

  #input-container {
    padding: 0.7rem;
  }

  dialog {
    padding: 1rem !important;
    width: calc(100% - 1rem) !important;
  }

  #winner-dialog p {
    font-size: 2rem;
    display: flex;
    flex-direction: column;
  }

  #winner-dialog div {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .close-btn,
  #play-again-btn,
  .submit-btn {
    width: 100%;
    font-size: 1.5rem;
  }
}
