@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg: #090e17;
  --panel: rgba(17, 26, 42, 0.6);
  --text: #f0f4f8;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent2: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.5);
  --danger: #ef4444;
  --success: #10b981;
  --radius: 16px;
  --shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
  --border-light: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

body.bg {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  animation: bg-pulse 15s ease-in-out infinite alternate;
}

@keyframes bg-pulse {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.screen { 
  display: none; 
  min-height: 100vh; 
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active { 
  display: block; 
  opacity: 1;
  transform: translateY(0);
}

.hero-card {
  max-width: 580px;
  margin: 6vh auto;
  padding: 48px 32px;
  text-align: center;
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: float-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.icon-badge {
  width: 80px; height: 80px; margin: 0 auto 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  display: grid; place-items: center;
  font-size: 36px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 0 30px var(--accent-glow);
}

h1, h2, h3 { 
  margin: 0 0 12px; 
  font-weight: 700;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.muted { color: var(--muted); font-size: 15px; line-height: 1.5; }
.center { text-align: center; }

.form {
  margin-top: 32px;
  text-align: left;
}

label { 
  display: block; 
  margin: 16px 0 6px; 
  font-size: 14px; 
  font-weight: 600;
  color: var(--text); 
  letter-spacing: 0.5px;
}

input[type="email"], input[type="password"], input[type="file"], input[type="text"], input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: rgba(0,0,0,0.2);
  color: var(--text);
  caret-color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s ease;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(0,0,0,0.4);
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.5s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(139, 92, 246, 0.4);
}

button:hover:not(:disabled)::after {
  left: 100%;
}

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

button:disabled { opacity: 0.5; cursor: not-allowed; }

.ghost { 
  background: rgba(255,255,255,0.03); 
  border: 1px solid var(--border-light); 
  box-shadow: none; 
}
.ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  box-shadow: none;
}

.danger { 
  background: linear-gradient(135deg, #ef4444, #b91c1c); 
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3); 
}

.note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.small { font-size: 13px; }

.card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}
.dashboard-content {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(9, 14, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
}

.brand { 
  font-weight: 700; 
  font-size: 18px;
  letter-spacing: 0.5px; 
  background: linear-gradient(90deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  margin-right: 16px;
  border: 1px solid rgba(59,130,246,0.3);
}

.list { list-style: none; padding: 0; margin: 16px 0 0; }
.list li {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}
.list li:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
}
.list-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-width: 160px !important;
}
.list-actions button {
  padding: 14px 24px !important;
  font-size: 15px !important;
  width: 100% !important;
  height: auto !important;
}

.id { color: var(--muted); font-size: 12px; font-family: monospace; }
.hidden { display: none !important; }
.full-width { grid-column: 1 / -1; }

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: none;
  max-width: 350px;
  font-weight: 500;
  z-index: 1000;
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.table-card { margin-top: 16px; overflow-x: auto; }
.table-list { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-list th, .table-list td { 
  border-bottom: 1px solid var(--border-light); 
  padding: 12px 10px; 
  font-size: 14px; 
}
.table-list th { text-align: left; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px;}
.table-list td { color: var(--text); }
.table-list tbody tr { transition: background 0.2s; }
.table-list tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-list input[type="checkbox"] { 
  width: 18px; height: 18px; 
  accent-color: var(--accent);
  cursor: pointer;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #60a5fa; text-decoration: underline; }

.block { width: 100%; margin-bottom: 12px; }

/* Subscriptions Premium Look */
#view-subscription .icon-badge {
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(220,38,38,0.2));
  box-shadow: 0 0 40px rgba(245,158,11,0.3);
  border-color: rgba(245,158,11,0.4);
  color: #fbbf24;
}

#view-subscription .card.copy {
  background: linear-gradient(180deg, rgba(30,41,59,0.8), rgba(15,23,42,0.9));
  border: 1px solid rgba(139,92,246,0.4);
  box-shadow: 0 10px 40px rgba(139,92,246,0.15);
}

#view-subscription ul {
  padding-left: 20px;
  color: #cbd5e1;
  line-height: 1.8;
}

#view-subscription ul li::marker {
  color: var(--accent2);
}

/* Nuevos estilos para la versión de stack (Drop zone y lista con resultados integrados) */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin-top: 16px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}
.drop-zone-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}
.stacked-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stacked-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}
.stacked-item-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stacked-item-results {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.5;
}
.stacked-item-results a {
  color: #60a5fa;
  text-decoration: underline;
}
@media (max-width: 768px) {
  .stacked-item {
    grid-template-columns: 1fr;
  }
}
