:root {
  --bg: #040404;
  --bg-soft: #0c0907;
  --bg-deep: #120d08;
  --card: rgba(10, 8, 6, 0.82);
  --card-strong: rgba(16, 11, 7, 0.92);
  --gold: #c89a3d;
  --gold-strong: #f1c979;
  --gold-soft: #f3ddb0;
  --champagne: #f7e6bf;
  --red: #3b120d;
  --red-strong: #6e1d12;
  --text: #f8ecd3;
  --muted: #cdbb97;
  --line: rgba(200, 154, 61, 0.24);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  position: relative;
  background:
    radial-gradient(circle at top, rgba(241, 201, 121, 0.08), transparent 22%),
    radial-gradient(circle at center, rgba(200, 154, 61, 0.06), transparent 38%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 55%, #090909 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4,4,4,0.22), rgba(4,4,4,0.66)),
    url('../img/logo-casa-dos-prazeres.png') center 90px / min(720px, 74vw) no-repeat;
  opacity: 0.17;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(241, 201, 121, 0.10), transparent 18%),
    radial-gradient(circle at 50% 16%, rgba(255, 215, 140, 0.06), transparent 32%);
  pointer-events: none;
  z-index: -1;
}

body.security-blur .protect-area .gallery-image,
body.security-blur .protect-area .gallery-image-wrap {
  filter: blur(14px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
  pointer-events: none;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-logo {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.12);
}

.brand strong {
  display: block;
  font-family: "Cinzel", serif;
  letter-spacing: 0.06em;
}

.brand small,
.muted,
.warning,
.footer small,
#folderStatus {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--champagne);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-strong), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: 0.25s ease;
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-links a:hover { color: var(--gold-soft); }

.hero-content {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 70px 0 100px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  color: var(--gold-soft);
  margin-bottom: 12px;
}

h1, h2, h3 { margin: 0 0 14px; }

h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  line-height: 1.12;
  max-width: 100%;
}

.hero-title {
  max-width: 18ch;
}

.hero-teaser {
  margin: 8px 0 16px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}

h2 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.lead {
  max-width: 700px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #efe3cd;
  text-shadow: 0 1px 12px rgba(0,0,0,0.24);
}

.hero-logo-frame {
  display: inline-flex;
  padding: 14px;
  margin-bottom: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18,13,8,0.72), rgba(8,8,8,0.58));
}

.hero-logo {
  width: min(100%, 480px);
  border-radius: 20px;
  border: 1px solid rgba(200, 154, 61, 0.28);
  box-shadow: 0 0 42px rgba(241, 201, 121, 0.08);
}

.hero-actions,
.gallery-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 22px;
  transition: 0.25s ease;
  font-weight: 700;
}

.btn-small {
  padding: 10px 16px;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--champagne), var(--gold-strong) 48%, var(--gold));
  color: #130d02;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.18);
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(33, 21, 11, 0.96), rgba(12, 10, 8, 0.96));
  color: var(--gold-soft);
  border: 1px solid rgba(200, 154, 61, 0.16);
}

.btn-secondary:hover {
  box-shadow: 0 12px 24px rgba(181, 18, 37, 0.18);
}

.btn-outline {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.btn-outline:hover {
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.08);
}

.glass,
.card,
.empty-state,
.folder-box,
.message,
.modal-panel,
.security-overlay-box {
  background: linear-gradient(180deg, rgba(18,13,8,0.84), rgba(8,8,8,0.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel,
.card,
.empty-state,
.folder-box,
.message,
.modal-panel,
.security-overlay-box {
  border-radius: 24px;
}

.hero-panel,
.card,
.modal-panel {
  padding: 28px;
}

.hero-panel ol { padding-left: 18px; line-height: 1.9; }
.section { padding: 88px 0; }

.section-accent {
  background: linear-gradient(180deg, rgba(200,154,61,0.08), rgba(0,0,0,0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.card p,
.card li {
  color: #e8dcc7;
  line-height: 1.8;
}

.upload-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
}

.admin-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.2);
  font-weight: 700;
}

.folder-box {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px;
  margin: 22px 0;
}

.upload-form,
.login-form {
  display: grid;
  gap: 18px;
}

.upload-form label,
.login-form label {
  display: grid;
  gap: 10px;
  font-weight: 600;
}

.upload-form input,
.login-form input {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
}

.upload-form input:focus,
.login-form input:focus {
  outline: 2px solid rgba(212, 175, 55, 0.35);
  border-color: rgba(212, 175, 55, 0.35);
}

.message {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(212,175,55,0.08);
}

.message.error {
  background: rgba(181, 18, 37, 0.14);
  border-color: rgba(181, 18, 37, 0.35);
}

.hidden { display: none !important; }

.gallery-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.gallery-card {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15,10,7,0.98), rgba(7,7,7,0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.gallery-image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, #110c08, #050505);
  user-select: none;
  -webkit-user-select: none;
}

.gallery-image-wrap::after {
  content: "CASA DOS PRAZERES • PROTEGIDO • CASA DOS PRAZERES • PROTEGIDO";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 0.92rem;
  letter-spacing: 0.34em;
  color: rgba(255,255,255,0.13);
  background:
    repeating-linear-gradient(
      -32deg,
      rgba(200, 154, 61, 0.06) 0 2px,
      transparent 2px 110px
    );
  pointer-events: none;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.25s ease;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.gallery-card:hover .gallery-image { transform: scale(1.04); }

.gallery-info { padding: 18px; }
.gallery-info h3 { font-size: 1.08rem; margin-bottom: 6px; }
.gallery-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, 500px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

.security-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
}

.security-overlay-box {
  width: min(100% - 24px, 520px);
  padding: 24px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-content,
  .upload-layout,
  .info-grid { grid-template-columns: 1fr; }

  .nav,
  .gallery-head,
  .folder-box,
  .footer-inner,
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .section { padding: 72px 0; }
  .hero-content { padding-top: 36px; }
  body::before {
    background:
      linear-gradient(180deg, rgba(4,4,4,0.28), rgba(4,4,4,0.74)),
      url('../img/logo-casa-dos-prazeres.png') center 120px / min(520px, 84vw) no-repeat;
    opacity: 0.15;
  }
  .btn { width: 100%; text-align: center; }
  .nav-links { width: 100%; flex-wrap: wrap; }
  .brand-logo { width: 82px; height: 54px; }
  .hero-logo-frame { padding: 10px; }
}


.field-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

body.gallery-locked .protect-area {
  position: relative;
}

body.gallery-locked .protect-area::before {
  content: "";
  position: absolute;
  inset: 92px 0 0;
  background: linear-gradient(180deg, rgba(4,4,4,0.16), rgba(4,4,4,0.88));
  backdrop-filter: blur(18px);
  border-radius: 28px;
  z-index: 1;
  pointer-events: none;
}

.locked-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.badge-soft {
  background: rgba(247, 230, 191, 0.08);
  color: var(--champagne);
}

#lockedGalleryState,
#emptyState,
#galleryGrid {
  position: relative;
  z-index: 2;
}

.gallery-watermark::before {
  content: "ÁREA RESTRITA";
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.55);
  border: 1px solid rgba(255, 231, 188, 0.16);
  color: rgba(255, 231, 188, 0.88);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.protect-area,
.protect-area * {
  -webkit-touch-callout: none;
}

.security-overlay strong {
  display: block;
  margin-bottom: 8px;
  color: var(--champagne);
}
