/* ===== Base / Gradient Background ===== */
:root {
  --bg: #03010a;
  --accent-pink: #ff2fb0;
  --accent-purple: #7c3aed;
  --accent-blue: #2563eb;
  --accent-green: #31f7a5;
  --text: #f9fafb;
  --muted: #9ca3af;
  --card: #0a0f1e;
  --card-soft: #101427;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 28px rgba(255, 47, 176, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(124, 58, 237, 0.4), transparent 55%),
    radial-gradient(circle at 90% 10%, rgba(34, 197, 94, 0.33), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(244, 63, 94, 0.45), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.38), transparent 55%),
    radial-gradient(circle at 50% 40%, #050219, #020008 65%, #020005 100%);
  background-attachment: fixed;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.95),
    rgba(2, 6, 23, 0.78),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  box-shadow: var(--shadow-glow);

  background:
    url('Img/logo.png') center/contain no-repeat,
    radial-gradient(circle at 20% 10%, #ffffff, #ff2fb0 40%, #7c3aed 80%);
}


.brand {
  line-height: 1.1;
}
.brand-main {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1rem;
}
.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 0.9rem;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  padding-bottom: 2px;
  transition: color 0.18s ease-out;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
  transition: width 0.18s ease-out;
}

.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  width: 100%;
}

.pill {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  background: radial-gradient(circle at 0 0, #ff2fb0, #7c3aed 60%, #0b0213);
  box-shadow: var(--shadow-glow);
  font-size: 0.82rem;
  color: #fdf2ff;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* ===== Hero (Home) ===== */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.hero-title span {
  background: linear-gradient(
    90deg,
    var(--accent-pink),
    var(--accent-purple),
    var(--accent-blue)
  );
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 36rem;
  margin: 0.25rem auto 1.9rem;
  font-size: 0.98rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
    background 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out;
}

.btn-primary {
  background: linear-gradient(
    90deg,
    var(--accent-pink),
    var(--accent-purple),
    var(--accent-blue)
  );
  border-color: rgba(251, 113, 133, 0.9);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9), var(--shadow-glow);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--muted);
}
.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  color: var(--text);
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.hero-stat-label {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

/* ===== Sections ===== */
section {
  padding: 3.5rem 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 2.4rem;
}

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.section-title span {
  background: linear-gradient(
    90deg,
    var(--accent-pink),
    var(--accent-purple)
  );
  -webkit-background-clip: text;
  color: transparent;
}

.section-description {
  max-width: 34rem;
  margin: 0.5rem auto 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ===== Why Choose ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.feature-card {
  padding: 1.35rem 1.2rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 10% 0, #15172e, #050617 65%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: radial-gradient(circle at 0% 0%, rgba(255, 47, 176, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
  pointer-events: none;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-title {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-text {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ===== Private Games card ===== */
.private-card {
  margin: 0 auto;
  max-width: 720px;
  padding: 1.8rem 1.7rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.35), transparent 55%),
    linear-gradient(to bottom, #050817, #02010b);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.private-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

/* ===== Browse Games – two columns, 2 games per row ===== */
.browse-section {
  padding-top: 4rem;
}

.browse-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
  align-items: flex-start;
}

.browse-column-title {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.browse-column-title span {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* 2 per row in each column */
.game-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

/* Smaller cards */
.game-card {
  padding: 0.7rem;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.18), transparent 60%),
    linear-gradient(to bottom right, #050616, #050313);
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: var(--shadow-soft);
  text-align: center;
  font-size: 0.8rem;
}

.game-thumb {
  width: 110px;
  height: 110px;
  margin: 0 auto 0.45rem;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 20%, #ffffff, #4f46e5 40%, #020617 95%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.3);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.game-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(255, 47, 176, 0.45), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.game-title {
  font-weight: 600;
  margin-bottom: 0.1rem;
  font-size: 0.82rem;
}

.game-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.14em;
  margin-bottom: 0.15rem;
}

.game-stats {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
  font-size: 0.7rem;
  margin-bottom: 0.3rem;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: #041016;
  background: linear-gradient(
    90deg,
    var(--accent-green),
    var(--accent-blue)
  );
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.6);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    filter 0.16s ease-out;
}

.btn-play:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 26px rgba(22, 163, 74, 0.85);
}

/* ===== Account Panel (Private Games page) ===== */
.panel-card {
  margin: 0 auto 2.5rem;
  max-width: 840px;
  padding: 1.7rem 1.6rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.3), transparent 55%),
    linear-gradient(to bottom, #020617, #020010);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.badge-plan {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: linear-gradient(
    90deg,
    var(--accent-pink),
    var(--accent-purple)
  );
  box-shadow: var(--shadow-glow);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 1.1rem;
}

.panel-item-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.panel-item-value {
  font-size: 0.95rem;
}

.panel-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.panel-input-row input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.85rem;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
}

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

/* ===== Auth (Login / Register) ===== */
.auth-wrapper {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 1.9rem 1.7rem 2rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.28), transparent 55%),
    linear-gradient(to bottom, #020617, #020010);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-soft);
}

.auth-title {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.auth-tabs {
  display: flex;
  border-radius: 999px;
  padding: 0.15rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.9);
  margin-bottom: 1.4rem;
}

.auth-tab {
  flex: 1;
  padding: 0.45rem 0;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
  background: transparent;
  transition: background 0.16s ease-out, color 0.16s ease-out;
}

.auth-tab.active {
  background: linear-gradient(
    90deg,
    var(--accent-pink),
    var(--accent-purple)
  );
  color: #fff;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.helper-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ===== Footer ===== */
footer {
  padding: 2.3rem 0 2.6rem;
  border-top: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at 50% 0, #020012, #020008);
  margin-top: 3.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .browse-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    inset: 56px 1.5rem auto 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    background: rgba(3, 7, 18, 0.98);
    box-shadow: var(--shadow-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    transform-origin: top;
    transform: scaleY(0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  }

  .nav-links.open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
  }

  .nav-toggle {
    display: block;
  }
}

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-actions {
    flex-direction: column;
  }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: rgba(30, 30, 30, 0.95);
  border-left: 4px solid var(--accent-blue);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-message {
  flex: 1;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

.toast-success {
  border-left-color: var(--accent-green);
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-warning {
  border-left-color: #f59e0b;
}

.toast-info {
  border-left-color: var(--accent-blue);
}

/* ===== TURNSTILE CONTAINER ===== */
.turnstile-container {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.admin-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.admin-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.admin-tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.admin-content {
  display: none;
}

.admin-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== ADMIN CONTROLS ===== */
.admin-search {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  width: 300px;
  transition: all 0.3s;
}

.admin-search:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.08);
}

.admin-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.admin-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* ===== USERS TABLE ===== */
.users-table-container {
  overflow-x: auto;
  margin-top: 20px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.users-table th {
  padding: 12px 16px;
  text-align: left;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.users-table tbody tr {
  transition: background 0.2s;
}

.users-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.blacklisted-row {
  background: rgba(239, 68, 68, 0.1) !important;
}

.blacklisted-row:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

.password-hash {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  transition: all 0.3s;
}

.password-hash.revealed {
  background: rgba(var(--accent-blue-rgb), 0.2);
  color: var(--accent-blue);
  font-size: 10px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.loading-cell,
.error-cell,
.empty-cell {
  text-align: center;
  padding: 40px !important;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.error-cell {
  color: #ef4444;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-user {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-plan {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blacklisted {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== BUTTONS ===== */
.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-edit {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-edit:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #1a1a1a;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s;
}

@keyframes modalSlideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.readonly-input {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== AUDIT LOGS ===== */
.logs-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

.logs-container::-webkit-scrollbar {
  width: 6px;
}

.logs-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.logs-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.log-entry {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.log-action {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.log-details {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.log-extra {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.log-info {
  border-left-color: #60a5fa;
}

.log-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.log-danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.log-admin {
  border-left-color: #a78bfa;
  background: rgba(139, 92, 246, 0.05);
}

.log-auth {
  border-left-color: #34d399;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .admin-tab {
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-search {
    width: 100%;
  }
  
  .users-table {
    font-size: 12px;
  }
  
  .users-table th,
  .users-table td {
    padding: 8px 10px;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

/* ===== SHOP GAMEPASSES ===== */
.gamepass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gamepass-card {
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.2), transparent 60%),
    linear-gradient(to bottom right, #050616, #050313);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.gamepass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
}

.gamepass-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.gamepass-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.gamepass-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.gamepass-body {
  padding: 1.5rem;
}

.gamepass-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
}

.price-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.price-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green);
}

.price-divider {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.gamepass-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-item {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-green);
}

.gamepass-footer {
  padding: 0 1.5rem 1.5rem;
}

/* ===== PURCHASE HISTORY ===== */
.purchase-history {
  margin-top: 2rem;
}

.purchase-table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.15), transparent 60%),
    linear-gradient(to bottom, #020617, #020010);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.purchase-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.purchase-table thead {
  background: rgba(15, 23, 42, 0.8);
}

.purchase-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.purchase-table td {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.purchase-table tbody tr {
  transition: background 0.2s ease-out;
}

.purchase-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.05);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.status-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.status-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.ranked-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ranked-yes {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.ranked-no {
  background: rgba(148, 163, 184, 0.2);
  color: var(--muted);
}

/* ===== LOADING & EMPTY STATES ===== */
.loading-container {
  text-align: center;
  padding: 3rem 1.5rem;
}

.loading-text {
  font-size: 0.95rem;
  color: var(--muted);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.error-state {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: 0.95rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== RESPONSIVE SHOP ===== */
@media (max-width: 768px) {
  .gamepass-grid {
    grid-template-columns: 1fr;
  }
  
  .gamepass-price {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .price-divider {
    transform: rotate(90deg);
  }
}

/* ===== ENHANCED MODAL STYLES FOR SHOP ===== */

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  padding: 1rem;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { 
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to { 
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

/* Modal Content */
.modal-content {
  background: radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.15), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.15), transparent 60%),
    linear-gradient(to bottom, #0a0f1e, #050617);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7),
              0 0 50px rgba(124, 58, 237, 0.2);
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes modalSlideUp {
  from { 
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to { 
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Modal Close Button */
.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 32px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 1.75rem;
}

.modal-body p {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Info Boxes in Modals */
.modal-info-box {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid;
}

.modal-info-box.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.modal-info-box.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}

.modal-info-box.info {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.modal-info-box.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Loading Spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success/Error Icons */
.modal-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal {
    padding: 0.5rem;
  }

  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-header {
    padding: 1.25rem 1.5rem;
  }

  .modal-header h3 {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Scrollbar for Modal Content */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Purchase Success Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.success-checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #10b981;
  stroke-width: 3;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Pulse Animation for Important Elements */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  }
}

/* Gamepass ID Display */
.gamepass-id-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 1rem;
  font-family: 'Courier New', monospace;
}

.gamepass-id-box strong {
  color: #60a5fa;
}

/* Group Info Card Enhancement */
#groupInfoCard {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: radial-gradient(circle at 0 0, rgba(16, 185, 129, 0.15), transparent 60%),
    linear-gradient(to bottom, #050817, #02010b);
}

#groupInfoCard .panel-title {
  color: #10b981;
}

/* Step Indicators */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

/* Button Loading State */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Enhance existing buttons in modals */
.modal .btn-primary {
  position: relative;
  overflow: hidden;
}

.modal .btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modal .btn-primary:active::before {
  width: 300px;
  height: 300px;
}