/* ================== EF ALBUM — ESTILOS GERAIS =================== */
:root {
  --bg: #0b0b0b;
  --fg: #f7f7f7;
  --muted: #9aa0a6;
  --primary: #ff2d55;
  --card: #121212;
  --stroke: #1f1f1f;
  --stroke2: #333;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; /* Remove flash de toque no mobile */
}

body {
  display: flex;
  flex-direction: column;
}
.ef-scope {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ef-hide {
  display: none !important;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Botões */
.ef-btn {
  background: #222;
  border: 1px solid var(--stroke2);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  user-select: none;
}
.ef-btn:active {
  transform: scale(0.96);
}
.ef-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
}
.ef-btn.sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  height: 32px;
}

/* Inputs */
.ef-select,
.ef-input,
.ef-custom-input {
  background: #0a0a0a;
  border: 1px solid var(--stroke2);
  color: #fff;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  height: 44px;
  box-sizing: border-box; /* 44px é melhor para toque */
}
.ef-select:focus,
.ef-input:focus {
  border-color: var(--primary);
}

/* --- HEADER --- */
.ef-top {
  background: #111;
  border-bottom: 1px solid #1c1c1c;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.ef-topin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ef-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}
.ef-nav {
  display: flex;
  gap: 5px;
  align-items: center;
}
.ef-navlink {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #888;
}
.ef-navlink.active {
  color: #fff;
  background: #222;
  font-weight: 600;
}
.ef-userbox {
  margin-left: auto;
  font-size: 0.85rem;
  color: #888;
}

/* Layout Geral */
.ef-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}
.ef-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.ef-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.ef-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

/* --- CAMAROTES (Cards Proporcionais) --- */
.ef-cams {
  display: grid;
  /* Ajusta colunas automaticamente. No mobile ficam menores, desktop maiores */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.ef-cam {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* Mágica aqui: mantém formato retangular widescreen sempre */
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #1a1a1a;
  transition: transform 0.2s, border-color 0.2s;
}
.ef-cam:hover {
  transform: translateY(-3px);
  border-color: #444;
}
.ef-cam.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.2);
}

.ef-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: 0.3s;
}
.ef-cam.active .ef-cover {
  opacity: 0.8;
}
.ef-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- DIAS (Scroll Horizontal Nativo) --- */
.ef-daysbar {
  margin-top: 20px;
}
.ef-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
  scrollbar-width: none; /* Firefox: esconde barra */
}
.ef-chips::-webkit-scrollbar {
  display: none; /* Chrome/Safari: esconde barra */
}

.ef-chip {
  padding: 10px 18px;
  border: 1px solid #333;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: #1a1a1a;
  color: #ccc;
  white-space: nowrap;
  flex-shrink: 0;
  transition: 0.2s;
}
.ef-chip:active {
  transform: scale(0.95);
}
.ef-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 45, 85, 0.3);
}

/* --- TOOLBAR & GRID --- */
.ef-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #141414;
  border: 1px solid var(--stroke2);
  padding: 10px;
  border-radius: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.ef-tool-group {
  display: flex;
  gap: 4px;
  background: #000;
  padding: 4px;
  border-radius: 8px;
}
.ef-tool-btn {
  background: transparent;
  border: none;
  color: #666;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
}
.ef-tool-btn.active {
  background: #333;
  color: #fff;
}

.ef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.ef-thumb {
  position: relative;
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1/1;
  cursor: pointer;
  border: 2px solid transparent;
}
.ef-thumb.selected {
  border-color: var(--primary);
  background: rgba(255, 45, 85, 0.2);
}
.ef-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Controles Flutuantes */
.ef-chk-select {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  z-index: 5;
}
.ef-thumb.selected .ef-chk-select {
  background: var(--primary);
  border-color: var(--primary);
}
.ef-more-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* View List Mode */
.ef-grid.view-list {
  display: flex;
  flex-direction: column;
}
.ef-grid.view-list .ef-thumb {
  aspect-ratio: unset;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid #222;
}
.ef-grid.view-list img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  margin-right: 15px;
}
.ef-list-info {
  flex: 1;
}

/* Barra de Seleção (WhatsApp Style) */
.ef-selection-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: #222;
  border: 1px solid #444;
  border-radius: 50px;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 8px 20px;
  gap: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: max-content;
}
.ef-selection-bar.show {
  transform: translateX(-50%) translateY(0);
}
.ef-sel-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ef-sel-btn:hover {
  opacity: 0.8;
}

/* Menu Contexto */
.ef-popover-menu {
  position: absolute;
  background: #222;
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  z-index: 500;
  min-width: 180px;
  padding: 6px;
  display: none;
  animation: popIn 0.15s ease-out;
}
.ef-popover-menu.show {
  display: block;
}
.ef-menu-item {
  padding: 12px 15px;
  color: #eee;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
}
.ef-menu-item:hover {
  background: #333;
}
.ef-menu-item.danger {
  color: #ff5252;
}

/* Modal */
.ef-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 10px;
}
.ef-modal {
  background: transparent;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.ef-modal-body img {
  max-width: 100vw;
  max-height: 85vh;
  object-fit: contain;
}
.ef-modal-head {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  color: white;
  z-index: 10;
}
.ef-modal-actions {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 10;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === MOBILE === */
@media (max-width: 768px) {
  .ef-wrap {
    padding: 15px;
    padding-bottom: 100px; /* Espaço para barra de ação */
  }
  .ef-topin {
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
  }
  .ef-nav {
    width: 100%;
    border-top: 1px solid #222;
    padding-top: 10px;
    margin-top: 5px;
    justify-content: center;
  }
  .ef-userbox {
    display: none;
  }

  /* Cards em 2 colunas no mobile */
  .ef-cams {
    grid-template-columns: 1fr 1fr;
  }
  .ef-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  } /* Estilo Instagram */

  .ef-selection-bar {
    width: 90%;
    justify-content: space-between;
    bottom: 20px;
    border-radius: 12px;
  }
}

/* --- LOGIN & MODAL (FIXO E ROBUSTO) --- */

/* Fundo escuro do modal */
.ef-auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95); /* Bem escuro para foco */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px); /* Efeito moderno de desfoque */
}

/* Cartão de Login Unificado */
.ef-login-box {
  background: #141414;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Título do Login */
.ef-login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

/* Botão Fechar (X) */
.ef-close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.ef-close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Inputs dentro do Login */
.ef-login-box input {
  background: #000;
  border: 1px solid #333;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: 0.2s;
}
.ef-login-box input:focus {
  border-color: var(--primary);
}

/* Botão Entrar */
.ef-login-box .ef-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 10px;
}

/* Link "Sou Staff" no Topo */
.ef-top-login {
  font-size: 0.85rem;
  color: #888;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: 0.2s;
}
.ef-top-login:hover {
  color: #fff;
  border-color: #333;
  background: #1a1a1a;
}

/* ================== css/album.css =================== */
:root {
  --bg: #0b0b0b;
  --fg: #f7f7f7;
  --primary: #ff2d55;
  --card: #121212;
  --stroke: #1f1f1f;
  --stroke2: #333;
}

/* RESET */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body {
  display: flex;
  flex-direction: column;
}
.ef-scope {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ef-hide {
  display: none !important;
}
a {
  text-decoration: none;
  color: inherit;
}

/* UI Elements */
.ef-btn {
  background: #222;
  border: 1px solid var(--stroke2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ef-btn:active {
  transform: scale(0.96);
}
.ef-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
}
.ef-select,
.ef-input,
.ef-custom-input {
  background: #0a0a0a;
  border: 1px solid var(--stroke2);
  color: #fff;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  height: 44px;
  box-sizing: border-box;
}
.ef-select:focus,
.ef-input:focus {
  border-color: var(--primary);
}

/* --- HEADER & MENU --- */
.ef-top {
  background: #111;
  border-bottom: 1px solid #1c1c1c;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.ef-topin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Importante para o menu cair */
}

.ef-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  margin-right: auto;
}

/* Botão Sanduíche (Oculto no Desktop) */
.ef-burger {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 5px;
  margin-left: 15px;
}

.ef-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ef-navlink {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #888;
  transition: 0.2s;
}
.ef-navlink:hover,
.ef-navlink.active {
  color: #fff;
  background: #222;
}
.ef-userbox {
  margin-left: auto;
  font-size: 0.85rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ef-top-login {
  cursor: pointer;
  color: #aaa;
  text-decoration: underline;
}
.ef-top-login:hover {
  color: #fff;
}

/* Layout Geral */
.ef-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}
.ef-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.ef-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.ef-label {
  font-size: 0.75rem;
  color: #888;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

/* ... (Mantenha os estilos de .ef-cams, .ef-grid, .ef-modal igual ao anterior) ... */
/* Para economizar espaço aqui, estou focando nas mudanças do Menu e Mobile abaixo */

/* CSS DA GALERIA (Resumido para contexto) */
.ef-cams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.ef-cam {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  border: 2px solid transparent;
}
.ef-cam.active {
  border-color: var(--primary);
}
.ef-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.ef-info {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: #fff;
  font-weight: 700;
}
.ef-daysbar {
  margin-top: 15px;
  overflow-x: auto;
  display: flex;
  gap: 10px;
  padding-bottom: 5px;
}
.ef-chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #ccc;
  white-space: nowrap;
  cursor: pointer;
}
.ef-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.ef-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.ef-thumb {
  aspect-ratio: 1/1;
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
}
.ef-thumb.selected {
  border-color: var(--primary);
  opacity: 0.8;
}
.ef-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* UI Flutuante */
.ef-chk-select {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #fff;
  z-index: 5;
}
.ef-thumb.selected .ef-chk-select {
  background: var(--primary);
  border-color: var(--primary);
}
.ef-more-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}
.ef-selection-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: #222;
  border: 1px solid #444;
  border-radius: 50px;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 8px 20px;
  gap: 15px;
  transition: 0.3s;
}
.ef-selection-bar.show {
  transform: translateX(-50%) translateY(0);
}
.ef-popover-menu {
  position: absolute;
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  z-index: 500;
  display: none;
  padding: 5px;
}
.ef-popover-menu.show {
  display: block;
}
.ef-menu-item {
  padding: 10px;
  color: #eee;
  cursor: pointer;
}
.ef-menu-item:hover {
  background: #333;
}

/* Modais */
.ef-auth-modal,
.ef-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ef-login-box {
  background: #141414;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 350px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}
.ef-close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}
.ef-modal {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
.ef-modal img {
  max-width: 100vw;
  max-height: 80vh;
  object-fit: contain;
}

/* ================== RESPONSIVIDADE (MENU SANDUÍCHE) =================== */
@media (max-width: 768px) {
  /* Mostra o botão hambúrguer */
  .ef-burger {
    display: block;
  }

  /* Esconde menu e usuário por padrão no mobile */
  .ef-nav,
  .ef-userbox {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  /* Quando a classe .show é adicionada via JS, o menu aparece */
  .ef-nav.show,
  .ef-userbox.show {
    display: flex;
    animation: slideDown 0.2s ease-out;
  }

  /* Estilização do Menu Aberto */
  .ef-nav {
    margin-top: 15px;
    border-top: 1px solid #222;
    padding-top: 10px;
  }

  .ef-navlink {
    width: 100%;
    padding: 12px 10px;
    box-sizing: border-box;
    border-radius: 8px;
    font-size: 1rem;
  }
  .ef-navlink:hover {
    background: #1a1a1a;
  }

  .ef-userbox {
    margin: 0;
    padding: 15px 10px;
    border-top: 1px solid #222;
    background: #111;
    margin-top: 5px;
    justify-content: space-between; /* Espalha email e botão sair */
    width: 100%;
    box-sizing: border-box;
  }

  /* Ajustes gerais mobile */
  .ef-wrap {
    padding: 15px;
    padding-bottom: 100px;
  }
  .ef-cams {
    grid-template-columns: 1fr 1fr;
  }
  .ef-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
  .ef-selection-bar {
    width: 90%;
    justify-content: space-between;
    bottom: 20px;
    border-radius: 12px;
  }
}

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