:root {
  --bg-color: #1a1a2e;
  --text-color: #ffffff;
  --primary-color: #e94560;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --font-main: "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-image: url("./imgs/bg.jpg");
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 100%;
  padding: 2vh 0;
  width: 100%;
}

header h1 {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

header p {
  font-size: 1.2rem;
  opacity: 0.8;
  margin: 0;
}

.wheel-container {
  position: relative;
  width: 60vh;
  height: 60vh;
  max-width: 90vw;
  max-height: 90vw;
  margin: 0 auto;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
  overflow: hidden;
}

.wheel-segment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(
    50% 50%,
    50% 0,
    100% 0,
    100% 0
  ); /* Placeholder, will be set by JS */
  transform-origin: 50% 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.segment-label {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 50%;
  transform-origin: bottom center;
}

.segment-label-text {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 1.2rem;
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}


.center-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.pointer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: #fff;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  z-index: 20;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.spin-btn {
  padding: 1.5rem 4rem;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(45deg, #56003C, #E70035);
  border: 2px solid #fff;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.spin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.spin-btn:active {
  transform: translateY(1px);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  color: #333;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 90%;
  width: 400px;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.visible .modal-content {
  transform: scale(1);
}

.modal h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.modal p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.modal button {
  padding: 0.8rem 2rem;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .wheel-container {
    width: 90vw;
    height: 90vw;
    margin: 1rem auto;
  }

  header h1 {
    font-size: 2rem;
  }

  .segment-label {
    font-size: 1.5rem;
  }

  .center-circle {
    width: 80px;
    height: 80px;
  }

  .pointer {
    width: 40px;
    height: 40px;
    top: -20px;
  }

  .spin-btn {
    padding: 1rem 3rem;
    font-size: 1.5rem;
  }
}
