
:root {
  --bg: #020617;
  --bg-soft: #030712;
  --bg-card: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.96);
  --border-subtle: rgba(148, 163, 184, 0.45);
  --primary: #6366f1;
  --primary-soft: rgba(99, 102, 241, 0.18);
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.2);
  --danger: #f97373;
  --success: #22c55e;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius-xl: 1.4rem;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.8);
  --shadow-strong: 0 32px 80px rgba(0, 0, 0, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #020617 100%);
}

/* ========= Layout ========= */

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
}

/* ========= Landing ========= */

body.landing {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.98));
  border-radius: 1.8rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
  padding: 2rem 2.4rem;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-title span.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #22d3ee, #6366f1);
  color: #020617;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.8);
}

.hero-sub {
  margin-top: 0.6rem;
  color: var(--muted);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* ========= Buttons ========= */

.btn {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: transparent;
  transition: all 0.16s ease-out;
}

.btn-icon {
  font-size: 1.1rem;
}

.btn.primary {
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: white;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.7);
}

.btn.outline {
  border-color: var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
}

.btn.outline:hover {
  border-color: rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.7);
}

/* ========= Cards & panels ========= */

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.4rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========= Tabs ========= */

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.15rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  margin-bottom: 1rem;
  width: fit-content;
}

.tab {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.85), rgba(37, 99, 235, 0.95));
  color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.7);
}

/* ========= Form elemek ========= */

.field {
  margin-bottom: 0.7rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

input, select, textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background: #020617;
  color: var(--text);
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}

/* ========= Status / badge ========= */

.status {
  font-size: 0.8rem;
  margin-top: 0.3rem;
  color: var(--muted);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.pity {
  background: rgba(248, 250, 252, 0.08);
  border: 1px solid #f97316;
  color: #fed7aa;
}

/* ========= Player Hub specifikus ========= */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Inventory grid */

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 0.6rem;
}

.card-item {
  border-radius: var(--radius-lg);
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(30, 64, 175, 0.6);
  background: linear-gradient(145deg, #020617, #020617, #0b1120);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.card-item-name {
  font-weight: 600;
}

.card-item-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

.card-item-qty {
  font-size: 0.8rem;
}

.card-rarity-legendary {
  border-color: #f97316;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.6);
}

.card-rarity-epic {
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6);
}

.card-rarity-rare {
  border-color: #3b82f6;
}

.card-rarity-common {
  border-color: rgba(148, 163, 184, 0.6);
}

.card-thumb {
  width: 100%;
  border-radius: 0.7rem;
  margin-top: 0.25rem;
}

/* ========= Modal (pack opening) ========= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.98));
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-backdrop.visible {
  display: flex;
}

.modal {
  width: min(720px, 96vw);
  border-radius: 1.6rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.3), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow-strong);
  padding: 1.5rem 1.6rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-pack-logo {
  width: 140px;
  height: 180px;
  border-radius: 1.1rem;
  background: conic-gradient(from 180deg, #22d3ee, #6366f1, #f97316, #22c55e, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.85);
  animation: pack-float 1.8s ease-in-out infinite;
}

@keyframes pack-float {
  0% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}

.modal-cards {
  flex: 1;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-card {
  width: 120px;
  height: 170px;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #020617, #020617, #0b1120);
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) rotateY(60deg);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out, border-color 0.2s ease-out;
}

.modal-card.revealed {
  opacity: 1;
  transform: translateY(0) rotateY(0deg);
}

.modal-card img {
  width: 70px;
  height: 70px;
  border-radius: 0.55rem;
  object-fit: cover;
  margin-bottom: 0.15rem;
}

/* Rare glow in modal */

.modal-card.legendary {
  border-color: #f97316;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.8);
}

.modal-card.epic {
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.8);
}

.modal-card.rare {
  border-color: #3b82f6;
}

/* ========= Admin specifikus ========= */

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.list {
  max-height: 320px;
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid rgba(31, 41, 55, 0.96);
}

.row {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.row:hover {
  background: rgba(15, 23, 42, 0.85);
}
