/* ==========================================================================
   MOBILE-FIRST APP FRAMEWORK (common.css)
   Mobile viewport simulation on desktop/laptop with fixed max-width container
   Inspired by modern casino web-app interface (4vy.com aesthetic)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --accent-green: #00d084;
  --accent-green-hover: #059669;
  --accent-gold: #f59e0b;
  --accent-purple: #7c3aed;
  --accent-blue: #3b82f6;

  /* App Dark Palette */
  --app-bg: #141224;
  --app-surface: #1e1a38;
  --app-surface-2: #272249;
  --app-surface-3: #322b5c;
  --app-border: rgba(255, 255, 255, 0.08);
  --app-text: #ffffff;
  --app-text-muted: #94a3b8;
  --app-text-subtle: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --app-max-width: 480px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

/* ==========================================================================
   DESKTOP / LAPTOP WRAPPER — FORCES MOBILE DISPLAY EVERYWHERE
   ========================================================================== */
body {
  font-family: var(--font-sans);
  background-color: #0b0c13;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 0, transparent 24px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 0, transparent 24px);
  color: var(--app-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

.mobile-app-wrapper {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background-color: var(--app-bg);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(99, 102, 241, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 106px; /* space for fixed top bar */
  padding-bottom: 70px; /* space for fixed bottom nav */
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: padding-top 0.25s ease;
}

body.banner-closed .mobile-app-wrapper {
  padding-top: 58px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
}

/* ==========================================================================
   FIXED TOP BAR CONTAINER (Download Banner + Header Navbar)
   ========================================================================== */
.app-top-fixed-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  z-index: 1000;
  background-color: var(--app-surface);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   1. TOP APP DOWNLOAD BANNER ("Baixe Nosso APP")
   ========================================================================== */
.top-app-banner {
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #ffffff;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.top-app-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-app-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fef08a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.top-app-text {
  display: flex;
  flex-direction: column;
}

.top-app-text strong {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.top-app-text span {
  font-size: 0.68rem;
  color: #e0f2fe;
}

.top-app-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-install {
  background: #ffffff;
  color: #1e40af;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.btn-install:hover {
  background: #f8fafc;
  transform: scale(1.05);
}

.btn-close-app {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  line-height: 1;
}

.btn-close-app:hover {
  color: #ffffff;
}

/* ==========================================================================
   2. APP HEADER BAR
   ========================================================================== */
.app-header {
  height: 58px;
  background-color: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  position: relative;
  width: 100%;
}

.app-menu-btn {
  background: none;
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo {
  display: flex;
  align-items: center;
}

.app-logo a {
  display: flex;
  align-items: center;
}

.app-logo img {
  height: 32px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-header-login {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: var(--transition);
}

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

.btn-header-register {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

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

.btn-header-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-header-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ==========================================================================
   3. SLIDE-OUT DRAWER MENU
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  max-width: 80%;
  height: 100%;
  background: #18152e;
  border-right: 1px solid var(--app-border);
  z-index: 1060;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.app-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-user-card {
  padding: 16px;
  background: linear-gradient(135deg, #231e42, #1a1633);
  border-bottom: 1px solid var(--app-border);
}

.drawer-user-card .btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.drawer-menu-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.drawer-menu-list li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.drawer-menu-list li a i {
  width: 20px;
  text-align: center;
  color: #818cf8;
}

.drawer-menu-list li a:hover,
.drawer-menu-list li a.active {
  background: rgba(124, 58, 237, 0.12);
  color: #ffffff;
  border-left-color: var(--accent-purple);
}

/* ==========================================================================
   4. MARQUEE ANNOUNCEMENT BAR
   ========================================================================== */
.app-marquee-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b1735;
  border-radius: var(--radius-full);
  margin: 10px 12px 14px;
  padding: 6px 14px;
  border: 1px solid var(--app-border);
  overflow: hidden;
}

.app-marquee-icon {
  color: #f59e0b;
  font-size: 0.9rem;
  flex-shrink: 0;
  animation: pulse-glow 1.5s infinite;
}

.app-marquee-content {
  overflow: hidden;
  white-space: nowrap;
  flex-grow: 1;
  font-size: 0.76rem;
  color: #cbd5e1;
}

.app-marquee-content span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-roll 22s linear infinite;
}

@keyframes marquee-roll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* ==========================================================================
   5. DYNAMIC AD FRAMES (Server images only)
   ========================================================================== */
.ad-slot-wrapper {
  margin: 12px;
}

.ad-card-frame {
  background: var(--app-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--app-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.ad-card-frame:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.ad-card-frame img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

/* ==========================================================================
   6. FLOATING CUSTOMER SUPPORT BUTTON (Bottom-Left)
   ========================================================================== */
.floating-cs-btn {
  position: fixed;
  bottom: 80px;
  left: calc(50% - 225px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  z-index: 999;
  transition: var(--transition);
}

.floating-cs-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

@media (max-width: 480px) {
  .floating-cs-btn {
    left: 14px;
  }
}

/* ==========================================================================
   7. STICKY BOTTOM NAVIGATION BAR
   ========================================================================== */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: 62px;
  background-color: #1a1630;
  border-top: 1px solid var(--app-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  height: 100%;
  transition: var(--transition);
  position: relative;
}

.bottom-nav-item i {
  font-size: 1.15rem;
  transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: #ffffff;
}

.bottom-nav-item.active i {
  color: #f59e0b;
  transform: translateY(-2px);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   8. MOBILE APP FOOTER
   ========================================================================== */
.app-footer {
  margin-top: 30px;
  background-color: #110e20;
  border-top: 1px solid var(--app-border);
  padding: 24px 16px 20px;
  color: var(--app-text-muted);
}

.app-footer-brand {
  text-align: center;
  margin-bottom: 20px;
}

.app-footer-brand .app-logo {
  justify-content: center;
  margin-bottom: 10px;
}

.app-footer-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 16px;
}

.app-footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.footer-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--app-border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: #cbd5e1;
}

.app-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.app-footer-links a {
  color: #cbd5e1;
}

.app-footer-links a:hover {
  color: var(--accent-gold);
}

.app-footer-copy {
  text-align: center;
  font-size: 0.7rem;
  color: var(--app-text-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}
