/* ==========================================================================
   Roblox Collection - Clean, Minimalist Flat Dark Theme
   High Contrast, Responsive, Zero Glow Clutter
   ========================================================================== */

:root {
  /* Flat Minimalist Dark Palette */
  --bg: #0d0e12;
  --surface: #161720;
  --surface-2: #1e1f2b;
  --surface-hover: #262838;
  
  --line: #2b2d3d;
  --line-subtle: #20222f;
  --line-focus: #4e526d;
  
  --text: #f3f4f8;
  --text-secondary: #a0a4b8;
  --text-muted: #6f738a;
  --muted: #6f738a;
  
  --gold: #e5aa17;
  --gold-bg: rgba(229, 170, 23, 0.12);
  --teal: #2ec4b6;
  --teal-bg: rgba(46, 196, 182, 0.12);
  --red: #eb5757;
  --red-bg: rgba(235, 87, 87, 0.12);
  --blue: #4a88f7;
  
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 12px 32px rgba(0, 0, 0, 0.6);
  
  --transition: all 0.15s ease-in-out;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   1. Top Navigation Bar (Header)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: auto;
}

html[dir="rtl"] .header-nav {
  margin-right: 0;
  margin-left: auto;
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(229, 170, 23, 0.3);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-icon {
  transform: scale(1.08) rotate(-2deg);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-accent {
  color: var(--gold);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-lang-toggle {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-lang-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-lang-toggle .lang-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.btn-lang-toggle .lang-text {
  font-weight: 700;
}

.header-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: var(--transition);
}

.header-stat-badge:hover {
  border-color: var(--line-focus);
  background: var(--surface-hover);
}

.header-stat-icon {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-stat-text {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   2. Main Container & Home View Styles
   ========================================================================== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

/* Home Hero Card */
.home-hero {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(22, 23, 32, 0.95) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.home-hero-logo {
  margin-bottom: 1.25rem;
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
}

.home-hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(205, 106, 23, 0.3));
}

.home-hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

/* ==========================================================================
   Hero Stats Strip (Codes, Games, Working Rate)
   ========================================================================== */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: 620px;
  margin: 1.5rem auto 0;
  width: 100%;
}

.hero-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.hero-stat-card:hover {
  border-color: var(--line-focus);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.hero-stat-icon-wrap {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.hero-stat-icon-wrap.stat-icon-bolt {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(229, 170, 23, 0.25);
}

.hero-stat-icon-wrap.stat-icon-games {
  color: var(--teal);
  background: var(--teal-bg);
  border-color: rgba(46, 196, 182, 0.25);
}

.hero-stat-icon-wrap.stat-icon-shield {
  color: #7289da;
  background: rgba(114, 137, 218, 0.12);
  border-color: rgba(114, 137, 218, 0.25);
}

.hero-stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.hero-stat-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-hero-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* Home Sections */
.home-section {
  margin-bottom: 3.5rem;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Services Grid & Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-focus);
}

.service-card-featured {
  border-color: rgba(229, 170, 23, 0.4);
  background: linear-gradient(180deg, rgba(229, 170, 23, 0.04) 0%, var(--surface) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.service-card-featured:hover {
  border-color: var(--gold);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.service-icon-box.featured-icon {
  background: var(--gold-bg);
  border-color: rgba(229, 170, 23, 0.35);
}

.service-logo-svg {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-live {
  background: rgba(46, 196, 182, 0.12);
  color: var(--teal);
  border: 1px solid rgba(46, 196, 182, 0.3);
}

.status-live .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
}

.status-soon {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.status-soon .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.service-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.service-summary {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.service-card-footer {
  margin-top: auto;
}

.btn-service-action {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Comprehensive Site Footer & Contact Section
   ========================================================================== */
.app-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.footer-container {
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand-logo {
  cursor: pointer;
  align-self: flex-start;
  transition: var(--transition);
}

.footer-brand-logo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 360px;
}

.footer-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.author-highlight {
  color: var(--gold);
  font-weight: 700;
}

.footer-contact-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer-subheading {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.contact-cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  transition: var(--transition);
}

.contact-card:hover {
  background: var(--surface-2);
  border-color: var(--line-focus);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.contact-card-icon-box {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.contact-card-icon-box svg {
  width: 18px;
  height: 18px;
}

.email-icon-box {
  background: rgba(234, 67, 53, 0.12);
  color: #EA4335;
  border: 1px solid rgba(234, 67, 53, 0.25);
}

.discord-icon-box {
  background: rgba(88, 101, 242, 0.12);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.25);
}

.contact-card:hover .email-icon-box {
  background: rgba(234, 67, 53, 0.2);
  border-color: rgba(234, 67, 53, 0.4);
}

.contact-card:hover .discord-icon-box {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.4);
}

.contact-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex-grow: 1;
  min-width: 0;
}

.contact-type-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1;
}

.contact-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

.contact-text-highlight {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7289DA;
  letter-spacing: 0.02em;
}

.btn-copy-contact {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.btn-copy-contact:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-copy-contact.copied {
  background: rgba(0, 194, 168, 0.15);
  border-color: var(--teal);
  color: var(--teal);
}

.footer-bottom-row {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-bottom-legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .app-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-brand-desc {
    max-width: 100%;
    font-size: 0.825rem;
  }

  .contact-card {
    padding: 0.5rem 0.75rem;
    gap: 0.65rem;
  }

  .contact-card-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 7px;
  }

  .contact-card-icon-box svg {
    width: 16px;
    height: 16px;
  }

  .contact-type-label {
    font-size: 0.65rem;
  }

  .contact-link {
    font-size: 0.78rem;
  }

  .contact-text-highlight {
    font-size: 0.8rem;
  }

  .btn-copy-contact {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }
}

/* Sub-page Hero for Grid */
.hero-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   3. Search Toolbar
   ========================================================================== */
.search-toolbar {
  margin-bottom: 1.5rem;
  width: 100%;
}

.search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.95rem;
}

.input-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.85rem 2.5rem 0.85rem 2.75rem;
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.925rem;
  transition: var(--transition);
  min-height: 46px;
}

.input-search:focus {
  outline: none;
  border-color: var(--line-focus);
  background: var(--surface-2);
}

.input-search::placeholder {
  color: var(--text-muted);
}

.btn-clear-input {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.btn-clear-input:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--line-focus);
}

/* ==========================================================================
   4. View Section Switching
   ========================================================================== */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* ==========================================================================
   5. Game Card Grid & Card UI
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-focus);
}

/* Top Thumbnail Banner */
.game-card-top {
  position: relative;
  width: 100%;
  height: 140px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.game-thumbnail {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail-img {
  transform: scale(1.04);
}

.game-thumbnail.is-fallback .game-thumbnail-img {
  display: none;
}

.game-thumbnail-fallback-content {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b1c26 0%, #252738 100%);
}

.game-thumbnail.is-fallback .game-thumbnail-fallback-content {
  display: flex;
}

.game-fallback-emoji {
  font-size: 2.75rem;
  user-select: none;
  line-height: 1;
}

.game-card-badge-overlay {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}

.game-card-badge-overlay .badge {
  background: rgba(9, 10, 14, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* Game Card Body */
.game-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-mini-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.game-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.game-icon-wrapper.fallback-mode,
.game-mini-icon.fallback-mode,
.game-detail-icon.fallback-mode {
  background: var(--surface-2);
}

.game-icon-wrapper .game-icon-img,
.game-icon-wrapper .game-icon-text {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-icon-wrapper .game-icon-text {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.game-mini-icon .game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-mini-icon .game-icon-text {
  font-size: 1.35rem;
  line-height: 1;
  user-select: none;
}

.game-title-wrap {
  min-width: 0;
  flex: 1;
}

.game-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-updated-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
  font-weight: 500;
}

.timestamp-icon {
  font-size: 0.72rem;
  opacity: 0.85;
}

.game-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.game-rate-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-bg);
  border: 1px solid rgba(46, 196, 182, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.game-rate-badge.rate-low {
  color: var(--red);
  background: var(--red-bg);
  border-color: rgba(235, 87, 87, 0.25);
}

.game-rate-badge.rate-med {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(229, 170, 23, 0.25);
}

.game-rate-badge.rate-none {
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--line);
}

.btn-view-codes {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s ease;
}

.game-card:hover .btn-view-codes {
  transform: translateX(2px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-active {
  background: var(--teal-bg);
  color: var(--teal);
  border: 1px solid rgba(46, 196, 182, 0.3);
}

.badge-unknown {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.badge-expired {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(235, 87, 87, 0.3);
}

.badge-new {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(229, 170, 23, 0.35);
}

/* ==========================================================================
   6. Game Detail View & Code Tickets
   ========================================================================== */
.detail-back-bar {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0;
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--text);
  transform: translateX(-2px);
}

/* Detail Hero */
.game-detail-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.game-detail-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 1;
}

.game-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  opacity: 0.85;
  z-index: 1;
}

.game-detail-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.game-detail-icon {
  width: 80px;
  height: 80px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-detail-icon .game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-detail-icon .game-icon-text {
  font-size: 2.5rem;
  line-height: 1;
  user-select: none;
}

.game-detail-info {
  flex: 1;
  min-width: 260px;
}

.game-detail-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.game-detail-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
  max-width: 720px;
  line-height: 1.5;
}

.game-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #0d0e12;
}

.btn-primary:hover {
  background: #f0b522;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
}

/* Filter Bar & Code Search */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
}

.filter-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.825rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.filter-tab.active {
  background: var(--gold);
  color: #0d0e12;
  font-weight: 700;
}

.code-search-box {
  min-width: 220px;
  max-width: 320px;
}

/* Tickets List */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Flat Minimalist Ticket Card */
.ticket-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  position: relative;
  display: grid;
  grid-template-columns: 290px 1fr auto;
  align-items: center;
  transition: var(--transition);
  overflow: hidden;
}

.ticket-card:hover {
  border-color: var(--line-focus);
}

.ticket-card.expired {
  opacity: 0.65;
}

.ticket-code-section {
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
}

.code-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  user-select: all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.btn-copy {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: var(--gold);
  color: #0d0e12;
  border-color: var(--gold);
}

.btn-copy.copied {
  background: var(--teal);
  color: #072320;
  border-color: var(--teal);
}

.ticket-status-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ticket-details {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ticket-reward {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Success Rate Badge */
.badge-rate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-rate.rate-high {
  background: var(--teal-bg);
  color: var(--teal);
  border: 1px solid rgba(46, 196, 182, 0.25);
}

.badge-rate.rate-med {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(229, 170, 23, 0.25);
}

.badge-rate.rate-low {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(235, 87, 87, 0.25);
}

/* Voting Actions (👍 / 👎) */
.ticket-actions {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.vote-btn:hover {
  color: var(--text);
  border-color: var(--line-focus);
  background: var(--surface-hover);
}

.vote-btn.active-up {
  background: rgba(46, 196, 182, 0.15);
  color: var(--teal);
  border-color: rgba(46, 196, 182, 0.4);
}

.vote-btn.active-down {
  background: rgba(235, 87, 87, 0.15);
  color: var(--red);
  border-color: rgba(235, 87, 87, 0.4);
}

.vote-btn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   7. Empty & Loading States
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.25rem;
  margin-bottom: 0.65rem;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  width: 100%;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.loading-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   8. Modal Dialog & Forms
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 15, 0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  box-shadow: var(--shadow-modal);
  transform: scale(0.97);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--line-focus);
  background: var(--surface-hover);
}

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

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--line-focus);
}

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.share-btn-option {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.825rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn-option:hover {
  border-color: var(--line-focus);
  background: var(--surface-hover);
}

/* How-To Redeem Modal (Pure Image Viewer) */
.how-to-modal-card {
  max-width: 680px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem;
}

.howto-content {
  display: flex;
  flex-direction: column;
}

.howto-media-container {
  width: 100%;
}

.howto-image-wrapper {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.howto-guide-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.howto-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  text-align: center;
}

.howto-empty-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.howto-empty-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   9. Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  color: var(--text);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideToast 0.25s ease forwards;
  pointer-events: auto;
}

.toast-teal {
  border-left-color: var(--teal);
}

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

/* ==========================================================================
   11. Responsive Media Queries & Mobile Optimizations
   ========================================================================== */
@media (max-width: 992px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .ticket-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  
  .ticket-code-section {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
  }

  .code-box {
    min-height: 46px;
    padding: 0.5rem 0.75rem;
  }

  .btn-copy {
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }

  .ticket-details {
    padding: 1rem;
  }

  .ticket-actions {
    border-top: 1px solid var(--line-subtle);
    padding: 0.85rem 1rem;
    justify-content: flex-end;
    background: var(--surface-2);
  }

  .vote-btn {
    min-height: 42px;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
  }

  .header-stat-badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .app-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  .header-container {
    padding: 0.65rem 0.9rem 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0;
  }

  .header-left {
    order: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .header-right {
    order: 2;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
  }

  html[dir="rtl"] .header-right {
    margin-left: 0;
    margin-right: auto;
  }

  .btn-lang-toggle {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .header-nav {
    order: 3;
    width: 100%;
    margin: 0.35rem 0 0 0;
    padding-top: 0.45rem;
    border-top: 1px solid var(--line-subtle);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  html[dir="rtl"] .header-nav {
    margin: 0.35rem 0 0 0;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.45rem 0.5rem;
    font-size: 0.825rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-secondary);
  }

  .nav-link.active {
    color: var(--gold);
    background: var(--gold-bg);
    border-color: rgba(229, 170, 23, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  }

  .nav-link:active {
    transform: scale(0.97);
  }

  .main-content {
    padding: 1rem 0.85rem 3rem;
  }

  .home-hero {
    padding: 1.75rem 1rem;
    border-radius: var(--radius-md);
  }

  .home-hero-logo {
    width: 58px;
    height: 58px;
    border-radius: 13px;
    margin-bottom: 0.85rem;
  }

  .home-hero-title {
    font-size: 1.45rem;
    letter-spacing: -0.01em;
  }

  .home-hero-subtitle {
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  .hero-stats-row {
    gap: 0.45rem;
    margin-top: 1rem;
  }

  .hero-stat-card {
    padding: 0.5rem 0.45rem;
    gap: 0.4rem;
    border-radius: var(--radius-sm);
  }

  .hero-stat-icon-wrap {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.825rem;
    border-radius: 7px;
  }

  .hero-stat-value {
    font-size: 0.78rem;
  }

  .hero-stat-label {
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }

  .home-section {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .section-desc {
    font-size: 0.85rem;
  }

  .service-card {
    padding: 1.25rem 1rem;
  }

  .service-title {
    font-size: 1.1rem;
  }

  .service-summary {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .btn-service-action {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .hero-section {
    padding: 1.35rem 1rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.825rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .game-card:active {
    transform: scale(0.985);
  }

  .game-card-top {
    height: 130px;
  }

  .game-card-body {
    padding: 1rem;
  }

  .btn-back {
    min-height: 42px;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .game-detail-hero {
    padding: 1.15rem;
    margin-bottom: 1.15rem;
  }

  .game-detail-content {
    flex-direction: column;
    gap: 1rem;
  }

  .game-detail-icon {
    width: 64px;
    height: 64px;
  }

  .game-detail-title {
    font-size: 1.35rem;
  }

  .game-detail-desc {
    font-size: 0.85rem;
  }

  .game-detail-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .game-detail-actions .btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .code-search-box {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .ticket-card {
    border-radius: var(--radius-md);
  }

  .code-box {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .code-text {
    font-size: 0.9rem;
  }

  .btn-copy {
    min-height: 42px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .ticket-actions {
    justify-content: space-between;
    gap: 0.5rem;
  }

  .vote-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 0.875rem;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
  }

  .modal-overlay.active .modal-card {
    transform: translateY(0);
  }

  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .toast-container {
    left: 0.85rem;
    right: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    padding: 0.75rem 1rem;
    font-size: 0.825rem;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .hero-stat-card {
    padding: 0.45rem 0.35rem;
    gap: 0.3rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-stat-icon-wrap {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .hero-stat-info {
    align-items: center;
    gap: 0.05rem;
  }

  .hero-stat-value {
    font-size: 0.75rem;
  }

  .hero-stat-label {
    font-size: 0.54rem;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 360px) {
  .brand-name {
    font-size: 0.95rem;
  }

  .btn-lang-toggle {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }

  .nav-link {
    padding: 0.35rem 0.45rem;
    font-size: 0.75rem;
  }

  .home-hero-title {
    font-size: 1.25rem;
  }

  .hero-stat-value {
    font-size: 0.7rem;
  }

  .hero-stat-label {
    font-size: 0.5rem;
  }
}

/* ==========================================================================
   Arabic (RTL) Localization Styles
   ========================================================================== */
html[dir="rtl"],
html[dir="rtl"] body {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .brand-name {
  letter-spacing: normal;
}

/* Search Box in RTL */
html[dir="rtl"] .search-icon {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .btn-clear-input {
  right: auto;
  left: 0.75rem;
}

html[dir="rtl"] .input-search {
  padding: 0.85rem 2.75rem 0.85rem 2.5rem;
  text-align: right;
}

/* Back button in RTL */
html[dir="rtl"] .detail-back-bar,
html[dir="rtl"] .btn-back {
  text-align: right;
}

html[dir="rtl"] .btn-back:hover {
  transform: translateX(2px);
}

/* Ticket Card in RTL */
html[dir="rtl"] .ticket-card {
  text-align: right;
}

@media (min-width: 861px) {
  html[dir="rtl"] .ticket-code-section {
    border-right: none;
    border-left: 1px solid var(--line);
  }
}

html[dir="rtl"] .code-box {
  flex-direction: row;
}

html[dir="rtl"] .code-text {
  direction: ltr;
  text-align: left;
  font-family: var(--font-mono);
}

html[dir="rtl"] .ticket-details {
  text-align: right;
}

html[dir="rtl"] .ticket-reward {
  text-align: right;
}

/* Toast in RTL */
html[dir="rtl"] .toast-teal {
  border-left: 1px solid var(--line);
  border-right: 4px solid var(--teal);
}

/* Contact Card in RTL */
html[dir="rtl"] .contact-card {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .contact-card-icon-box {
  margin-left: 0.75rem;
  margin-right: 0;
}

html[dir="rtl"] .btn-copy-contact {
  margin-right: auto;
  margin-left: 0;
}

/* Modal in RTL */
html[dir="rtl"] .modal-title {
  text-align: right;
}

html[dir="rtl"] .modal-close {
  margin-left: 0;
  margin-right: auto;
}

/* Hero Stats in RTL */
html[dir="rtl"] .hero-stat-info {
  text-align: right;
}

html[dir="rtl"] .hero-stat-card {
  text-align: right;
}

html[dir="rtl"] .section-header {
  text-align: center;
}

html[dir="rtl"] .filter-tabs {
  direction: rtl;
}

html[dir="rtl"] .service-card {
  text-align: right;
}

html[dir="rtl"] .footer-brand-desc {
  text-align: right;
}

/* ==========================================================================
   Report Issue / Suggestion UI & Modal
   ========================================================================== */
.btn-report-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(235, 87, 87, 0.12);
  color: #ff7b7b;
  border: 1px solid rgba(235, 87, 87, 0.32);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-report-trigger:hover {
  background: rgba(235, 87, 87, 0.24);
  border-color: rgba(235, 87, 87, 0.55);
  color: #ff9b9b;
  transform: translateY(-1px);
}

.btn-report-hero {
  border-color: rgba(235, 87, 87, 0.35) !important;
  color: #ff8888 !important;
  background: rgba(235, 87, 87, 0.1) !important;
}

.btn-report-hero:hover {
  background: rgba(235, 87, 87, 0.22) !important;
  border-color: rgba(235, 87, 87, 0.55) !important;
  color: #ffa4a4 !important;
}

.btn-report-ticket {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.btn-report-ticket:hover {
  background: rgba(235, 87, 87, 0.18);
  border-color: rgba(235, 87, 87, 0.45);
  color: #ff7b7b;
  transform: scale(1.06);
}

.report-modal-card {
  max-width: 520px;
  width: 92%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal-header-with-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-header-badge {
  font-size: 1.25rem;
  line-height: 1;
}

.modal-subtitle-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.report-form .form-group {
  margin-bottom: 1rem;
}

.form-select {
  cursor: pointer;
  background-color: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

.form-select option {
  background: #191b24;
  color: #ffffff;
  padding: 0.5rem;
}

.report-textarea {
  resize: vertical;
  min-height: 85px;
  font-family: inherit;
  line-height: 1.5;
}

.report-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  width: 100%;
}

.report-success-state {
  text-align: center;
  padding: 2rem 1rem;
}

.report-success-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.report-success-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.report-success-msg {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* RTL Adjustments for Report Modal */
html[dir="rtl"] .modal-header-with-badge {
  flex-direction: row-reverse;
}

html[dir="rtl"] .report-dest-badge {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .report-form {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .form-label {
  text-align: right;
}

html[dir="rtl"] .form-control {
  text-align: right;
}

html[dir="rtl"] .report-actions-row {
  flex-direction: row-reverse;
}

/* ==========================================================================
   TRADING HUB COMPONENT STYLES
   ========================================================================== */

.trading-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.trading-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-post-trade {
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.trading-hero {
  text-align: center;
  padding: 2.25rem 1rem 2.5rem;
  margin-bottom: 1.75rem;
  background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.trading-hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.trading-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.trading-hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

.trading-controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trading-tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.trading-filter-tabs {
  display: flex;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
}

.trade-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.trade-tab:hover {
  color: var(--text);
}

.trade-tab.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.trade-game-select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 180px;
  min-height: 40px;
  transition: border-color 0.15s;
}

.trade-game-select:focus {
  border-color: var(--line-focus);
  outline: none;
}

/* Trades Grid */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .trades-grid {
    grid-template-columns: 1fr;
  }
  .form-row-two-col {
    grid-template-columns: 1fr !important;
  }
}

.trade-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.trade-card:hover {
  border-color: var(--line-focus);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.trade-card-completed {
  opacity: 0.68;
  border-style: dashed;
}

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

.trade-game-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trade-game-badge {
  font-weight: 800;
  font-size: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.trade-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

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

.trade-status-badge.status-completed {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.trade-author-badge {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.trade-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Have / Want Exchange Grid */
.trade-exchange-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.trade-side {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
}

.trade-have {
  border-left: 3px solid #10b981;
}

.trade-want {
  border-left: 3px solid #f59e0b;
}

html[dir="rtl"] .trade-have {
  border-left: 1px solid var(--line);
  border-right: 3px solid #10b981;
}

html[dir="rtl"] .trade-want {
  border-left: 1px solid var(--line);
  border-right: 3px solid #f59e0b;
}

.trade-side-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.trade-side-icon {
  font-size: 0.8rem;
}

.trade-side-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.trade-side-content {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.trade-notes {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.4rem;
  line-height: 1.4;
}

.trade-notes-label {
  font-weight: 700;
  color: var(--text);
}

/* Card Footer */
.trade-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  margin-top: auto;
}

.trader-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trader-avatar {
  font-size: 1.1rem;
}

.trader-names {
  display: flex;
  flex-direction: column;
}

.trader-roblox {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}

.trader-discord {
  font-size: 0.75rem;
  color: #818cf8;
}

.trade-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-trade-action {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  min-height: 36px;
}

.btn-trade-action:hover {
  background: var(--surface-hover);
  border-color: var(--line-focus);
  transform: translateY(-1px);
}

.btn-trade-delete {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-trade-delete:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: #f87171;
}

/* Empty State */
.empty-trades-state {
  text-align: center;
  padding: 4.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}

.empty-trades-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.empty-trades-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.empty-trades-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

/* Modal specific for Trades */
.modal-trade-card {
  max-width: 620px;
  width: 100%;
}

.form-row-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.label-have {
  color: #10b981;
}

.label-want {
  color: #f59e0b;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* RTL Adjustments for Trading Hub */
html[dir="rtl"] .trading-top-bar {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trading-top-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trading-tabs-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trading-filter-tabs {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-card-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-game-meta {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-card-footer {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trader-info {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .trade-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-side-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-side-content {
  text-align: right;
}

html[dir="rtl"] .trade-notes {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .modal-actions-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-form {
  direction: rtl;
  text-align: right;
}

/* ==========================================================================
   Identity Status Badges (Header & Trading Hub)
   ========================================================================== */
.btn-identity-status,
.trading-identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-primary);
  white-space: nowrap;
}

.btn-identity-status:hover,
.trading-identity-badge:hover {
  transform: translateY(-1px);
  border-color: var(--brand-teal);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.2);
}

.identity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
}

.status-uuid .identity-dot,
.badge-uuid .identity-dot {
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.status-fp,
.badge-fp {
  border-color: rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Identity Status & Diagnostics Modal
   ========================================================================== */
.modal-identity-card {
  max-width: 580px;
  width: 100%;
}

.identity-method-card {
  padding: 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
}

.identity-method-card.method-fp {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.02));
}

.identity-method-card.method-uuid {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.02));
}

.identity-method-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.identity-method-icon {
  font-size: 1.6rem;
}

.identity-method-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.identity-method-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.identity-method-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.identity-field-group {
  margin-bottom: 1rem;
}

.identity-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.identity-token-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--line);
}

.identity-token-box-subtle {
  opacity: 0.8;
}

.identity-token-code {
  flex: 1;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--brand-teal);
  word-break: break-all;
}

.identity-signals-panel {
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-top: 1rem;
}

.identity-signals-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.identity-signals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
}

@media (max-width: 600px) {
  .identity-signals-grid {
    grid-template-columns: 1fr;
  }
}

.signal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-key {
  color: var(--text-muted);
}

.signal-val {
  color: var(--text-primary);
  font-weight: 600;
}

.identity-retest-row {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.retest-result-msg {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
}

.retest-result-msg.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.retest-result-msg.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Visual Items Selector Strip (in Post-Trade Modal)
   ========================================================================== */
.trade-available-items-container {
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

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

.picker-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand-teal);
}

.picker-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.picker-scroll-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-behavior: smooth;
}

.picker-scroll-row::-webkit-scrollbar {
  height: 5px;
}

.picker-scroll-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.item-chip-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--line);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.item-chip-btn:hover {
  border-color: var(--brand-teal);
  background: rgba(20, 184, 166, 0.1);
  transform: translateY(-1px);
}

.item-chip-img-box {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-chip-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-chip-icon {
  font-size: 1rem;
}

.item-chip-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Visual Items inside Trade Cards
   ========================================================================== */
.trade-visual-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.trade-visual-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-item-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-item-fallback-icon {
  font-size: 0.9rem;
}

.trade-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.trade-item-rarity {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rarity-mythical {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.rarity-legendary {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.rarity-ancient,
.rarity-godly {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.rarity-rare {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.rarity-common {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* RTL Adjustments */
html[dir="rtl"] .identity-method-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .identity-method-desc {
  text-align: right;
}

html[dir="rtl"] .identity-field-label {
  text-align: right;
}

html[dir="rtl"] .identity-token-box {
  flex-direction: row-reverse;
}

html[dir="rtl"] .signal-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .picker-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-visual-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .trade-item-name {
  text-align: right;
}


