@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --bg-main: #0a0a0a;
  --bg-card: #161016;
  --bg-sidebar: #0f0a0f;
  --border-glow: rgba(228, 0, 58, 0.3);
  --grad-primary: linear-gradient(135deg, #e4003a 0%, #ff1b6b 100%);
  --color-text: #ffffff;
  --color-muted: #8e8a93;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--color-text);
  font-family: var(--font-body);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 1. Topbar M車vil */
.mobile-topbar {
  display: none !important;
  width: 100%;
  height: 60px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.hamburger-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

.mobile-logo {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

/* 2. Sidebar Lateral */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease-in-out;
  z-index: 100;
}

.sidebar .brand {
  margin-bottom: 24px;
  text-align: center;
}

.sidebar .brand img {
  max-width: 170px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-item.active a, .nav-item a:hover {
  background: var(--grad-primary);
  color: #fff;
}

.badge-pill {
  background: #ff004c;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  margin-left: auto;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 95;
}

/* 3. Contenedor Central */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 32px;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.search-input {
  background: #19141b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  border-radius: 30px;
  color: #fff;
  width: 100%;
  max-width: 380px;
  outline: none;
  font-size: 0.85rem;
}

.user-balance-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.balance-card {
  background: #161016;
  border: 1px solid var(--border-glow);
  padding: 6px 14px;
  border-radius: 25px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-card span {
  color: #ff1b6b;
  font-weight: 700;
}

.btn-pill {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: opacity 0.2s ease;
  font-size: 0.85rem;
}

.btn-pill:hover {
  opacity: 0.92;
}

/* 4. Grilla de Fotos Estilo Tarjeta Vertical (Referencia) */
.feed-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 16px;
}

.photo-card {
  position: relative;
  width: 100%;
  height: 350px;
  border-radius: 18px;
  overflow: hidden;
  background-color: #120c12;
  border: 1px solid rgba(228, 0, 58, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 27, 107, 0.8);
}

.photo-card img,
.photo-card video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge flotante superior */
.badge-floating {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(18, 14, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.badge-floating.vip {
  background: rgba(228, 0, 58, 0.88);
  border-color: #ff1b6b;
}

/* Barra inferior flotante */
.card-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px 12px 10px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(10, 6, 10, 0.92) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.card-overlay-bottom a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.card-overlay-bottom .avatar-mini {
  position: static !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50%;
  border: 1.5px solid #ff1b6b;
  object-fit: cover;
}

.card-like-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 3px 10px;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 5. Hero & Componentes Home */
.hero-card {
  background: linear-gradient(180deg, rgba(22, 16, 22, 0.4) 0%, #161016 100%), #140d14;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 44px);
  margin-bottom: 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 1px;
  line-height: 1.05;
}

.hero-card h2 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #ff1b6b;
  font-family: var(--font-display);
  margin-bottom: 16px;
}

.live-countdown-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  margin-bottom: 28px;
}

.countdown-box {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.countdown-segment {
  background: #0d090d;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 60px;
}

.countdown-segment .num {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #ff1b6b;
}

.countdown-segment .lbl {
  font-size: 0.65rem;
  color: var(--color-muted);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 6. Media Queries para M車viles */
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }

  .mobile-topbar {
    display: flex !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100vh;
    width: 270px;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.8);
  }

  .sidebar.open {
    transform: translateX(280px);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .main-wrapper {
    padding: 16px;
  }

  .top-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    max-width: 100%;
  }

  .live-countdown-container {
    grid-template-columns: 1fr;
  }

  .user-balance-bar {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .feed-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .photo-card {
    height: 260px;
  }

  .badge-floating {
    top: 8px;
    left: 8px;
    font-size: 0.58rem;
    padding: 3px 8px;
  }

  .card-overlay-bottom {
    padding: 16px 8px 8px 8px;
  }

  .card-overlay-bottom span.nick-label {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Métricas Rápidas del Panel Administrativo */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  width: 100%;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.stat-card .stat-icon-box {
  background: rgba(228, 0, 58, 0.12);
  border: 1px solid rgba(255, 27, 107, 0.25);
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card .stat-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: #ff1b6b;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--color-muted);
  font-weight: 500;
  margin-top: 2px;
}
}