input, textarea, select {
  padding: 5px;
  margin-top: 5px;
  border: var(--primary-border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
  margin: 5px;
}

#wheel-title-display {
  display: flex;
  color: var(--text-color);
  font-size: 2rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  text-align: center;
}



#show-leave {
  pointer-events: none;
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--background-color);
  color: var(--text-color);
  border: var(--secondary-border-width) solid var(--border-color);
  padding: 15px 20px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
  width: 80%;
  min-height: 30px;
  z-index: 999;
}


.create-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 600px;
  margin: auto;
  background: var(--button-bg-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: var(--primary-border-width) solid var(--border-color);
  color: var(--button-font-color);
  padding: 10px 0;
}

#wheelOfFortune:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#wheel-container:not(:has(#wheel-creator)) {
  justify-content: center;
  width: auto;
}

#wheel-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  width: auto;
  height: 100%;
  padding-right: 20px;
  left: 10px;
}

#wheel-creator {
  display: flex;
  flex-direction: column;
  width: 45%;
  min-width: 400px;
  max-height: 100%;
  padding: 20px;
  background-color: var(--background-color);
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius);
  z-index: 1;
  margin-right: 10px;
  color: var(--text-color);
  border: var(--primary-border-width) solid var(--border-color);
}

#title-container,
#add-segment-container {
  background: var(--background-color);
  padding: 10px 0;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
}

#segment-list-container {
  background-color: var(--grid-bg-color);
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
  max-height: calc(60vh - 200px);
  padding: 10px 0;
}

.segment {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
}

#wheelOfFortune {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-color);
  border-radius: 50%;
  box-shadow: 0px 0px 20px 1px var(--primary-color);
  z-index: 2;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

#wheel {
  display: block;
  width: 100%;
  height: 100%;
}

#spin {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: bold;
  user-select: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20%;
  height: 20%;
  max-width: 100px;
  max-height: 100px;
  transform: translate(-50%, -50%);
  background: var(--bg-color);
  color: var(--text-color);
  box-shadow: 0 0 0 8px var(--primary-color),
              0 0px 15px 10px rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  z-index: 2;
  flex-direction: column;
}

#spin-multi {
    font-size: clamp(0.8rem, 2vw, 1rem);
}


/* Adjust the pointer triangle to remain proportional */
#spin::after {
  content: "";
  position: absolute;
  top: -17px;
  border: 12px solid transparent;
  border-bottom-color: var(--primary-color); /* white -> var */
  border-top: none;
}

/* Title Section */
#title-section {
  color: var(--text-color);
  margin-bottom: 20px;
  padding: 10px;
}

#bg-color-pickers,
#font-color-pickers {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker-group input[type="color"] {
  width: 30px;
  height: 30px;
  cursor: pointer;
  border: var(--primary-border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color 0.3s;
}

.color-picker-group input[type="color"]:hover {
  border-color: #888; /* Optional: you can define a --hover-border-color if you want */
}

.color-picker-group button {
  background-color: #e74c3c; /* Consider adding a variable for delete/danger buttons */
  color: var(--text-color);
  border: none;
  border-radius: calc(var(--border-radius) / 2);
  cursor: pointer;
  margin-right: 5px;
  font-size: 0.575rem;
  transition: background-color 0.3s;
}

.color-picker-group button:hover {
  background-color: #c0392b; /* Same here for hover-danger if needed */
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}


.fontslider {
  width: 170px;
}

.edit-div {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.edit-button {
  cursor: pointer;
  font-weight: bold;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 20px;
  margin-left: 10px;
  color: var(--text-color);
  display: inline-block;
  font-size: 30px;
  justify-content: center;
  align-items: center;
  display: flex;
  margin-left: auto;
}
.edit-button a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main container */
#wheel-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 600px;
  margin: auto;
  background: var(--bg-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: var(--primary-border-width) solid var(--border-color);
}

.topflex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Profile & Title Section */
#wheel-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  background: var(--primary-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border-bottom: var(--primary-border-width) solid var(--border-color);
}

#wheel-header-box {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.profile-section {
  display: flex;
  align-items: center;
}

.profile-pic {
  width: 50px;
  aspect-ratio: 1 / 1;
  max-width: 100px;
  max-height: 100px;
  border-radius: 50%;
  border: var(--secondary-border-width) solid var(--profile-border-color);
  background: #888; /* fallback for no image */
  overflow: hidden;
  display: flex;
  margin-right: 10px;
  justify-content: center;
  align-items: center;
  box-shadow: 3px 3px 5px 1px var(--bg-color);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Username */
.username a {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--link-color);
  text-decoration: none;
  margin-bottom: 10px;
}

/* Wheel Title */
#wheel-title-display {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  color: var(--text-color);
}


/* Wheel Container */
#wheel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 20px;
}
.flex-container {
  display: flex;
  margin-right: 10px;
}
.column {
  flex-direction: column;
}

/* Wheel */
#wheelOfFortune {
  position: relative;
  /* left: 10px; */
}

/* Wheel Result Display */
#wheel-result {
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--background-color);
  color: var(--text-color);
  border: var(--secondary-border-width) solid var(--border-color);
  padding: 15px 20px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
  width: 80%;
  min-height: 30px;
  z-index: 999;
}

/* Input Groups */
.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.input-group > div {
  display: flex;
  flex-direction: column;
  min-width: 100px;
  flex: 1;
}

.smallinput {
  width: 60px;
  background: var(--bg-color);
  color: var(--text-color);
  border: var(--primary-border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 5px;
}

/* Delete Button */
button.delete {
  background-color: #cc2e2e;
  color: var(--button-font-color);
  padding: 6px 10px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

button.delete:hover {
  background-color: #e44242;
}

/* Controls Section */
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

/* General Button Styles */
button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: var(--button-bg-color);
  color: var(--button-font-color);
  border: var(--primary-border-width) solid var(--button-border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--button-hover-color);
}

button:active {
  background-color: var(--button-active-color);
}


#info-icon {
  cursor: pointer;
  font-weight: bold;
  border: var(--primary-border-width) solid var(--border-color);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 20px;
  margin-left: 10px;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: inline-block;
  font-size: 30px;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 1px 1px 5px 1px var(--bg-color);
  margin-left: auto;
}

#game-info-popup, #tease-window, #login-window {
  position: absolute;
  top: 60px; /* adjust based on your layout */
  right: 20px;
  width: 50vw;
  background: var(--bg-color);
  border: var(--primary-border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0px 4px 8px var(--bg-color);
  color: var(--text-color);
  z-index: 1000;
  padding: 15px;
  left: 25%;
  border-radius: 8px;
}

#game-info-content, #tease-content, #login-content {
  position: relative;
}

#close-info, #tease-close, #login-close {
  position: absolute;
  top: 0;
  right: 5px;
  cursor: pointer;
  font-size: 18px;
}


/* Mobile Adjustments */
@media (max-aspect-ratio: 1/1) {
  #wheel-container {
    flex-direction: column;
    margin: 0;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  #wheel-creator {
    width: 90vw;
    padding: 0;
    margin-bottom: 30px;
  }

  button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }


  #game-info-popup {
    position: absolute;
    top: 60px; /* adjust based on your layout */
    width: 85vw;
    left: 10px;
  }
  


}


