:root {
  --text-color: #ffffff;
  --overlay-color: rgba(0, 0, 0, 0.5);
  --base-font: "Libre Franklin", sans-serif;
  --hero-font: "Dela Gothic One", sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  font-family: var(--base-font);
  color: var(--text-color);
}

body {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  padding: 1.25rem 2rem;
  background: transparent;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-block;
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.2s ease;
  margin-top: 0.2rem;
  margin-left: 0.2rem;
}

.logo:hover {
  opacity: 1;
}

.logo-image {
  display: block;
  height: 2.6rem;
  max-width: min(14rem, 42vw);
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 0.1rem 0.45rem rgba(0, 0, 0, 0.35));
}

.header-logout-form {
  margin: 0;
}

.header-logout-button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: var(--text-color);
  padding: 0.45rem 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.header-logout-button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
}

.header-right-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.gallery {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
  z-index: 0;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-color);
  z-index: 0;
}

.slide.no-overlay::before {
  display: none;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-title {
  font-family: var(--hero-font);
  text-transform: none;
  letter-spacing: 0.06em;
  line-height: 0.9;
  font-size: clamp(2.8rem, 8vw, 6rem);
  margin-bottom: 1.8rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.1rem;
  padding: 1.1rem 2.8rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: none;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.hero-cta:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  border-color: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(0);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.slider-arrow-left {
  left: 1.2rem;
}

.slider-arrow-right {
  right: 1.2rem;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 4.1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 4;
}

.slider-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.slider-dot.is-active {
  background: #ffffff;
}

.gallery-hotkeys {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: none;
}

.gallery-hotkey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  user-select: none;
}

.gallery-hotkey-icon {
  font-family: var(--base-font);
  line-height: 1;
  text-transform: none;
}

.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  padding: 0.9rem 2rem 1rem;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(1.15rem + 2pt);
  height: calc(1.15rem + 2pt);
  color: var(--text-color);
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.social-link svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.footer-copy {
  margin-left: 0;
  opacity: 0.7;
}

.footer-socials {
  margin-left: auto;
}

.footer-links {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.footer-about-link {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.7;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.footer-about-link:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.85);
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.about-modal.is-open {
  display: block;
}

.about-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.about-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 2.2rem));
  margin: min(12vh, 7rem) auto;
  padding: 2rem 1.8rem 1.7rem;
  background: rgba(14, 14, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.about-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.about-modal__close:hover {
  opacity: 1;
}

.about-modal__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  opacity: 0.74;
}

.about-modal__title {
  margin-top: 0.55rem;
  font-family: var(--hero-font);
  font-size: clamp(2rem, 4vw, 3rem);
}

.about-modal__text {
  margin-top: 1rem;
  max-width: 65ch;
  line-height: 1.55;
  opacity: 0.93;
  white-space: pre-wrap;
}

.about-modal__action {
  margin-top: 1.25rem;
}

body.about-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .header {
    padding: 1rem 1.25rem;
    font-size: 0.74rem;
  }

  .slide {
    padding: 1.25rem;
  }

  .hero-subtitle {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-cta {
    margin-top: 1.5rem;
    padding: 0.9rem 2rem;
    font-size: 0.88rem;
  }

  .footer {
    padding: 0.8rem 1rem 0.85rem;
    font-size: 0.84rem;
    gap: 0.75rem;
  }

  .footer-socials {
    gap: 0.65rem;
  }

  .footer-links {
    margin-left: 0;
  }

  .social-link {
    width: calc(1.05rem + 2pt);
    height: calc(1.05rem + 2pt);
  }

  .about-modal__dialog {
    width: calc(100vw - 1.2rem);
    margin: 0.6rem auto;
    min-height: calc(100vh - 1.2rem);
    padding: 1.2rem 1rem;
  }

  .about-modal__title {
    font-size: clamp(1.5rem, 8vw, 2.3rem);
  }

  .slider-arrow {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.6rem;
  }

  .slider-arrow-left {
    left: 0.7rem;
  }

  .slider-arrow-right {
    right: 0.7rem;
  }

  .slider-dots {
    bottom: 3.4rem;
    gap: 0.5rem;
  }

  .slider-dot {
    width: 0.55rem;
    height: 0.55rem;
  }

  .header-right-tools {
    gap: 0.4rem;
  }

  .gallery-hotkeys {
    gap: 0.34rem;
  }

  .gallery-hotkey {
    width: 2.05rem;
    height: 2.05rem;
    font-size: 0.64rem;
  }
}

.album-page {
  min-height: 100vh;
  background: #111;
  color: #fff;
  overflow: auto;
}

.album-container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.album-header {
  margin-bottom: 1.5rem;
}

.album-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.5rem 0.8rem;
}

.album-title {
  font-family: var(--hero-font);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.album-description {
  margin-top: 0.6rem;
  opacity: 0.9;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}

.album-item {
  margin: 0;
  background: #1a1a1a;
}

.album-item img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.album-empty {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.private-auth-gallery {
  display: grid;
  place-items: center;
}

.private-auth-modal {
  position: relative;
  z-index: 6;
  width: min(430px, 92vw);
  background: transparent;
  padding: 0.2rem;
}

.private-auth-heading {
  margin-bottom: 0.9rem;
}

.private-auth-title {
  font-family: var(--hero-font);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.1;
}

.private-auth-subtitle {
  margin-top: 0.45rem;
  opacity: 0.86;
}

.private-auth-error {
  margin-bottom: 0.3rem;
  color: #ff7f7f;
  font-size: 0.92rem;
}

.private-auth-form {
  margin-top: 0.15rem;
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.25rem 1.15rem;
}

.private-auth-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.private-auth-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0.68rem 0.72rem;
  outline: none;
}

.private-auth-input:focus {
  border-color: rgba(255, 255, 255, 0.82);
}

.private-auth-submit {
  width: 100%;
  margin-top: 0.45rem;
}

.private-auth-home {
  display: inline-block;
  margin-top: 0.95rem;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}

.private-auth-home:hover {
  opacity: 1;
}

.admin-body {
  min-height: 100vh;
  background: #0d0d0d;
  color: #fff;
  overflow: auto;
  font-size: calc(1rem + 2pt);
}

.admin-link {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0.4rem 0.7rem;
  font-size: 0.74rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-logo-form {
  margin-top: 0.8rem;
}

.admin-logo-preview {
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.55rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-logo-preview img {
  max-width: 100%;
  max-height: 70px;
  display: block;
}

.admin-logo-preview span {
  opacity: 0.85;
}

.admin-body .footer {
  font-size: 0.96rem;
}

.admin-main {
  width: 95%;
  margin: 0 auto;
  padding: 5rem 0 4.8rem;
  display: grid;
  gap: 1rem;
}

.admin-title {
  font-family: var(--hero-font);
  font-size: clamp(1.87rem, 4vw, 2.67rem);
}

.admin-modules-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-module-tab {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  padding: 0.45rem 0.72rem;
  cursor: pointer;
  font-size: calc(0.84rem + 2pt);
}

.admin-module-tab.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-color: rgba(255, 255, 255, 0.9);
}

.admin-message {
  padding: 0.7rem 0.8rem;
  border: 1px solid;
}

.admin-message.is-hidden {
  display: none;
}

.admin-message.is-success {
  border-color: #8fd48f;
  color: #8fd48f;
}

.admin-message.is-error {
  border-color: #ff8d8d;
  color: #ff8d8d;
}

.admin-section {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-section h2 {
  font-size: calc(1rem + 2pt);
  margin-bottom: 0.7rem;
}

.admin-module {
  display: none;
}

.admin-module.is-active {
  display: block;
}

.admin-form-grid {
  display: grid;
  gap: 0.6rem;
}

.admin-form-grid label {
  display: grid;
  gap: 0.28rem;
  font-size: calc(0.9rem + 2pt);
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-row-form input {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: calc(0.56rem + 1px) calc(0.62rem + 1px);
  min-height: calc(2.2rem + 2px);
  font-size: calc(1em + 2px);
}

.admin-form-grid textarea {
  resize: vertical;
  font-family: inherit;
}

.admin-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.65);
  padding: calc(1rem + 2px);
  text-align: center;
  cursor: pointer;
}

.admin-dropzone.is-dragover {
  background: rgba(255, 255, 255, 0.12);
}

.admin-dropzone input[type="file"] {
  display: none;
}

.admin-file-list {
  font-size: calc(0.84rem + 2pt);
  opacity: 0.9;
  word-break: break-word;
}

.admin-order-form {
  margin-bottom: 0.9rem;
}

.admin-order-note {
  opacity: 0.86;
  font-size: calc(0.86rem + 2pt);
}

.admin-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.admin-order-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: move;
}

.admin-order-item.is-dragging {
  opacity: 0.5;
}

.admin-order-handle {
  opacity: 0.85;
  font-size: calc(0.92rem + 2pt);
}

.admin-order-name {
  word-break: break-word;
}

.admin-album-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.7rem;
  margin-bottom: 0.6rem;
  display: grid;
  gap: 0.55rem;
}

.admin-album-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: calc(0.88rem + 2pt);
}

.admin-row-form {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 2fr auto;
  flex: 1 1 auto;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-actions > form:last-child {
  margin: 0;
}

.admin-btn {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: transparent;
  color: #fff;
  padding: calc(0.5rem + 1px) calc(0.76rem + 1px);
  min-height: calc(2.2rem + 2px);
  font-size: calc(1em + 2px);
  cursor: pointer;
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
}

.admin-btn-danger {
  border-color: rgba(255, 144, 144, 0.9);
  color: #ffb1b1;
}

.admin-empty {
  opacity: 0.85;
  font-size: calc(0.9rem + 2pt);
}

.admin-main-images {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.7rem;
}

.admin-main-image-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-main-image-card img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.admin-main-image-meta {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  word-break: break-all;
}

@media (max-width: 700px) {
  .admin-modules-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-module-tab {
    width: 100%;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-row-form {
    grid-template-columns: 1fr;
  }
}
