/* =========================================================
   APOLLO NETWORKS — STYLE PRINCIPAL [CORRIGIDO]
   - Base para index + prompt + login
   - Dark premium, sem duplicação
========================================================= */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  min-height:100vh;
  background: radial-gradient(circle at 80% -10%, rgba(139,92,246,0.12), transparent 30%), radial-gradient(circle at 10% 30%, rgba(236,72,153,0.05), transparent 25%), #08090d;
  color:#f7f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body.modal-open { overflow:hidden; }
button,input,textarea,select { font:inherit; }
button { border:0; background:none; cursor:pointer; }
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; }

/* HEADER */
.site-header [data-user-nav]{display:inline-flex;align-items:center;gap:20px}.site-header [data-user-nav] a{color:#8d8f9d;font-size:13px;font-weight:700}.site-header [data-user-nav] a:hover{color:#fff}.site-header [data-user-nav] button{color:#8d8f9d;font-size:13px;font-weight:700}.site-header [data-user-nav] button:hover{color:#fff}.user-nav-profile{display:inline-flex;align-items:center;gap:8px}.user-nav-avatar,.user-nav-initial{width:30px;height:30px;border-radius:9px;object-fit:cover}.user-nav-initial{display:grid;place-items:center;background:linear-gradient(135deg,#8b5cf6,#ec4899);color:#fff;font-size:11px;font-weight:800}.nav-primary{color:#a78bfa!important}

.site-header {
  position:sticky; top:0; z-index:100; width:100%;
  border-bottom:1px solid rgba(255,255,255,0.07);
  background: rgba(8,9,13,0.82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.header-inner {
  width:min(1240px, calc(100% - 40px));
  min-height:70px; display:flex; align-items:center; margin:0 auto; gap:20px;
}
.brand { display:inline-flex; align-items:center; color:#fff; font-size:20px; font-weight:850; letter-spacing:-0.9px; }
.brand-gradient, .brand span:last-child {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.main-navigation { display:flex; align-items:center; gap:28px; margin-left:44px; }
.main-navigation a { color:#8d8f9d; font-size:13px; font-weight:700; transition:color .2s; }
.main-navigation a:hover { color:#fff; }
.admin-nav-link {
  padding:7px 11px; border:1px solid rgba(139,92,246,0.28); border-radius:7px;
  background: rgba(139,92,246,0.08); color:#a78bfa !important; font-size:9px !important; font-weight:800 !important; letter-spacing:.3px;
}
.admin-nav-link:hover { border-color:rgba(139,92,246,0.5); background: rgba(139,92,246,0.13); color:#fff !important; }
.header-favorites-button, .header-favorite {
  margin-left:auto; display:inline-flex; align-items:center; gap:8px;
  height:38px; padding:0 14px;
  border:1px solid rgba(255,255,255,0.1); border-radius:999px;
  background: rgba(255,255,255,0.025); color:#a9aab7; font-size:11px; font-weight:650;
  transition: border-color .2s, background .2s, color .2s;
}
.header-favorites-button strong { color:#fff; min-width:16px; text-align:center; background: rgba(139,92,246,0.15); border-radius:999px; padding:1px 6px; font-size:10px; }
.header-favorites-button:hover { border-color: rgba(236,72,153,0.3); background: rgba(236,72,153,0.08); color:#f472b6; }

/* SECTIONS */
.section-container { width:min(1240px, calc(100% - 40px)); margin:0 auto; }
.hero-section { padding:70px 0 50px; }
.hero-content { max-width:700px; }
.hero-eyebrow { color:#a78bfa; font-size:9px; font-weight:850; letter-spacing:1.2px; text-transform:uppercase; }
.hero-content h1 { margin-top:12px; color:#fff; font-size: clamp(36px, 5vw, 58px); line-height:1.02; letter-spacing:-2px; font-weight:850; }
.hero-content h1 span { background: linear-gradient(135deg, #8b5cf6, #ec4899); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-content p { margin-top:14px; color:#8e90a0; font-size:14px; line-height:1.7; max-width:560px; }

.search-wrapper {
  position:relative; margin-top:24px; max-width:560px;
  display:flex; align-items:center;
  border:1px solid rgba(255,255,255,0.08); border-radius:14px;
  background: rgba(255,255,255,0.03); transition: border-color .2s, background .2s;
}
.search-wrapper:focus-within { border-color: rgba(139,92,246,0.4); background: rgba(255,255,255,0.05); }
.search-icon { position:absolute; left:14px; color:#656777; font-size:16px; }
.search-wrapper input {
  width:100%; height:50px; padding:0 16px 0 42px;
  border:0; outline:none; background:transparent; color:#fff; font-size:12px;
}
.search-wrapper input::placeholder { color:#575967; }

.category-pills { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.category-pill {
  min-height:32px; padding:0 14px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color:#8e90a0; font-size:10px; font-weight:700; transition:.2s;
}
.category-pill:hover { border-color: rgba(255,255,255,0.15); color:#fff; }
.category-pill.active { border-color: rgba(139,92,246,0.4); background: rgba(139,92,246,0.12); color:#fff; }

.categories-section, .prompts-section { padding:60px 0; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; flex-wrap:wrap; }
.section-eyebrow { color:#a78bfa; font-size:9px; font-weight:850; letter-spacing:1px; text-transform:uppercase; margin-bottom:7px; display:block; }
.section-heading h2 { color:#fff; font-size:28px; line-height:1.1; letter-spacing:-1.1px; font-weight:800; }
.section-heading p { margin-top:8px; color:#6f7180; font-size:11px; }
.section-link { color:#a78bfa; font-size:10px; font-weight:700; }
.section-link:hover { color:#fff; }

.category-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; }
.category-card {
  text-align:left; padding:18px; border-radius:16px;
  border:1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.02);
  transition:.2s; width:100%;
}
.category-card:hover { transform: translateY(-3px); border-color: rgba(139,92,246,0.25); background: rgba(255,255,255,0.035); }
.category-card.active { border-color: rgba(139,92,246,0.4); background: rgba(139,92,246,0.1); }
.category-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background: rgba(139,92,246,0.12); color:#a78bfa; margin-bottom:12px; font-size:16px; }
.category-card-content strong { color:#fff; font-size:13px; display:block; }
.category-card-content small { color:#707281; font-size:10px; line-height:1.5; display:block; margin-top:4px; }
.category-card-content em { color:#575967; font-size:9px; font-style:normal; margin-top:10px; display:block; }

.prompt-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:15px; }
.prompt-card {
  overflow:hidden; border:1px solid rgba(255,255,255,0.07); border-radius:16px;
  background: rgba(255,255,255,0.02); transition:.25s;
}
.prompt-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,0.22); background: rgba(255,255,255,0.035); }
.prompt-image-wrapper { position:relative; overflow:hidden; aspect-ratio:1/0.85; background:#111219; }
.prompt-image { width:100%; height:100%; object-fit:cover; transition: transform .35s; }
.prompt-card:hover .prompt-image { transform: scale(1.04); }
.prompt-overlay { position:absolute; top:10px; left:10px; }
.prompt-category { padding:4px 8px; border-radius:999px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); color:#fff; font-size:8px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; }
.favorite-button {
  position:absolute; top:10px; right:10px; width:32px; height:32px; display:grid; place-items:center;
  border-radius:50%; border:1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  color:#fff; font-size:14px; transition:.2s;
}
.favorite-button:hover { background: rgba(236,72,153,0.15); border-color: rgba(236,72,153,0.3); }
.favorite-button.active { background: rgba(236,72,153,0.18); border-color: rgba(236,72,153,0.35); color:#f472b6; }

.prompt-card-content { padding:14px; }
.prompt-card-content h3 { color:#fff; font-size:12px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prompt-card-content p { margin-top:6px; color:#707281; font-size:10px; line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:30px; }
.prompt-card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:12px; gap:8px; }
.prompt-stats { display:flex; gap:10px; color:#77798a; font-size:9px; }
.prompt-view-button { color:#a78bfa; font-size:9px; font-weight:700; }
.prompt-view-button:hover { color:#fff; }

.library-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:14px 16px; border:1px solid rgba(255,255,255,0.06); border-radius:14px; background: rgba(255,255,255,0.02); margin-bottom:20px;
}
.library-toolbar-info { display:flex; align-items:center; gap:12px; }
.library-toolbar-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; background: rgba(139,92,246,0.12); color:#a78bfa; }
.library-toolbar-info strong { color:#fff; font-size:11px; display:block; }
.library-toolbar-info small { color:#6f7180; font-size:10px; }
.sort-control { display:flex; align-items:center; gap:8px; }
.sort-control label { color:#77798a; font-size:9px; font-weight:700; }
.sort-control select { height:34px; padding:0 10px; border-radius:8px; border:1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color:#fff; font-size:10px; outline:none; }

/* MODAL */
.prompt-modal {
  position:fixed; inset:0; z-index:200;
  display:none; align-items:center; justify-content:center;
  padding:20px; background: rgba(0,0,0,0.65); backdrop-filter: blur(12px);
}
.prompt-modal.active { display:flex; }
.modal-container {
  position:relative; width:min(980px, 100%); max-height:90vh; overflow:auto;
  display:grid; grid-template-columns: 1fr 1fr;
  border:1px solid rgba(255,255,255,0.08); border-radius:20px; background: #13141c;
}
.modal-close { position:absolute; top:12px; right:12px; z-index:5; width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background: rgba(0,0,0,0.5); color:#fff; font-size:20px; }
.modal-image-wrapper { background:#0f1017; }
.modal-image { width:100%; height:100%; object-fit:cover; aspect-ratio:1/1; }
.modal-content { padding:24px; }
.modal-category { display:inline-flex; padding:5px 10px; border-radius:999px; border:1px solid rgba(139,92,246,0.3); background: rgba(139,92,246,0.08); color:#a78bfa; font-size:8px; font-weight:800; letter-spacing:.8px; text-transform:uppercase; }
.modal-content h2 { margin-top:14px; color:#fff; font-size:24px; line-height:1.1; letter-spacing:-1px; }
.modal-content p { margin-top:10px; color:#8e90a0; font-size:11px; line-height:1.6; }
.modal-prompt-box { margin-top:18px; padding:16px; border:1px solid rgba(255,255,255,0.07); border-radius:12px; background: rgba(255,255,255,0.02); }
.modal-prompt-header { display:flex; justify-content:space-between; color:#77798a; font-size:8px; font-weight:800; letter-spacing:1px; margin-bottom:10px; }
.modal-prompt-text { color:#b8bac6; font-size:11px; line-height:1.7; white-space:pre-line; }
.modal-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.modal-copy-button { min-height:40px; padding:0 14px; border-radius:9px; background: linear-gradient(135deg, #8b5cf6, #ec4899); color:#fff; font-size:10px; font-weight:750; }
.modal-favorite-button { min-height:40px; padding:0 14px; border-radius:9px; border:1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color:#a3a5b3; font-size:10px; font-weight:750; }
.modal-favorite-button.active { border-color: rgba(236,72,153,0.3); background: rgba(236,72,153,0.08); color:#f472b6; }
.modal-full-page-button { min-height:40px; display:inline-flex; align-items:center; padding:0 14px; color:#77798a; font-size:10px; font-weight:700; }
.modal-full-page-button:hover { color:#fff; }

/* TOAST */
.toast {
  position:fixed; right:24px; bottom:24px; z-index:500; max-width:320px;
  padding:12px 16px; border:1px solid rgba(255,255,255,0.09); border-radius:10px;
  background: rgba(18,19,27,0.96); color:#fff; font-size:10px; font-weight:700;
  box-shadow: 0 15px 45px rgba(0,0,0,0.4);
  opacity:0; visibility:hidden; transform: translateY(10px); transition:.2s;
}
.toast.show { opacity:1; visibility:visible; transform: translateY(0); }

/* FOOTER */
.site-footer { border-top:1px solid rgba(255,255,255,0.06); padding:50px 0 30px; margin-top:40px; }
.footer-container { width:min(1240px, calc(100% - 40px)); margin:0 auto; display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; }
.footer-brand .brand { font-size:18px; }
.footer-brand p { margin-top:10px; color:#6f7180; font-size:10px; line-height:1.6; max-width:280px; }
.footer-links { display:flex; gap:50px; }
.footer-links strong { color:#fff; font-size:10px; display:block; margin-bottom:10px; }
.footer-links a { display:block; color:#77798a; font-size:10px; margin-top:6px; }
.footer-links a:hover { color:#fff; }
.footer-bottom { width:min(1240px, calc(100% - 40px)); margin:30px auto 0; padding-top:20px; border-top:1px solid rgba(255,255,255,0.05); color:#555767; font-size:9px; }

/* EMPTY STATES */
.empty-state, .favorites-empty { grid-column:1/-1; padding:40px; border:1px dashed rgba(255,255,255,0.08); border-radius:14px; text-align:center; }
.empty-state strong, .favorites-empty h3 { color:#fff; font-size:14px; }
.empty-state p, .favorites-empty p { color:#6f7180; font-size:10px; margin-top:6px; }
.favorites-empty-icon { width:48px; height:48px; display:grid; place-items:center; margin:0 auto 12px; border-radius:12px; background: rgba(139,92,246,0.1); color:#a78bfa; font-size:20px; }
.favorites-count-label { color:#77798a; font-size:10px; }
.favorites-count-label strong { color:#fff; }

/* RESPONSIVE */
@media (max-width:1050px) {
  .category-grid, .prompt-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .modal-container { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
  .header-inner { width: calc(100% - 28px); min-height:62px; }
  .main-navigation { display:none; }
  .section-container { width: calc(100% - 28px); }
  .category-grid, .prompt-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; }
  .hero-section { padding:40px 0 30px; }
  .library-toolbar { flex-direction:column; align-items:flex-start; }
}
@media (max-width:480px) {
  .category-grid, .prompt-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   APOLLO NETWORKS — NAVEGAÇÃO COMPARTILHADA
   Corrige páginas que usam <header><nav> sem a navegação
   principal da home e mantém espaçamento consistente.
========================================================= */
.site-header > nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header > nav a,
.site-header > nav button {
  color: #a6a8b5;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.site-header > nav a:hover,
.site-header > nav button:hover {
  color: #fff;
}

.site-header > nav [data-user-nav] {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 760px) {
  .site-header > nav {
    gap: 12px;
    overflow-x: auto;
    max-width: 70vw;
    padding-bottom: 2px;
  }

  .site-header > nav [data-user-nav] {
    gap: 12px;
  }

  .site-header > nav a,
  .site-header > nav button {
    font-size: 12px;
  }
}


/* APOLLO NETWORKS — navegação de usuário */
.site-header [data-user-nav]{display:inline-flex;align-items:center;gap:14px}.user-nav-profile{display:inline-flex;align-items:center;gap:8px}.user-nav-profile a{display:inline-flex;align-items:center}.user-nav-avatar,.user-nav-initial{width:30px;height:30px;border-radius:10px;object-fit:cover}.user-nav-initial{display:grid;place-items:center;background:linear-gradient(135deg,#8b5cf6,#ec4899);color:#fff;font-size:12px;font-weight:850}.site-header nav button[data-logout]{padding:0;border:0;background:transparent;cursor:pointer}
