/* ==========================================================================
   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;
}

/* Custom Scrollbars matching site dark theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0c0d12;
}

::-webkit-scrollbar-thumb {
  background: #252839;
  border-radius: 9999px;
  border: 2px solid #0c0d12;
}

::-webkit-scrollbar-thumb:hover {
  background: #393e58;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #252839 #0c0d12;
}

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: rgba(22, 23, 32, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.header-container {
  max-width: 1240px;
  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;
}

.btn-notif-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;
  position: relative;
}

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

.btn-notif-toggle.active {
  background: rgba(229, 170, 23, 0.12);
  border-color: rgba(229, 170, 23, 0.45);
  color: var(--gold);
}

.btn-notif-toggle .notif-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  transition: var(--transition);
}

.btn-notif-toggle.active .notif-status-dot {
  background: #10b981;
}

.btn-notif-toggle.blocked .notif-status-dot {
  background: #ef4444;
}

.btn-notif-toggle .notif-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 540px) {
  .btn-notif-toggle .notif-text {
    display: none;
  }
  .btn-notif-toggle {
    padding: 0.4rem 0.6rem;
  }
}

.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: 1240px;
  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,
.trading-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,
.trading-hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.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-icon-wrap.stat-icon-trading {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(229, 170, 23, 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);
}

.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;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}

.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,
.toast-success {
  border-left-color: var(--teal);
}
.toast-teal .toast-icon,
.toast-success .toast-icon {
  color: var(--teal);
}

.toast-red,
.toast-error {
  border-left-color: var(--red);
}
.toast-red .toast-icon,
.toast-error .toast-icon {
  color: var(--red);
}

.toast-yellow,
.toast-warning {
  border-left-color: var(--gold);
}
.toast-yellow .toast-icon,
.toast-warning .toast-icon {
  color: var(--gold);
}

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

html[dir="rtl"] .toast-container {
  right: auto;
  left: 1.5rem;
}

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

html[dir="rtl"] .toast-teal,
html[dir="rtl"] .toast-success {
  border-right-color: var(--teal);
}

html[dir="rtl"] .toast-red,
html[dir="rtl"] .toast-error {
  border-right-color: var(--red);
}

html[dir="rtl"] .toast-yellow,
html[dir="rtl"] .toast-warning {
  border-right-color: var(--gold);
}

html[dir="rtl"] .toast-blue,
html[dir="rtl"] .toast-info {
  border-right-color: var(--blue);
}

@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;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar (Hidden on PC/Desktop)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  /* 1. Mobile Top Header (Compact single-row <= 15% sticky height cap) */
  .app-header {
    border-bottom: 1px solid var(--line);
    background: rgba(22, 23, 32, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .header-container {
    padding: 0.5rem 0.85rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 52px;
  }

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

  .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .brand-logo-img {
    width: 26px;
    height: 26px;
  }

  .brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .btn-lang-toggle {
    min-height: 38px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--radius-sm);
  }

  /* Desktop Header Nav is hidden on mobile; the thumb-zone mobile bottom nav handles it */
  .header-nav {
    display: none !important;
  }

  /* 2. Mobile Bottom Navigation Bar (Thumb Zone) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 120;
    background: rgba(20, 22, 31, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.25rem;
    min-height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-nav-tab:active {
    transform: scale(0.92);
  }

  .mobile-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: transform 0.15s ease, color 0.15s ease;
  }

  .mobile-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .mobile-nav-tab.active {
    color: var(--gold);
  }

  .mobile-nav-tab.active .mobile-nav-icon {
    transform: translateY(-1px);
  }

  /* Safe Area Padding for Mobile Body & Main Content */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .main-content {
    padding: 0.85rem 0.85rem calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* 3. iOS Input Safari Auto-Zoom Prevention (strictly 16px) */
  input[type="text"],
  input[type="email"],
  input[type="search"],
  select,
  textarea,
  .input-search,
  .form-control,
  .trade-game-select,
  .supply-search-input,
  .supply-item-type-select {
    font-size: 16px !important;
  }

  /* 4. Touch Targets & Ergonomics (>= 44px) */
  .btn,
  .btn-primary,
  .btn-service-action,
  .btn-post-trade,
  .btn-back,
  .btn-copy,
  .btn-trade-action {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* 5. Home Hero & Platform Live Statistics Strip */
  .home-hero {
    padding: 1.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
  }

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

  .home-hero-title {
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

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

  .hero-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    max-width: 100%;
    margin-top: 1.15rem;
  }

  /* Balance 3 cards: Games + Codes on row 1, Trades on row 2 spanning full width */
  .hero-stats-row > :nth-child(3) {
    grid-column: span 2;
  }

  .hero-stat-card {
    padding: 0.65rem 0.75rem;
    gap: 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
    text-align: left;
  }

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

  .hero-stat-icon-wrap {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .hero-stat-value {
    font-size: 1rem;
    font-weight: 800;
  }

  .hero-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
  }

  /* 6. Services Grid on Mobile */
  .home-section {
    margin-bottom: 2rem;
  }

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

  .section-desc {
    font-size: 0.875rem;
    line-height: 1.5;
  }

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

  .service-card {
    padding: 1.35rem 1.15rem;
    border-radius: var(--radius-md);
  }

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

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

  .btn-service-action {
    width: 100%;
    min-height: 46px;
    font-size: 0.9rem;
    font-weight: 700;
    justify-content: center;
  }

  /* 7. Search Toolbar */
  .search-toolbar {
    margin-bottom: 1.25rem;
  }

  .search-box {
    width: 100%;
  }

  .input-search {
    min-height: 48px;
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    border-radius: var(--radius-md);
  }

  html[dir="rtl"] .input-search {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
  }

  .btn-clear-input {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  /* 8. Games Grid on Mobile */
  .games-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

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

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

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

  .btn-view-codes {
    min-height: 44px;
    font-size: 0.85rem;
    font-weight: 700;
  }

  /* 9. Game Detail View on Mobile */
  .btn-back {
    min-height: 42px;
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .game-detail-hero {
    padding: 1.15rem;
    margin-bottom: 1.15rem;
    border-radius: var(--radius-md);
  }

  .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;
    border-radius: var(--radius-md);
  }

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

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

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

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

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

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

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

  .btn-copy {
    min-height: 44px;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 700;
  }

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

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

  /* 10. Modals on Mobile (Bottom-Sheet Drawer) */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
  }

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

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

  /* 11. Toast positioning above the mobile bottom nav */
  .toast-container {
    left: 0.85rem;
    right: 0.85rem;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 0.5rem);
    z-index: 140;
  }

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

  /* 12. Footer Layout on Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-brand-desc {
    max-width: 100%;
  }

  .contact-card {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
  }

  .btn-copy-contact {
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-stat-card {
    padding: 0.55rem 0.65rem;
  }

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

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

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

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

  .hero-stats-row {
    grid-template-columns: 1fr;
  }

  .hero-stats-row > :nth-child(3) {
    grid-column: auto;
  }
}

/* ==========================================================================
   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;
}

.trading-hero {
  text-align: center;
  padding: 2.25rem 1.5rem;
  margin-bottom: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.trading-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--line);
  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: 960px) and (min-width: 641px) {
  /* Tablet Optimization */
  .trades-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
  }

  .trade-card {
    padding: 1.1rem;
  }

  .trade-items-visual-list,
  .trade-visual-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 640px) {
  /* Phone & Mobile Optimization */
  .trading-top-bar {
    gap: 0.65rem;
  }

  .btn-post-trade {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    min-height: 44px;
  }

  .trading-hero {
    padding: 1.5rem 1rem 1.25rem;
    margin-bottom: 1.25rem;
  }

  .trading-controls {
    padding: 0.85rem;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
  }

  .trading-tabs-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .trading-filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 3px;
    display: flex;
    gap: 0.35rem;
  }

  .trade-tab {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .trading-game-filter {
    width: 100%;
  }

  .trade-game-select {
    width: 100%;
    min-height: 44px;
    font-size: 16px !important;
  }

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

  .trade-card {
    padding: 0.95rem 0.85rem;
  }

  .trade-items-visual-list,
  .trade-visual-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.35rem;
  }

  .trade-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .trade-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .btn-trade-action {
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    min-height: 44px;
  }

  .form-row-two-col {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .trade-items-visual-list,
  .trade-visual-list {
    grid-template-columns: 1fr;
  }
}

.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;
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

.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: var(--gold);
  background: var(--gold-bg);
  border: 1px solid rgba(229, 170, 23, 0.35);
}

.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-card-timing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.trade-expiry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.trade-clock-svg {
  flex-shrink: 0;
  display: inline-block;
}

.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: 0.9rem;
}

.trade-side {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trade-have {
  border-color: rgba(229, 170, 23, 0.28);
  background: linear-gradient(180deg, rgba(229, 170, 23, 0.05) 0%, rgba(20, 23, 33, 0.5) 100%);
}

.trade-want {
  border-color: rgba(46, 196, 182, 0.25);
  background: linear-gradient(180deg, rgba(46, 196, 182, 0.04) 0%, rgba(20, 23, 33, 0.5) 100%);
}

html[dir="rtl"] .trade-have {
  border-color: rgba(229, 170, 23, 0.28);
}

html[dir="rtl"] .trade-want {
  border-color: rgba(46, 196, 182, 0.25);
}

.trade-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trade-side-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
}

.trade-side-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.trade-side-dot.dot-have {
  background: var(--gold);
}

.trade-side-dot.dot-want {
  background: var(--teal);
}

.trade-have .trade-side-pill {
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid rgba(229, 170, 23, 0.3);
}

.trade-want .trade-side-pill {
  color: var(--teal);
  background: var(--teal-bg);
  border: 1px solid rgba(46, 196, 182, 0.3);
}

.trade-side-content {
  width: 100%;
}

.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.45rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

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

.trade-notes-text {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  flex: 1;
}

/* 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: 820px;
  width: 96%;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75);
}

.trade-form-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-trade-card .modal-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
  background: var(--surface);
  margin-bottom: 0;
}

.modal-trade-card .modal-body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

/* Modal Scrollbar matching site dark theme */
.modal-trade-card .modal-body::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 7px;
}

.modal-trade-card .modal-body::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: var(--surface);
}

.modal-trade-card .modal-body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: #2b2f44;
  border-radius: 9999px;
  border: 1px solid var(--surface);
}

.modal-trade-card .modal-body::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #424868;
}

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

.label-have {
  color: var(--gold);
}

.label-want {
  color: var(--teal);
}

/* Pinned Modal Action Row: docked at bottom of modal card edge-to-edge with backdrop */
.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.4rem;
  border-top: 1px solid var(--line);
  background: #131520;
  flex-shrink: 0;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

/* Inline Trade Delete Confirm Button (clean static state without pulsing animation) */
.btn-confirm-active {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  font-weight: 800 !important;
}

/* RTL Adjustments for Trading Hub */
html[dir="rtl"] .trader-info {
  text-align: right;
}

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

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

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

html[dir="rtl"] .modal-actions-row {
  justify-content: flex-start;
}

@media (max-width: 640px) {
  .modal-trade-card {
    width: 100%;
    max-width: 100%;
    max-height: 95dvh;
    border-radius: 12px 12px 0 0;
    margin-top: auto;
    margin-bottom: 0;
  }

  .modal-trade-card .modal-header {
    padding: 1rem 1.15rem;
  }

  .modal-trade-card .modal-body {
    padding: 1rem 1.15rem;
  }

  .modal-actions-row {
    padding: 0.85rem 1.15rem;
  }

  .modal-actions-row .btn {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    min-height: 46px;
    font-size: 0.9rem;
    font-weight: 700;
  }
}


/* ==========================================================================
   Visual Items Supply & Staging Trays (Post-Trade Modal)
   Strictly Flat Minimalist Dark - Zero Neon
   ========================================================================== */
/* Dual Exchange Trays (Have & Want) */
.trade-exchange-trays-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 680px) {
  .trade-exchange-trays-grid {
    grid-template-columns: 1fr;
  }
}

.trade-tray-box {
  background: #141622;
  border: 1px solid #23273a;
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tray-have {
  border-top: 3px solid var(--gold);
}

.tray-want {
  border-top: 3px solid var(--teal);
}

.trade-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tray-title-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: #f1f5f9;
}

.tray-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-have {
  background: var(--gold);
}

.dot-want {
  background: var(--teal);
}

.tray-counter-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--line);
}

.trade-tray-box.active-target-tray {
  border-color: rgba(205, 106, 23, 0.8);
}

/* ==========================================================================
   Big Square Limited Trade Slots Grid (Authentic Roblox Game Trade Window)
   ========================================================================== */
.trade-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 0.35rem 0 0.5rem;
}

@media (max-width: 680px) and (min-width: 440px) {
  .trade-slots-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

.trade-slot-square {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 90px;
  background: var(--surface-2);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  overflow: hidden;
  text-align: center;
}

.trade-slot-square:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.trade-slot-square.active-target {
  border: 2px solid var(--primary);
  background: rgba(205, 106, 23, 0.08);
}

/* Empty Slot */
.trade-slot-square.slot-empty {
  color: var(--text-muted);
}

.slot-empty-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0.25rem;
  opacity: 0.7;
}

.slot-empty-num {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.slot-empty-hint {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* Filled Slot */
.trade-slot-square.slot-filled {
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  padding-top: 0.4rem;
}

.slot-artwork-box {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.slot-artwork-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.slot-fallback-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.slot-item-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  width: 100%;
  padding: 0 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-type-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--line);
  margin-top: 0.2rem;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Slot Remove Button */
.btn-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.btn-slot-remove:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

[dir="rtl"] .btn-slot-remove {
  right: auto;
  left: 4px;
}

.tray-chips-container {
  min-height: 52px;
  background: #0d0f18;
  border: 1px dashed #24283c;
  border-radius: 8px;
  padding: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-content: flex-start;
}

.tray-empty-hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  padding: 0.35rem 0.2rem;
  width: 100%;
}

.tray-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #1c2030;
  border: 1px solid #2d334e;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  max-width: 100%;
}

.chip-want {
  border-color: #3b3726;
}

.chip-thumb-box {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.chip-icon {
  font-size: 0.85rem;
}

.chip-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: #f8fafc;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-rarity {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: #252b41;
  color: #cbd5e1;
}

.btn-remove-chip {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0 0.15rem;
  line-height: 1;
  transition: color 0.15s;
}

.btn-remove-chip:hover {
  color: #ef4444;
}

/* Game Item Supply Section */
.trade-supply-section {
  background: #141622;
  border: 1px solid #23273a;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 1.15rem;
}

.supply-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.supply-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.supply-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

.supply-count-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.supply-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.supply-search-wrap {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.supply-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0.6;
}

.supply-search-input {
  width: 100%;
  background: #0d0f18;
  border: 1px solid #282d42;
  border-radius: 6px;
  padding: 0.38rem 1.8rem 0.38rem 2rem;
  color: #f8fafc;
  font-size: 0.8rem;
}

.supply-search-input:focus {
  outline: none;
  border-color: #4b5574;
}

.supply-search-clear {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
}

.supply-type-filter-wrap {
  position: relative;
  min-width: 155px;
  max-width: 220px;
  flex-shrink: 0;
}

.supply-item-type-select {
  width: 100%;
  background: #0d0f18;
  border: 1px solid #282d42;
  border-radius: 6px;
  padding: 0.38rem 1.9rem 0.38rem 0.75rem;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color 0.15s, background-color 0.15s;
}

html[dir="rtl"] .supply-item-type-select {
  padding: 0.38rem 0.75rem 0.38rem 1.9rem;
  background-position: left 0.65rem center;
}

.supply-item-type-select:hover {
  border-color: #3f4666;
  background-color: #121522;
}

.supply-item-type-select:focus {
  outline: none;
  border-color: var(--line-focus);
}

.supply-item-type-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: #1f2233;
}

.supply-item-type-select option {
  background: #141724;
  color: #f8fafc;
  padding: 0.4rem;
}

@media (max-width: 640px) {
  .supply-type-filter-wrap {
    min-width: 100%;
    max-width: 100%;
  }

  .trade-supply-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    max-height: 250px;
  }
}

/* Supply Grid */
.trade-supply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.65rem;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.2rem;
  scroll-behavior: smooth;
}

.trade-supply-grid::-webkit-scrollbar {
  width: 6px;
}

.trade-supply-grid::-webkit-scrollbar-thumb {
  background: #2b3047;
  border-radius: 4px;
}

.supply-item-card {
  background: #181b28;
  border: 1px solid #272c41;
  border-radius: 8px;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: background 0.15s, border-color 0.15s;
}

.supply-item-card:hover {
  background: #1e2233;
  border-color: #3c4363;
}

.supply-thumb-box {
  width: 100%;
  height: 56px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
}

.supply-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.supply-fallback-icon {
  font-size: 1.4rem;
}

.supply-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 38px;
}

.supply-item-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.supply-item-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.supply-rarity-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.08rem 0.32rem;
  border-radius: 3px;
}

.supply-category-label {
  font-size: 0.62rem;
  color: #64748b;
}

.supply-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: auto;
}

.btn-supply-action {
  border-radius: 5px;
  padding: 0.3rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-add-have {
  background: rgba(229, 170, 23, 0.1);
  border-color: rgba(229, 170, 23, 0.3);
  color: var(--gold);
}

.btn-add-have:hover {
  background: rgba(229, 170, 23, 0.2);
  color: #ffd043;
}

.btn-add-want {
  background: rgba(46, 196, 182, 0.1);
  border-color: rgba(46, 196, 182, 0.3);
  color: var(--teal);
}

.btn-add-want:hover {
  background: rgba(46, 196, 182, 0.2);
  color: #5eead4;
}

.supply-empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
}

.supply-empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.supply-empty-text {
  font-size: 0.85rem;
  margin: 0;
}

.trade-trader-info-row {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Visual Items inside Trade Cards (Trade Feed)
   ========================================================================== */
.trade-items-visual-list,
.trade-visual-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.45rem;
  width: 100%;
}

.trade-item-chip,
.trade-visual-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 42px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.trade-item-chip:hover,
.trade-visual-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.trade-item-thumb-box,
.trade-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
}

.trade-item-thumb-img,
.trade-item-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.trade-item-fallback-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.trade-item-meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.trade-item-name-tag,
.trade-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-item-qty {
  display: none !important;
}

.trade-item-rarity-pill,
.trade-item-rarity {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.42rem;
  border-radius: 4px;
  background: rgba(229, 170, 23, 0.08);
  color: var(--gold);
  border: 1px solid rgba(229, 170, 23, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-item-plain-fallback {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

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

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

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

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

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

/* RTL Adjustments */
html[dir="rtl"] .trade-item-name-tag,
html[dir="rtl"] .trade-item-name {
  text-align: right;
}

html[dir="rtl"] .trade-item-rarity-pill,
html[dir="rtl"] .trade-item-rarity {
  align-self: flex-start;
  text-align: right;
}

html[dir="rtl"] .supply-search-icon {
  left: auto;
  right: 0.65rem;
}

html[dir="rtl"] .supply-search-input {
  padding: 0.38rem 2rem 0.38rem 1.8rem;
}

html[dir="rtl"] .supply-search-clear {
  right: auto;
  left: 0.6rem;
}

/* ==========================================================================
   4-Square Trade Offer Matrix & Cross-Device UI (Space-Optimized Roblox Fruits)
   ========================================================================== */

/* The Trade Exchange Row (Offering vs Looking For) */
.trade-exchange-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
  width: 100%;
}

.trade-exchange-side {
  display: flex;
  flex-direction: column;
  background: rgba(20, 23, 33, 0.65);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.55rem;
  min-width: 0;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* HAVE (Offering) Side Accent */
.trade-have-side {
  border-color: rgba(229, 170, 23, 0.28);
  background: linear-gradient(180deg, rgba(229, 170, 23, 0.05) 0%, rgba(20, 23, 33, 0.75) 100%);
}

.trade-have-side:hover {
  border-color: rgba(229, 170, 23, 0.45);
}

/* WANT (Looking For) Side Accent */
.trade-want-side {
  border-color: rgba(46, 196, 182, 0.28);
  background: linear-gradient(180deg, rgba(46, 196, 182, 0.05) 0%, rgba(20, 23, 33, 0.75) 100%);
}

.trade-want-side:hover {
  border-color: rgba(46, 196, 182, 0.45);
}

/* Side Header Pills */
.trade-side-header-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.trade-side-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  line-height: 1.2;
}

.trade-side-have-pill {
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid rgba(229, 170, 23, 0.35);
}

.trade-side-want-pill {
  color: var(--teal);
  background: var(--teal-bg);
  border: 1px solid rgba(46, 196, 182, 0.35);
}

.trade-side-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Center Trade Exchange Arrow Divider */
.trade-center-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex-shrink: 0;
}

.trade-arrow-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.trade-card:hover .trade-arrow-circle {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(180deg);
}

.trade-exchange-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 4-Square Fruit Grid */
.trade-4slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  width: 100%;
}

/* The Individual 4-Square Slot */
.trade-4slot {
  aspect-ratio: 1 / 1;
  min-height: 56px;
  max-height: 78px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  box-sizing: border-box;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Filled Slot with Fruit or Item */
.trade-4slot.slot-filled {
  background: rgba(10, 12, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.trade-4slots-have .trade-4slot.slot-filled {
  border-color: rgba(229, 170, 23, 0.25);
}

.trade-4slots-have .trade-4slot.slot-filled:hover {
  border-color: rgba(229, 170, 23, 0.6);
  transform: scale(1.04);
}

.trade-4slots-want .trade-4slot.slot-filled {
  border-color: rgba(46, 196, 182, 0.25);
}

.trade-4slots-want .trade-4slot.slot-filled:hover {
  border-color: rgba(46, 196, 182, 0.6);
  transform: scale(1.04);
}

/* Empty Authentic Slot (Dashed Border) */
.trade-4slot.slot-empty {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.015);
}

.trade-4slot-empty-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

/* Fruit / Item Image */
.trade-4slot-img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
  transition: transform 0.15s ease;
  pointer-events: none;
}

.trade-4slot:hover .trade-4slot-img {
  transform: scale(1.08);
}

/* Fallback SVG Icon if Image is missing */
.trade-4slot-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Item Name Tag Overlay (Directly visible on Mobile & Touch Devices) */
.trade-4slot-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  padding: 0.45rem 0.2rem 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: 0.01em;
  pointer-events: none;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
}

/* Overflow Badge (+N more) */
.trade-4slot-overflow {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

html[dir="rtl"] .trade-4slot-overflow {
  right: auto;
  left: 3px;
}

/* Names Summary below the 4-square grid */
.trade-side-names-summary {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.45rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  min-height: 1.8em;
}

/* Fallback SVG Thumbnails & Toast SVG */
.thumb-fallback-svg,
.slot-cube-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   Cross-Device Responsive Polish (Phones, Tablets & Small Screens)
   ========================================================================== */

/* Tablets & Small Laptops (960px down to 641px) */
@media (max-width: 960px) and (min-width: 641px) {
  .trades-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 0.95rem;
  }

  .trade-4slot {
    min-height: 52px;
    max-height: 70px;
  }
}

/* Mobile Devices (640px and below) */
@media (max-width: 640px) {
  .trades-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .trade-card {
    padding: 0.9rem 0.8rem;
    border-radius: 12px;
  }

  .trade-card-header {
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: flex-start;
  }

  .trade-game-meta {
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
  }

  .trade-card-timing {
    margin-left: auto;
  }

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

  .trade-exchange-row {
    gap: 0.45rem;
    margin: 0.65rem 0 0.85rem;
  }

  .trade-exchange-side {
    padding: 0.5rem 0.45rem;
  }

  .trade-side-header-compact {
    margin-bottom: 0.4rem;
  }

  .trade-side-pill {
    font-size: 0.64rem;
    padding: 0.15rem 0.45rem;
  }

  .trade-4slots-grid {
    gap: 0.3rem;
  }

  .trade-4slot {
    min-height: 50px;
    max-height: 66px;
    padding: 0.2rem;
    border-radius: 6px;
  }

  .trade-4slot-name {
    font-size: 0.56rem;
    padding: 0.35rem 0.15rem 0.12rem;
  }

  .trade-center-divider {
    align-self: center;
  }

  .trade-arrow-circle {
    width: 28px;
    height: 28px;
  }

  .trade-arrow-circle svg {
    width: 14px;
    height: 14px;
  }

  .trade-card-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }

  .trader-info {
    justify-content: flex-start;
  }

  .trade-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }

  .btn-trade-action {
    min-height: 44px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.5rem 0.5rem;
    justify-content: center;
  }
}

/* Ultra-Compact Screens (< 380px, e.g. iPhone SE, Galaxy Z Fold) */
@media (max-width: 380px) {
  .trade-exchange-row {
    gap: 0.35rem;
  }

  .trade-exchange-side {
    padding: 0.4rem 0.35rem;
  }

  .trade-4slots-grid {
    gap: 0.25rem;
  }

  .trade-4slot {
    min-height: 44px;
    max-height: 56px;
    padding: 0.15rem;
  }

  .trade-4slot-name {
    font-size: 0.52rem;
  }

  .trade-arrow-circle {
    width: 24px;
    height: 24px;
  }

  .trade-arrow-circle svg {
    width: 12px;
    height: 12px;
  }

  .trade-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Code Update Notifications (Opt-in Prompt Banner & Settings Modal)
   ========================================================================== */

.notif-prompt-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 440px;
  width: calc(100vw - 3rem);
  background: var(--surface-1);
  border: 1px solid rgba(229, 170, 23, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: slideUpFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html[dir="rtl"] .notif-prompt-banner {
  right: auto;
  left: 1.5rem;
}

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

.notif-prompt-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.notif-prompt-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(229, 170, 23, 0.14);
  border: 1px solid rgba(229, 170, 23, 0.35);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-prompt-text-block {
  flex: 1;
  min-width: 0;
}

.notif-prompt-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.notif-prompt-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.notif-prompt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.notif-btn-allow {
  padding: 0.45rem 1rem;
  font-weight: 700;
}

.notif-btn-later {
  padding: 0.45rem 0.85rem;
}

@media (max-width: 480px) {
  .notif-prompt-banner {
    bottom: 1rem;
    right: 0.85rem;
    left: 0.85rem;
    width: calc(100vw - 1.7rem);
    padding: 0.85rem;
  }

  .notif-prompt-actions {
    width: 100%;
    justify-content: stretch;
  }

  .notif-btn-allow,
  .notif-btn-later {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* Notification Settings Modal */
.notif-modal-window {
  max-width: 480px;
}

.notif-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.25rem 1.5rem;
}

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

.notif-status-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notif-status-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.notif-status-badge {
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.notif-status-badge.active {
  color: #10b981;
}

.notif-status-badge.inactive {
  color: var(--text-muted);
}

.notif-status-badge.blocked {
  color: #ef4444;
}

.notif-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}

.notif-alert-box.warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.notif-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.notif-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.notif-feature-bullet {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.notif-feature-item strong {
  color: var(--text);
}

.notif-test-section {
  display: flex;
  justify-content: center;
  padding-top: 0.2rem;
}

.notif-test-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
}

/* ==========================================================================
   Announcement Banner Component (Spreadsheet Driven)
   ========================================================================== */
.announcement-banner-slot {
  width: 100%;
  margin-bottom: 1.5rem;
  animation: bannerSlideDown 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.announcement-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.announcement-banner.banner-closing {
  opacity: 0;
  transform: translateY(-8px);
}

/* Left Group: Icon + Badge + Message */
.announcement-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.announcement-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.announcement-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.announcement-message {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

/* Right Group: Actions (CTA link + Close button) */
.announcement-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.announcement-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  line-height: 1.2;
}

.announcement-cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.announcement-cta-arrow {
  transition: transform 0.15s ease;
}

.announcement-cta-btn:hover .announcement-cta-arrow {
  transform: translateX(2px);
}

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

.announcement-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.announcement-close-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.announcement-close-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

/* Announcement Banner Theme Variations */
/* 1. Info Style (Clean Cyan / Blue) */
.banner-info {
  background: linear-gradient(90deg, rgba(74, 136, 247, 0.12) 0%, rgba(22, 23, 32, 0.95) 60%);
  border-color: rgba(74, 136, 247, 0.32);
}
.banner-info .announcement-icon-wrap {
  background: rgba(74, 136, 247, 0.18);
  color: #60a5fa;
}
.banner-info .announcement-badge {
  background: rgba(74, 136, 247, 0.22);
  color: #93c5fd;
  border: 1px solid rgba(74, 136, 247, 0.35);
}
.banner-info .announcement-cta-btn {
  background: #3b82f6;
  color: #ffffff;
}

/* 2. News / Update Style (Vibrant Violet / Purple) */
.banner-news {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.14) 0%, rgba(22, 23, 32, 0.95) 60%);
  border-color: rgba(168, 85, 247, 0.36);
}
.banner-news .announcement-icon-wrap {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}
.banner-news .announcement-badge {
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.38);
}
.banner-news .announcement-cta-btn {
  background: #a855f7;
  color: #ffffff;
}

/* 3. Event / Gold Style (Gold / Amber) */
.banner-event {
  background: linear-gradient(90deg, rgba(229, 170, 23, 0.14) 0%, rgba(22, 23, 32, 0.95) 60%);
  border-color: rgba(229, 170, 23, 0.35);
}
.banner-event .announcement-icon-wrap {
  background: rgba(229, 170, 23, 0.2);
  color: #fbbf24;
}
.banner-event .announcement-badge {
  background: rgba(229, 170, 23, 0.22);
  color: #fde68a;
  border: 1px solid rgba(229, 170, 23, 0.4);
}
.banner-event .announcement-cta-btn {
  background: #d97706;
  color: #ffffff;
}

/* 4. Warning Style (Amber / Orange) */
.banner-warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14) 0%, rgba(22, 23, 32, 0.95) 60%);
  border-color: rgba(245, 158, 11, 0.4);
}
.banner-warning .announcement-icon-wrap {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
.banner-warning .announcement-badge {
  background: rgba(245, 158, 11, 0.24);
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.banner-warning .announcement-cta-btn {
  background: #f59e0b;
  color: #0f1117;
}

/* 5. Success / Launch Style (Emerald / Teal) */
.banner-success {
  background: linear-gradient(90deg, rgba(46, 196, 182, 0.14) 0%, rgba(22, 23, 32, 0.95) 60%);
  border-color: rgba(46, 196, 182, 0.35);
}
.banner-success .announcement-icon-wrap {
  background: rgba(46, 196, 182, 0.2);
  color: #2ec4b6;
}
.banner-success .announcement-badge {
  background: rgba(46, 196, 182, 0.22);
  color: #ccfbf1;
  border: 1px solid rgba(46, 196, 182, 0.4);
}
.banner-success .announcement-cta-btn {
  background: #14b8a6;
  color: #ffffff;
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness for Announcements */
@media (max-width: 680px) {
  .announcement-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    padding-inline-end: 2.75rem;
  }
  
  .announcement-left {
    align-items: flex-start;
  }

  .announcement-actions {
    justify-content: flex-end;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .announcement-close-btn {
    position: absolute;
    top: 0.65rem;
    inset-inline-end: 0.65rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .announcement-cta-btn {
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}




