/* Estilos propios (el resto lo pone Tailwind). Mantiene el look Grixis del diseño original. */
body {
  background-color: #08090d;
  color: #e0e6ed;
  font-family: 'Inter', sans-serif;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 168, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(232, 65, 24, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(140, 122, 230, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}
.font-cinzel { font-family: 'Cinzel', serif; }

.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #0f1118; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #2a2d3d; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #e84118; }

.card-glow-grixis { box-shadow: 0 0 15px rgba(232, 65, 24, 0.15); }

.panel { background: #151722; border: 1px solid #2a2d3d; border-radius: 0.75rem; padding: 1rem; }
.field {
  width: 100%; background: #0c0d12; border: 1px solid #2a2d3d; border-radius: 0.5rem;
  padding: 0.4rem 0.65rem; font-size: 0.75rem; color: #e5e7eb; outline: none; transition: border-color .15s;
}
.field:focus { border-color: #3b82f6; }
.btn { font-size: 0.75rem; font-weight: 600; border-radius: 0.5rem; padding: 0.45rem 0.8rem; transition: background .15s, opacity .15s; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-blue { background: #2563eb; color: #fff; }
.btn-blue:hover:not(:disabled) { background: #3b82f6; }
.btn-grey { background: #2a2d3d; color: #e5e7eb; }
.btn-grey:hover:not(:disabled) { background: #3a3e52; }
.btn-red { background: rgba(127, 29, 29, .4); color: #f87171; border: 1px solid rgba(153, 27, 27, .5); }
.btn-red:hover:not(:disabled) { background: rgba(153, 27, 27, .6); }
.btn-gen { background: linear-gradient(90deg, #dc2626, #9333ea); color: #fff; }
.btn-gen:hover:not(:disabled) { filter: brightness(1.12); }

.mana-pip {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; font-size: 10px; font-weight: bold; margin: 0 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.mana-U { background: #0e68ab; color: #fff; }
.mana-B { background: #150b00; color: #c2b69d; border: 1px solid #4a3e3d; }
.mana-R { background: #d3202a; color: #fff; }
.mana-W { background: #f8e7b9; color: #222; }
.mana-G { background: #00733e; color: #fff; }
.mana-C { background: #ccc2c0; color: #333; }

.chip { font-size: 10px; padding: 2px 8px; border-radius: 999px; border: 1px solid #2a2d3d; background: #0c0d12; color: #9ca3af; display: inline-flex; align-items: center; gap: 4px; }
.chip.ok { color: #6ee7b7; border-color: rgba(16, 185, 129, .4); background: rgba(6, 78, 59, .25); }
.chip.warn { color: #fcd34d; border-color: rgba(245, 158, 11, .4); background: rgba(120, 53, 15, .25); }
.chip.error { color: #fca5a5; border-color: rgba(239, 68, 68, .4); background: rgba(127, 29, 29, .25); }

.badge-own { font-size: 9px; padding: 1px 6px; border-radius: 4px; color: #6ee7b7; background: rgba(6, 78, 59, .45); border: 1px solid rgba(16, 185, 129, .3); }
.badge-miss { font-size: 9px; padding: 1px 6px; border-radius: 4px; color: #fcd34d; background: rgba(120, 53, 15, .4); border: 1px solid rgba(245, 158, 11, .3); }

.tab-btn { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px 8px 0 0; border: 1px solid #2a2d3d; border-bottom: none; background: #0f1118; color: #9ca3af; cursor: pointer; }
.tab-btn:hover { color: #e5e7eb; }
.tab-btn.active { background: #151722; color: #fbbf24; border-color: rgba(251, 191, 36, .4); }

.progress-track { height: 4px; border-radius: 4px; background: #1f2430; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #3b82f6, #a855f7, #ef4444); transition: width .25s; }

.row-empty { border: 1px dashed #3a3e52; color: #6b7280; }

/* Identidad de TOK IA: los cinco colores de Magic + incoloro (blanco, azul, negro, rojo, verde, incoloro). */
.wubrg-text {
  background-image: linear-gradient(90deg, #f8e7b9 0%, #4aa8f0 20%, #a99bd9 40%, #ef4b55 60%, #2fbf7a 80%, #cfc7c4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.wubrg-border {
  background-image: conic-gradient(from 0deg, #f8e7b9 0 60deg, #0e68ab 60deg 120deg, #6b5b95 120deg 180deg, #d3202a 180deg 240deg, #00733e 240deg 300deg, #ccc2c0 300deg 360deg);
}

/* Aviso de error visible (p. ej. nombre de carta no reconocido): caja roja que "tiembla" una vez para llamar la atención. */
.alert-error { background: rgba(127, 29, 29, .35); border: 1px solid rgba(248, 113, 113, .7); color: #fecaca; border-radius: .5rem; padding: .6rem .75rem; font-size: .8rem; font-weight: 600; display: flex; gap: .5rem; align-items: flex-start; animation: alert-shake .5s ease-in-out 1, alert-glow 1.6s ease-out 2; }
.alert-error i { color: #f87171; margin-top: .15rem; }
@keyframes alert-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes alert-glow { 0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .8); } 100% { box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); } }
@media (prefers-reduced-motion: reduce) { .alert-error { animation: none; } }

/* Selector de idioma */
#lang-toggle button { background: transparent; color: #8c9ba5; }
#lang-toggle button[aria-pressed="true"] { background: #2563eb; color: #fff; }
#lang-toggle button:not([aria-pressed="true"]):hover { color: #fff; }
