:root {
  --bg: linear-gradient(135deg, #000b2c, #000d31);
  --card: rgb(0, 19, 59);
  --accent: #00ff40;
  --text: #eeff00;
  --glass: rgba(255,255,255,0.05);
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* CARD MENSAJE EN ESQUINA */
.empty-card {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card);
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  color: var(--accent);
  font-weight: bold;
  max-width: 200px;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.empty-card.show {
  opacity: 1;
  transform: translateY(0);
}


/* HEADER */
.main-header {
  width: 100%;
  max-width: 1200px;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #00ccff, #0084ff);
  color: #eeff00;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-radius: 12px;
  margin-bottom: 20px;
}

.main-header .logo {
  font-size: 24px;
}

.main-header nav a {
  margin-left: 20px;
  color: #eeff00;
  text-decoration: none;
  transition: all 0.3s ease;
}

.main-header nav a:hover {
  color: #ff00ff;
  transform: scale(1.05);
}

/* APP */
.app {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 20px;
}

.wheel-wrap {
  background: var(--card);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

#wheel {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  margin: 0 auto;
}

.pointer {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid var(--accent);
  margin: 10px auto;
}

.controls {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

button, input {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

button.primary {
  background: var(--accent);
  color: #021226;
  cursor: pointer;
}

button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.segments {
  margin-top: 10px;
  max-height: 430px;
  overflow-y: auto;
}

.item {
  padding: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  margin-bottom: 5px;
}

/* OVERLAY GANADOR */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: var(--card);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  animation: pop 0.4s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.overlay-content h1 {
  color: var(--accent);
  font-size: 32px;
}

.overlay-content h2 {
  color: #eeff00;
  margin-top: 10px;
}

.overlay-content button {
  margin-top: 20px;
  background: var(--accent);
  padding: 10px 20px;
  color: #021226;
  border-radius: 8px;
  cursor: pointer;
}

/* FOOTER */
.main-footer {
  width: 100%;
  max-width: 1200px;
  padding: 15px 40px;
  background: linear-gradient(90deg, #00c3ff, #0084ff);
  color: #eeff00;
  text-align: center;
  margin-top: 40px;
  border-radius: 12px;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.main-footer .socials i {
  margin-left: 10px;
  color: #eeff00;
  font-size: 28px; 
  transition: all 0.3s ease;
}

.main-footer .socials i:hover {
  color: #ff00ff;
  transform: scale(1.2);
}

/* CARD MENSAJE EN ESQUINA */
.empty-card {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card);
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  color: var(--accent);
  font-weight: bold;
  max-width: 200px;
  text-align: center;
  z-index: 1000;
  display: none;
}

.empty-card.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  0% {opacity: 0; transform: translateY(20px);}
  100% {opacity: 1; transform: translateY(0);}
}

/* RESPONSIVIDAD */
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; gap: 15px; }
  #wheel { max-width: 400px; }
}

@media (max-width: 768px) {
  .controls { flex-direction: column; gap: 10px; }
  .controls input, .controls button { width: 100%; font-size: 16px; }
  .sidebar { max-height: 250px; overflow-y: auto; }
  .main-header, .main-footer { flex-direction: column; text-align: center; gap: 10px; }
  .main-footer .socials { margin-top: 10px; }
}

@media (max-width: 480px) {
  #wheel { max-width: 300px; }
  .pointer { border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 20px solid var(--accent); }
  .empty-card { max-width: 150px; padding: 10px 15px; font-size: 14px; }
}
