/* =========================================================
   FFMARKET GLOBAL - OP LEVEL FREE FIRE GLASSMORPHISM SYSTEM
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Rajdhani:wght@500;600;700;800&family=Teko:wght@600;700&display=swap');

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-gaming: 'Rajdhani', sans-serif;
  --font-title: 'Teko', sans-serif;

  /* Deep Cyber Obsidian & Fire Ember Palette */
  --bg-dark: #07090e;
  --bg-surface: #0d111a;
  --bg-card: rgba(15, 20, 31, 0.75);
  --bg-card-hover: rgba(22, 29, 45, 0.9);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-fire: rgba(255, 87, 34, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Free Fire Signature Accents */
  --fire-orange: #ff5722;
  --fire-amber: #f59e0b;
  --fire-yellow: #fbbf24;
  --fire-gradient: linear-gradient(135deg, #ff5722 0%, #f97316 50%, #e11d48 100%);
  --fire-glow: 0 0 25px rgba(255, 87, 34, 0.4);

  --neon-cyan: #06b6d4;
  --neon-emerald: #10b981;
  --neon-purple: #8b5cf6;

  --glass-blur: blur(20px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-fire: rgba(255, 87, 34, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(at 10% 10%, rgba(255, 87, 34, 0.12) 0px, transparent 45%),
    radial-gradient(at 90% 15%, rgba(225, 29, 72, 0.1) 0px, transparent 45%),
    radial-gradient(at 50% 90%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--border-fire);
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-title);
  font-size: 2rem;
  letter-spacing: 1px;
  line-height: 1;
}

.brand-flame {
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 87, 34, 0.6));
}

.brand-badge {
  background: var(--fire-gradient);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-gaming);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: var(--fire-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: var(--font-gaming);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-fire {
  background: var(--fire-gradient);
  color: #fff;
  box-shadow: var(--fire-glow);
}

.btn-fire:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(255, 87, 34, 0.7);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-fire { background: rgba(255, 87, 34, 0.2); color: #ff7849; border: 1px solid rgba(255, 87, 34, 0.45); }
.badge-emerald { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-cyan { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.badge-rose { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-evo { background: linear-gradient(90deg, #ff5722 0%, #7c3aed 100%); color: #fff; border: none; font-weight: 800; }

/* OP Hero Section */
.hero {
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.3);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ff9e80;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.gradient-fire {
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 87, 34, 0.5));
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Server Selector Pills */
.server-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.server-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.server-tab:hover, .server-tab.active {
  background: var(--fire-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--fire-glow);
  transform: translateY(-2px);
}

/* Free Fire Listing Card */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.listing-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.listing-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

.card-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8rem;
  color: var(--text-primary);
}

.card-title:hover {
  color: var(--fire-orange);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.card-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-bdt {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 700;
  color: #34d399;
  line-height: 1;
}

.price-usd {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Modern Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: rgba(13, 17, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--fire-orange);
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.25);
  background: rgba(20, 26, 38, 0.95);
}

/* Modern Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.glass-table th {
  padding: 0.85rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.glass-table td {
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Chat & Room */
.chat-box {
  display: flex;
  flex-direction: column;
  height: 480px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  max-width: 78%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.45;
}

.chat-msg.buyer { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-glass); }
.chat-msg.seller { align-self: flex-end; background: rgba(255, 87, 34, 0.2); border: 1px solid rgba(255, 87, 34, 0.35); }
.chat-msg.admin { align-self: center; max-width: 90%; background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #fde68a; }
.chat-msg.system { align-self: center; max-width: 90%; background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #a7f3d0; text-align: center; }

/* Escrow Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
  transform: translateY(-50%);
}

.stepper-step {
  position: relative;
  z-index: 2;
  background: var(--bg-dark);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.stepper-step.active {
  border-color: #ff5722;
  background: rgba(255, 87, 34, 0.2);
  color: #ff7849;
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.4);
}

.stepper-step.completed {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

/* Footer */
.footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(7, 9, 14, 0.95);
  padding: 3rem 1.5rem 2rem;
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2.75rem; }
  .navbar { padding: 0.75rem 1rem; }
  .nav-menu { display: none; }
  .listing-grid { grid-template-columns: 1fr; }
  .stepper { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
  .stepper::before { display: none; }
}


/* =========================================================
   LIVE-LEVEL OP NAVBAR & MOBILE BOTTOM BAR
   ========================================================= */

@keyframes fireGlowPulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.4), inset 0 0 5px rgba(255, 255, 255, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 87, 34, 0.85), 0 0 35px rgba(249, 115, 22, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.4), inset 0 0 5px rgba(255, 255, 255, 0.2);
    transform: scale(1);
  }
}

@keyframes flameFlicker {
  0%, 100% { filter: drop-shadow(0 0 8px #ff5722); }
  50% { filter: drop-shadow(0 0 16px #f97316) drop-shadow(0 0 25px #ff5722); }
}

.brand-flame {
  animation: flameFlicker 2.5s infinite ease-in-out;
}

.btn-nav-login {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  border-radius: var(--radius-full);
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  font-family: var(--font-gaming);
  letter-spacing: 0.5px;
}

.btn-nav-login:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ff5722;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.3);
}

.btn-nav-register {
  background: var(--fire-gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 0.42rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  animation: fireGlowPulse 2.8s infinite ease-in-out;
  text-transform: uppercase;
  font-family: var(--font-gaming);
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-nav-register:hover {
  box-shadow: 0 0 30px rgba(255, 87, 34, 0.9);
}

/* Mobile Bottom Navigation Bar (App-Like Experience) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-glass);
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.6);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  gap: 0.2rem;
  transition: all 0.2s ease;
  padding: 0.2rem 0.5rem;
}

.mobile-nav-item i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  color: #ff5722;
}

.mobile-nav-item:hover i, .mobile-nav-item.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.6));
}

.mobile-sell-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fire-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: var(--fire-glow);
  transform: translateY(-10px);
  border: 3px solid var(--bg-dark);
}

@media (max-width: 768px) {
  .mobile-bottom-bar { display: flex; }
  body { padding-bottom: 70px; }
  .navbar { padding: 0.65rem 0.85rem; }
  .nav-brand { font-size: 1.65rem; }
  .nav-brand .brand-badge { display: none; }
}


/* =========================================================
   AUTO-SLIDING FREE FIRE SCREENSHOTS CAROUSEL
   ========================================================= */
.card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #090c12;
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}
.card-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}
.card-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.03);
}
.card-slide-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

/* Slide Progress Dots */
.card-slide-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.card-slide-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.3s ease;
}
.card-slide-dot.active {
    width: 14px;
    border-radius: 999px;
    background: #ff5722;
    box-shadow: 0 0 6px #ff5722;
}

/* Slide Counter Badge */
.card-img-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 3px;
}
