:root {
  --bg: #0a0a0a;
  --panel: #1a1a1a;
  --panel-hover: #252525;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --accent: #4285f4;
  --accent-hover: #3367d6;
  --border: #333;
  --success: #34a853;
  --warning: #fbbc04;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #1a1a1a 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Hide scrollbars in fullscreen mode */
:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
  overflow: hidden !important;
}

.fullscreen-active {
  overflow: hidden !important;
  scrollbar-width: none !important; /* Firefox */
}

.fullscreen-active::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

html.fullscreen-active,
body.fullscreen-active {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}

.fullscreen-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: var(--shadow);
}

.control-btn:hover {
  background: var(--panel-hover);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  color: white;
}

.control-btn:active {
  transform: scale(0.95);
}

/* Winner Popup Styles */
.winner-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: linear-gradient(145deg, var(--panel) 0%, #252525 100%);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  overflow: hidden;
  animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.popup-header {
  background: var(--accent);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s;
}

.close-btn:hover {
  transform: scale(1.2);
}

.popup-body {
  padding: 30px 20px;
  text-align: center;
}

.winner-name {
  font-size: 3rem;
  font-weight: 700;
  margin: 20px 0;
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  font-family: 'Roboto', sans-serif;
}

.popup-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.popup-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 100px;
}

.popup-btn.remove-btn {
  background: #D50F25;
  box-shadow: 0 2px 5px rgba(213, 15, 37, 0.4);
}

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

.popup-btn:disabled:hover,
.popup-btn.disabled:hover {
  transform: none;
  filter: none;
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.popup-btn:active {
  transform: translateY(0);
}

#closePopupBtn {
  background-color: #607d8b;
  color: white;
}

.remove-btn {
  background-color: #3369E8;
  color: white;
}

.remove-all-btn {
  background-color: #D50F25;
  color: white;
}



.app {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  gap: 3rem;
  align-items: center;
}

.wheelBox {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 2rem;
}

canvas {
  background: var(--panel);
  display: block;
  width: 100%;
  max-width: min(95vh, 900px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  box-shadow: var(--shadow), 0 0 80px rgba(66, 133, 244, 0.2), inset 0 0 60px rgba(0, 0, 0, 0.2);
  border: 6px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

canvas:hover {
  box-shadow: var(--shadow), 0 0 100px rgba(66, 133, 244, 0.3), inset 0 0 60px rgba(0, 0, 0, 0.2);
  transform: scale(1.04);
}
.side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 320px;
  max-width: 100%;
  backdrop-filter: blur(10px);
  align-self: center;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 200px;
  transition: all 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.row.between {
  justify-content: space-between;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

button {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(66, 133, 244, 0.4);
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

button:active {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.grow {
  flex: 1;
  width: 100%;
}

.result {
  font-size: 1.5rem;
  font-weight: 700;
  min-height: 3rem;
  letter-spacing: 1px;
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.faded {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .app {
    flex-direction: column;
    gap: 2rem;
  }
  
  .wheelBox {
    min-height: 550px;
    padding: 1rem;
  }
  
  canvas {
    max-width: min(85vh, 700px);
  }
  
  .side {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .side {
    padding: 1.5rem;
  }
  
  .wheelBox {
    min-height: 450px;
    padding: 0.5rem;
  }
  
  canvas {
    max-width: min(85vw, 550px);
  }
  
  h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

@media (max-width: 480px) {
  .app {
    padding: 0.5rem;
  }
  
  .side {
    padding: 1rem;
  }
  
  .wheelBox {
    min-height: 380px;
  }
  
  canvas {
    max-width: min(90vw, 400px);
    border-width: 4px;
  }
  
  textarea {
    min-height: 120px;
  }
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 350px;
  word-wrap: break-word;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-info {
  background: var(--accent);
  color: white;
  border-left: 4px solid #1976d2;
}

.notification-warning {
  background: #ff9800;
  color: white;
  border-left: 4px solid #f57c00;
}

.notification-error {
  background: #f44336;
  color: white;
  border-left: 4px solid #d32f2f;
}

.notification-success {
  background: #4caf50;
  color: white;
  border-left: 4px solid #388e3c;
}

/* Mobile notification adjustments */
@media (max-width: 768px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .notification.show {
    transform: translateY(0);
  }
}
