/* Wheel of Fortune Tool Styles */

.wheel-tool {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.wheel-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  padding: 2rem 1rem;
}

/* Wheel Container */
.wheel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.wheel-pointer {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.wheel-pointer svg {
  width: 40px;
  height: 50px;
}

#wheelCanvas {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
  transition: filter 0.3s ease;
}

/* Spin Button */
.spin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 3rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.spin-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.spin-btn:hover::before {
  width: 300px;
  height: 300px;
}

.spin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.spin-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

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

.spin-btn svg {
  position: relative;
  z-index: 1;
}

.spin-btn span {
  position: relative;
  z-index: 1;
}

/* History Container */
.wheel-history-container {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

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

.history-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.history-clear-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-clear-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.5);
}

.history-list {
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.history-number {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  min-width: 40px;
}

.history-result {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
}

.history-time {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.history-empty {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
}

/* Result Popup */
.result-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-popup.show {
  opacity: 1;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.popup-content {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.result-popup.show .popup-content {
  transform: scale(1);
}

.popup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.popup-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.popup-body {
  text-align: center;
  margin-bottom: 2rem;
}

.result-icon {
  margin-bottom: 1.5rem;
  animation: scaleIn 0.5s ease;
}

.result-icon svg {
  stroke: #4ade80;
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.result-text {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  padding: 1.5rem;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid #4ade80;
  border-radius: 16px;
  word-break: break-word;
  animation: fadeIn 0.5s ease 0.2s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* Options Drawer Specific Styles */
.option-toggle {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 4px;
}

.toggle-btn {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toggle-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-input {
  flex: 1;
  padding: 0.75rem;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.item-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(102, 126, 234, 0.5);
}

.item-delete-btn {
  padding: 0.75rem;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-delete-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.5);
}

.item-delete-btn svg {
  stroke: #ff6b6b;
}

.add-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: rgba(102, 126, 234, 0.2);
  border: 1px dashed rgba(102, 126, 234, 0.5);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-item-btn:hover {
  background: rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .wheel-main {
    padding: 1rem 0.5rem;
    gap: 1.5rem;
  }

  #wheelCanvas {
    width: 100%;
    max-width: 400px;
  }

  .spin-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  .wheel-history-container {
    padding: 1rem;
  }

  .history-header h3 {
    font-size: 1.1rem;
  }

  .history-clear-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .history-list {
    max-height: 120px;
  }

  .history-item {
    padding: 0.5rem;
  }

  /* Fullscreen modda geçmiş kutusu */
  body.fullscreen .history-list {
    max-height: 100px;
  }

  .popup-content {
    padding: 2rem 1.5rem;
  }

  .popup-header h2 {
    font-size: 1.5rem;
  }

  .result-text {
    font-size: 1.5rem;
    padding: 1rem;
  }

  .popup-actions {
    flex-direction: column;
  }

  .popup-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #wheelCanvas {
    max-width: 320px;
  }

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

  .result-text {
    font-size: 1.25rem;
  }
}
