:root {
  --primary-color: #9fff00;
  --primary-hover: #8aff00;
  --dark-bg: #000000;
  --modal-bg: #18181b;
  --text-color: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-color);
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  overflow: hidden;
}

/* Header */
header {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #27272a;
}

header h1 {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  color: #71717a;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Logo */
.logo {
  text-align: center;
  margin: 3rem 0;
}

.logo h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.logo p {
  color: #71717a;
}

.green {
  color: var(--primary-color);
}

/* Wheel */
.wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 2rem;
}

.wheel {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 12px solid #977623;
  box-shadow: 0 0 50px rgba(159, 255, 0, 0.2);
  transition: transform 5s cubic-bezier(0.4, 0, 0.2, 1);
  background: conic-gradient(
    from 0deg,
    #fbbf24 60deg,
    #27272a 60deg 120deg,
    #fbbf24 120deg 180deg,
    #27272a 180deg 240deg,
    #fbbf24 240deg 300deg,
    #27272a 300deg
  );
}

.wheel-item {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  transform-origin: 50% 50%;
}

.wheel-item::before {
  content: attr(data-prize);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  transform: rotate(-90deg);
  white-space: nowrap;
  padding: 0 1rem;
  padding-top: 24px;
}

.pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  transform: translateX(-50%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  box-shadow: 0 0 10px rgba(159, 255, 0, 0.5);
  z-index: 10;
}

/* Buttons */
.buttons {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spin-btn,
.history-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.spin-btn {
  background: var(--primary-color);
  color: black;
}

.spin-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 20px rgba(159, 255, 0, 0.3);
}

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

.history-btn {
  background: #27272a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.history-btn:hover {
  background: #3f3f46;
}

.rules-link {
  color: var(--primary-color);
  text-align: center;
  text-decoration: none;
  padding: 0.5rem;
  display: block;
}

.rules-link:hover {
  color: var(--primary-hover);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--modal-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.prize-text {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 1rem 0;
}

.camera-container {
  background: #27272a;
  padding: 2rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.camera-icon {
  color: var(--primary-color);
}

.claim-btn,
.verify-btn,
.scan-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: black;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.claim-btn:hover,
.verify-btn:hover,
.scan-btn:hover {
  background: var(--primary-hover);
}

.close-modal-btn {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0.5rem;
}

.close-modal-btn:hover {
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
