/*
Theme Name: Back to the 90ies - Antonia
Theme URI: https://di-biase.com
Author: Familie Di-Biase
Description: Retro-Geburtstagsdesign im 90er-Jahre-Stil für die Bildergalerie von Antonias Geburtstagsparty "Back to the 90ies".
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: back-to-the-90ies
*/

/* ===========================================================
   Grundlagen
=========================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
  color: #1a1a2e;
  background: repeating-linear-gradient(
      45deg,
      #ff6ec7 0px,
      #ff6ec7 40px,
      #ffe66d 40px,
      #ffe66d 80px
    );
  background-attachment: fixed;
}

a {
  color: #ff0080;
  text-decoration: none;
}

a:hover {
  color: #00e5ff;
  text-decoration: underline wavy;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===========================================================
   Layout-Wrapper
=========================================================== */
.site-wrapper {
  max-width: 1100px;
  margin: 30px auto;
  background: #ffffff;
  border: 6px solid #1a1a2e;
  border-radius: 14px;
  box-shadow: 10px 10px 0 #00e5ff, 20px 20px 0 #ff0080;
  overflow: hidden;
}

/* ===========================================================
   Header
=========================================================== */
.site-header {
  position: relative;
  padding: 50px 20px 40px;
  text-align: center;
  background: linear-gradient(135deg, #7b2ff7 0%, #f107a3 50%, #ff8a00 100%);
  color: #fff;
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  content: "★";
  position: absolute;
  font-size: 60px;
  color: rgba(255, 255, 255, 0.25);
  animation: spin 6s linear infinite;
}

.site-header::before {
  top: 10px;
  left: 5%;
}

.site-header::after {
  bottom: 10px;
  right: 5%;
  animation-direction: reverse;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.site-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 #1a1a2e, 7px 7px 0 #00e5ff;
}

.site-subtitle {
  font-size: 1.3rem;
  margin-top: 12px;
  font-weight: bold;
  color: #ffe66d;
  text-shadow: 2px 2px 0 #1a1a2e;
}

/* Laufband im 90er-Stil */
.marquee-bar {
  background: #1a1a2e;
  color: #ffe66d;
  padding: 10px 0;
  font-weight: bold;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
}

.marquee-bar span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===========================================================
   Navigation
=========================================================== */
.site-nav {
  background: #ffe66d;
  border-bottom: 4px dashed #1a1a2e;
  padding: 12px 20px;
  text-align: center;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: bold;
  text-transform: uppercase;
  color: #1a1a2e;
  border: 2px solid #1a1a2e;
  border-radius: 30px;
  padding: 6px 16px;
  background: #fff;
  transition: transform 0.15s ease;
}

.site-nav a:hover {
  background: #00e5ff;
  transform: scale(1.08) rotate(-2deg);
  text-decoration: none;
}

/* ===========================================================
   Content
=========================================================== */
.site-content {
  padding: 40px 30px;
}

.content-title {
  text-align: center;
  font-size: 2rem;
  color: #7b2ff7;
  text-shadow: 2px 2px 0 #ffe66d;
  margin-bottom: 30px;
}

/* ===========================================================
   Bildergalerie (Polaroid-Stil)
=========================================================== */
.gallery-90er {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.gallery-90er figure,
.wp-block-gallery figure,
.gallery-item {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 12px 40px;
  box-shadow: 6px 6px 0 rgba(26, 26, 46, 0.2);
  transform: rotate(-3deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.gallery-90er figure:nth-child(even),
.wp-block-gallery figure:nth-child(even) {
  transform: rotate(2deg);
}

.gallery-90er figure:hover,
.wp-block-gallery figure:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 10px 10px 0 #ff0080;
  z-index: 2;
}

.gallery-90er figcaption,
.wp-block-gallery figcaption {
  text-align: center;
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-size: 0.9rem;
  color: #1a1a2e;
  margin-top: 8px;
}

/* WordPress-Standardgalerie (Block-Editor) im gleichen Look */
.wp-block-gallery {
  gap: 30px !important;
}

.wp-block-image img {
  border: none;
}

/* ===========================================================
   Zurück-Button auf Galerie-Seiten
=========================================================== */
.b90-back-home {
  text-align: center;
  margin: 0 0 18px;
}

.b90-back-home a {
  display: inline-block;
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #1a1a2e;
  background: #ffe66d;
  border: 3px solid #1a1a2e;
  border-radius: 30px;
  padding: 8px 20px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.b90-back-home a:hover {
  background: #ff0080;
  color: #fff;
  transform: scale(1.05);
  text-decoration: none;
}

/* ===========================================================
   Wiederverwendbare Textbox im 90er-Stil
   (z. B. über einem Hintergrundbild im Cover-Block nutzbar:
   Block anklicken -> Erweitert -> "Zusätzliche CSS-Klasse(n)"
   -> b90-textbox eintragen)
=========================================================== */
.b90-textbox {
  background: rgba(255, 255, 255, 0.94);
  border: 4px dashed #1a1a2e;
  border-radius: 16px;
  padding: 26px 30px;
  max-width: 640px;
  margin: 20px auto;
  color: #1a1a2e;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
}

.b90-textbox h1,
.b90-textbox h2,
.b90-textbox h3 {
  color: #7b2ff7;
  text-shadow: 2px 2px 0 #ffe66d;
}

.b90-textbox a {
  color: #ff0080;
  font-weight: bold;
}

/* ===========================================================
   Videogalerie
=========================================================== */
.b90-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  padding: 10px 0;
}

.b90-video-page .wp-block-video,
.b90-video-grid .wp-block-video {
  margin: 0 0 10px;
}

.b90-video-tile {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 12px 16px;
  box-shadow: 6px 6px 0 rgba(26, 26, 46, 0.2);
  transform: rotate(-2deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b90-video-grid .b90-video-tile:nth-child(even) {
  transform: rotate(2deg);
}

.b90-video-tile:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 10px 10px 0 #00e5ff;
  z-index: 2;
}

.b90-video-tile video {
  width: 100%;
  border-radius: 4px;
}

.b90-video-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b90-video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.15);
  border-radius: 4px;
  transition: background 0.15s ease;
}

.b90-video-facade:hover::after {
  background: rgba(26, 26, 46, 0.35);
}

.b90-video-play {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ff0080;
  color: #fff;
  box-shadow: 0 0 0 4px #ffe66d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  padding-left: 6px; /* optisch zentrieren, Dreieck-Symbol */
  transition: transform 0.15s ease, background 0.15s ease;
}

.b90-video-facade:hover .b90-video-play {
  background: #00e5ff;
  color: #1a1a2e;
  transform: scale(1.1);
}

.b90-video-no-poster video {
  width: 100%;
  border-radius: 4px;
}

.b90-video-facade-loading {
  background-color: #1a1a2e;
  background-image: none !important;
}

.b90-video-facade-loading .b90-video-play {
  opacity: 0.4;
}

.b90-video-facade-fallback {
  background: linear-gradient(135deg, #7b2ff7, #ff0080);
}

/* ===========================================================
   Galerie-Hinweistext
=========================================================== */
.b90-gallery-hint {
  text-align: center;
  font-size: 0.95rem;
  color: #7b2ff7;
  margin-bottom: 20px;
}

/* ===========================================================
   Download-Toolbar über jeder Galerie
=========================================================== */
.b90-gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: #1a1a2e;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  position: sticky;
  top: 10px;
  z-index: 10;
}

.b90-btn {
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  border: 2px solid #ffe66d;
  background: transparent;
  color: #ffe66d;
  border-radius: 30px;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.b90-btn:hover {
  background: #ffe66d;
  color: #1a1a2e;
  transform: scale(1.05);
}

.b90-btn-primary {
  background: #ff0080;
  border-color: #ff0080;
  color: #fff;
}

.b90-btn-primary:hover {
  background: #00e5ff;
  border-color: #00e5ff;
  color: #1a1a2e;
}

.b90-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.b90-zip-status {
  color: #ffe66d;
  font-size: 0.85rem;
  font-weight: bold;
}

/* ===========================================================
   Foto-Kacheln: Checkbox + Einzel-Download-Button
=========================================================== */
.b90-photo {
  position: relative;
}

.b90-photo img {
  cursor: zoom-in;
}

.b90-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 4px;
  line-height: 0;
  box-shadow: 0 0 0 2px #1a1a2e;
}

.b90-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: #ff0080;
  cursor: pointer;
  display: block;
}

.wp-block-gallery figure.wp-block-image a.b90-download-single,
.gallery-90er figure a.b90-download-single,
a.b90-download-single {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 3 !important;
  background: #1a1a2e !important;
  color: #ffe66d !important;
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  box-shadow: 0 0 0 2px #ffe66d !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.b90-download-single:hover {
  background: #ff0080;
  color: #fff;
  transform: scale(1.12);
  text-decoration: none;
}

.b90-photo.is-selected {
  outline: 4px solid #ff0080;
  outline-offset: 2px;
}

/* ===========================================================
   Lightbox
=========================================================== */
.b90-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.94);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
}

.b90-lightbox.is-open {
  display: flex;
}

.b90-lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border: 4px solid #ffe66d;
  border-radius: 10px;
  box-shadow: 0 0 0 6px #ff0080;
}

.b90-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #ffe66d;
  cursor: pointer;
  line-height: 1;
}

.b90-lightbox-download {
  margin-top: 18px;
  background: #ff0080;
  color: #fff;
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 30px;
  text-decoration: none;
}

.b90-lightbox-download:hover {
  background: #00e5ff;
  color: #1a1a2e;
  text-decoration: none;
}

/* ===========================================================
   Passwort-Formular (WordPress-Standardformular gestylt)
=========================================================== */
.b90-password-gate {
  max-width: 420px;
  margin: 20px auto 40px;
  text-align: center;
  background: #ffe66d;
  border: 4px dashed #1a1a2e;
  border-radius: 14px;
  padding: 26px 24px;
}

.b90-password-gate p {
  font-weight: bold;
  color: #1a1a2e;
  margin-top: 0;
}

.post-password-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.post-password-form input[type="password"] {
  font-family: "Comic Sans MS", cursive, sans-serif;
  padding: 10px 14px;
  border: 3px solid #1a1a2e;
  border-radius: 8px;
  width: 100%;
  max-width: 220px;
  margin-right: 8px;
  font-size: 1rem;
}

.post-password-form input[type="submit"] {
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  background: #ff0080;
  color: #fff;
  border: 3px solid #1a1a2e;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  margin-top: 10px;
}

.post-password-form input[type="submit"]:hover {
  background: #00e5ff;
  color: #1a1a2e;
}

.post-password-form .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===========================================================
   Footer
=========================================================== */
.site-footer {
  background: #1a1a2e;
  color: #ffe66d;
  text-align: center;
  padding: 25px 20px;
  font-size: 0.9rem;
  border-top: 6px solid #ff0080;
}

.site-footer .cassette {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

/* ===========================================================
   Responsive
=========================================================== */
@media (max-width: 600px) {
  .site-wrapper {
    margin: 10px;
    box-shadow: 5px 5px 0 #00e5ff, 10px 10px 0 #ff0080;
  }

  .site-header {
    padding: 35px 15px 30px;
  }

  .site-content {
    padding: 25px 15px;
  }
}
