/**
 * giveaways.css - Estilos premium para el Gestor de Sorteos & Giveaways Live
 */

:root {
  --giveaway-pink: #ec4899;
  --giveaway-pink-glow: rgba(236, 72, 153, 0.4);
  --giveaway-purple: #a855f7;
  --giveaway-bg-card: rgba(18, 10, 28, 0.7);
  --giveaway-border: rgba(236, 72, 153, 0.25);
}

.giveaway-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .giveaway-grid {
    grid-template-columns: 1fr;
  }
}

.card-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.giveaway-card {
  background: var(--giveaway-bg-card);
  border: 1px solid var(--giveaway-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card-header-styled {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-header-styled h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-magenta {
  background: var(--giveaway-pink);
  box-shadow: 0 0 10px var(--giveaway-pink);
}

.dot-cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-pill.status-open {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  animation: pulsePill 2s infinite;
}

.status-pill.status-closed {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

@keyframes pulsePill {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.giveaway-form .form-group {
  margin-bottom: 1rem;
}

.giveaway-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.input-prefix-box {
  display: flex;
  align-items: center;
  position: relative;
}

.input-prefix-box .prefix {
  position: absolute;
  left: 0.85rem;
  font-weight: 800;
  color: var(--giveaway-pink);
  pointer-events: none;
}

.input-prefix-box input {
  padding-left: 1.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.btn-roll-big {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border: 1px solid #f472b6;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-roll-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(236, 72, 153, 0.6);
  filter: brightness(1.1);
}

.btn-roll-big:active {
  transform: translateY(1px);
}

.action-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Winner Card */
.winner-card {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(145deg, rgba(28, 18, 10, 0.7), rgba(15, 8, 22, 0.7));
}

.winner-display-box {
  min-height: 140px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.winner-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 320px;
}

.winner-empty p {
  margin-top: 0.5rem;
  line-height: 1.4;
}

.winner-active-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  animation: popWinner 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popWinner {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #1e1b4b;
  color: #fbbf24;
  font-weight: 800;
}

.winner-username {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  letter-spacing: -0.02em;
}

.winner-sub-badge {
  font-size: 0.75rem;
  background: rgba(147, 51, 234, 0.3);
  color: #c084fc;
  border: 1px solid #a855f7;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
}

.winner-actions-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Participants List */
.count-badge {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--accent-cyan);
  color: #38bdf8;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.participants-list-box {
  max-height: 280px;
  min-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.25rem;
}

.participants-list-box::-webkit-scrollbar {
  width: 6px;
}

.participants-list-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.participant-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(236, 72, 153, 0.3);
}

.participant-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.participant-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #312e81;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.participant-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #f1f5f9;
}

.participant-tickets {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 700;
}

.participant-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.participant-remove-btn:hover {
  color: #f87171;
}

/* History Box */
.winners-history-box {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.history-winner-name {
  font-weight: 700;
  color: #fbbf24;
}

.history-prize {
  color: var(--text-dim);
  font-size: 0.72rem;
}

/* Autocomplete Dropdown en Sorteos */
.giveaway-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0f1322;
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(236, 72, 153, 0.2);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}

.giveaway-autocomplete-item:hover {
  background: rgba(236, 72, 153, 0.15) !important;
}
