/* =========================================================
   Bilder aus der Box – Aurora (Orange/Violett) Theme
   (Startseite + Galerie + Viewer + Admin)
   ========================================================= */

/* ---------- Tokens ---------- */
:root{
  /* Core */
  --bg:#060816;                   /* dunkles Indigo */
  --bg-top:#1a0b2e;               /* violett */
  --bg-bottom:#060816;

  /* Accent (Orange/Violett) */
  --accent:#ff8c00;               /* orange */
  --accent2:#a855f7;              /* violett */
  --accentBright:#ffc36a;         /* helles orange */
  --accent2Bright:#c084fc;        /* helles violett */

  /* Text */
  --text:#f9fafb;
  --muted:#cbd5e1;

  /* Surfaces */
  --card:rgba(15,23,42,0.90);
  --card2:rgba(49,19,89,0.30);    /* violetter Schimmer */
  --surface:rgba(2,6,23,0.55);    /* Inputs */
  --line:rgba(255,255,255,0.10);

  /* Shadows */
  --shadow1:0 20px 40px rgba(0,0,0,0.70);
  --shadow2:0 0 0 1px rgba(168,85,247,0.35);

  /* Radius */
  --r-lg:18px;
  --r-md:14px;
  --r-sm:12px;

  /* Motion */
  --ease:cubic-bezier(.2,.8,.2,1);

  /* Links + Admin row hover */
  --link:var(--accentBright);
  --linkHover:var(--accent2Bright);

  /* Hoverfarbe Tabellenzeile (Admin) */
  --rowHover: rgba(255,140,0,0.08); /* orange glow (anpassen) */

  color-scheme: dark;
}

/* ---------- Reset / Base ---------- */
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);

  /* Aurora background (Orange/Violett) */
  background:
    radial-gradient(circle at 0% 0%, rgba(168,85,247,0.22), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(255,140,0,0.18), transparent 55%),
    radial-gradient(circle at 30% 120%, rgba(255,195,106,0.10), transparent 55%),
    linear-gradient(160deg,var(--bg-top),var(--bg-bottom));

  min-height:100vh;
}

/* Links */
a{color:var(--link); text-decoration:none;}
a:hover{color:var(--linkHover); text-decoration:underline;}

/* ---------- Layout ---------- */
.container{
  max-width:720px;
  margin:0 auto;
  padding:24px 16px;
}
.container.wide{
  max-width:1200px;
}

/* ---------- Card (Glass + Pattern Overlay) ---------- */
.card{
  position:relative;
  overflow:hidden;

  background:
    linear-gradient(145deg,var(--card),rgba(6,8,22,0.88)),
    radial-gradient(circle at 20% 0%, rgba(168,85,247,0.18), transparent 55%);
  border:1px solid rgba(255,255,255,0.10);
  border-radius:var(--r-lg);
  padding:20px;

  box-shadow:var(--shadow1), var(--shadow2);
  backdrop-filter: blur(10px);

  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(168,85,247,0.10),
      rgba(168,85,247,0.10) 8px,
      transparent 8px,
      transparent 18px
    );
  opacity:0.55;
  mix-blend-mode:soft-light;
  pointer-events:none;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,140,0,0.14), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(168,85,247,0.12), transparent 45%);
  pointer-events:none;
}

.card > *{position:relative; z-index:1;}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,195,106,0.22);
  box-shadow: 0 26px 55px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,140,0,0.22);
}

/* ---------- Typography ---------- */
h1,h2,h3{margin:0 0 10px;}
.title .app{font-size:.9rem;color:rgba(203,213,225,0.85);}
.title .event{font-size:1.05rem;font-weight:750;letter-spacing:.02em;}
.muted{color:rgba(203,213,225,0.85);}
.small{font-size:.9rem;}

label{
  display:block;
  margin:14px 0 6px;
  color:rgba(203,213,225,0.85);
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:.12em;
}

/* ---------- Forms ---------- */
input, textarea{
  width:100%;
  padding:12px;
  border-radius:var(--r-sm);
  border:1px solid rgba(168,85,247,0.35);
  background:var(--surface);
  color:var(--text);
  outline:none;
}
textarea{resize:vertical;}

input:focus, textarea:focus{
  border-color: rgba(255,140,0,0.70);
  box-shadow: 0 0 0 3px rgba(255,140,0,0.18);
}

/* ---------- Alerts ---------- */
.alert{
  margin:12px 0;
  padding:10px 12px;
  border-radius:var(--r-sm);
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.10);
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:10px 14px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  user-select:none;

  color:#120a20;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;

  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow: 0 14px 28px rgba(168,85,247,0.22), 0 14px 28px rgba(255,140,0,0.18);

  transition: transform .12s var(--ease), filter .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover{
  filter:brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(168,85,247,0.28), 0 18px 36px rgba(255,140,0,0.22);
}
.btn:active{transform:translateY(0) scale(.99);}

.btn.primary{
  margin-top:14px;
  width:100%;
}

/* Small buttons (Admin actions) */
.btn.btn-sm{
  padding:10px 14px;
  margin-left:6px;
}

/* ---------- Topbar / Header (Glass) ---------- */
.topbar,
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter: blur(12px);

  background: rgba(2,6,23,0.55);
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.topbar-inner,
.site-header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* ---------- Brand ---------- */
.brand{display:flex;gap:12px;align-items:center;}
.brand-logo{width:44px;height:44px;object-fit:contain;}
.brand-title{font-weight:850; letter-spacing:.10em; text-transform:uppercase;}
.brand-sub{font-size:.85rem; color:rgba(203,213,225,0.80); letter-spacing:.08em; text-transform:uppercase;}

/* ---------- Nav ---------- */
.nav{display:flex;gap:10px;flex-wrap:wrap;}
.site-nav{display:flex; gap:12px; flex-wrap:wrap; align-items:center;}

.site-nav a{
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
  background:transparent;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.site-nav a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}
.site-nav a.pill{
  border-color: rgba(168,85,247,0.35);
  background: rgba(168,85,247,0.10);
}
.site-nav a.pill:hover{
  border-color: rgba(255,140,0,0.35);
  background: rgba(255,140,0,0.10);
}

/* ---------- Hero / Sections (Homepage) ---------- */
.hero{padding:28px 0 10px;}
.hero-inner{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;

  display:grid;
  grid-template-columns: 1fr;   /* untereinander */
  gap:16px;
  align-items:start;
}

.hero-copy h1{font-size:2rem; margin:0 0 10px; letter-spacing:.02em;}
.hero-lead{font-size:1.05rem; line-height:1.6; color:rgba(203,213,225,0.85);}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px;}
.hero-card .card{padding:18px;}

.section{padding:10px 0 20px;}
.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 920px){
  .hero-inner{grid-template-columns:1fr;}
  .two-col{grid-template-columns:1fr;}
  .hero-copy h1{font-size:1.7rem;}
}

/* ---------- Gallery Grid ---------- */
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
@media (min-width:520px){.grid{grid-template-columns:repeat(3,1fr);}}
@media (min-width:820px){.grid{grid-template-columns:repeat(5,1fr);}}
@media (min-width:1100px){.grid{grid-template-columns:repeat(7,1fr);gap:14px;}}

/* ---------- Thumbnails (3:2) + Premium Hover ---------- */
.thumb{
  display:block;
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(2,6,23,0.35);
  aspect-ratio:3 / 2;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);

  transform: translateZ(0);
  transition: transform .20s var(--ease), box-shadow .20s var(--ease), border-color .20s var(--ease);
}

.thumb img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  transition: transform .35s var(--ease), filter .35s var(--ease);
  transform: scale(1.01);
}

.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.55) 100%);
  opacity:0;
  transition: opacity .22s var(--ease);
  pointer-events:none;
}

.thumb::before{
  content:"↗";
  position:absolute;
  right:10px;
  top:10px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background: rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.55);
  color:#111;
  opacity:0;
  transform: translateY(-4px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  pointer-events:none;
}

.thumb:hover{
  transform: translateY(-3px);
  border-color: rgba(255,195,106,0.28);
  box-shadow: 0 26px 60px rgba(0,0,0,0.55);
}
.thumb:hover img{
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.05);
}
.thumb:hover::after{opacity:1;}
.thumb:hover::before{opacity:1; transform: translateY(0);}

/* ---------- Viewer ---------- */
body.viewer{overflow:hidden;}

.viewer-main{
  height:calc(100vh - 58px);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 10px 18px;
}

.stage{
  margin:0;
  width:min(1200px,92vw);
  height:calc(100vh - 120px);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.stage img{
  max-width:100%;
  max-height:100%;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(2,6,23,0.35);
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
  display:block;
}

.caption{
  position:absolute;
  bottom:-28px;
  left:0;
  right:0;
  text-align:center;
  color: rgba(203,213,225,0.85);
}

/* Viewer nav buttons */
.nav-btn{
  width:54px;
  height:54px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(2,6,23,0.55);
  color: var(--text);
  font-size:28px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.nav-btn:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,195,106,0.25);
  transform: translateY(-1px);
}
.nav-btn:disabled{opacity:.35;cursor:not-allowed;}

@media (max-width:520px){
  .nav-btn{width:44px;height:44px;font-size:24px;}
  .stage{width:94vw;}
}

/* ---------- Footer ---------- */
.footer{padding:16px 0 28px;}

.site-footer{
  border-top:1px solid rgba(255,255,255,0.08);
  background: rgba(2,6,23,0.35);
  padding:18px 0 26px;
}
.site-footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================================================
   Admin – full width + table (übersichtlich & luftig)
   ========================================================= */

/* Admin darf volle Viewport-Breite nutzen (wenn im <main> gesetzt) */
.admin-full{
  max-width:none !important;
  width: calc(100vw - 32px);
}

/* Table wrapper */
.table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--card);
}

/* Table */
.table{
  width:100%;
  max-width:100%;
  border-collapse:separate;
  border-spacing:0 6px; /* vertikale Luft zwischen Zeilen */
}

/* Kopf */
.table thead th{
  text-align:left;
  padding:14px 16px;
  font-size:.9rem;
  color:var(--muted);
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}

/* Zellen: WICHTIG für Hover (Fläche + Transition) */
.table tbody td{
  padding:16px 16px;
  background-color: rgba(255,255,255,0.00); /* definierte Basis */
  transition: background-color .15s var(--ease);
  border-bottom:none;
  vertical-align:middle;
}

/* Hover: nutzt die Variable aus :root */
.table tbody tr:hover td{
  background-color: var(--rowHover);
}

/* numerische Spalten */
.table .num{
  text-align:right;
  font-variant-numeric:tabular-nums;
  width:8%;
}

/* Event-Spalte bekommt Raum */
.table th:first-child,
.table td:first-child{
  width:28%;
}

/* Status */
.table th:nth-child(2),
.table td:nth-child(2){
  width:10%;
}

/* Aktionen kompakt, aber luftig */
.table .actions{
  text-align:right;
  white-space:nowrap;
  width:18%;
}

/* Zellen im Event */
.cell-title{font-weight:650;}
.cell-sub{
  margin-top:2px;
  font-size:.85rem;
  color:var(--muted);
}

/* Status-Chips */
.chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:.85rem;
  border:1px solid var(--line);
  white-space:nowrap;
}
.chip-ok{
  background:rgba(16,185,129,.12);
  border-color:rgba(16,185,129,.25);
  color:#a7f3d0;
}
.chip-off{
  background:rgba(107,114,128,.12);
  border-color:rgba(107,114,128,.25);
  color:#d1d5db;
}
.chip-warn{
  background:rgba(245,158,11,.12);
  border-color:rgba(245,158,11,.25);
  color:var(--accentBright);
}

/* =====================
   Admin Kalender (Bookings)
   ===================== */
.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
}
.cal-head{
  padding:10px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  text-align:center;
  font-weight:600;
  color:var(--muted);
}
.cal-cell{
  position:relative;
  min-height:120px;
  padding:10px;
  border-radius:16px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.06);
  overflow:hidden;
}
.cal-empty{
  background:rgba(255,255,255,.02);
  border:1px dashed rgba(255,255,255,.08);
}
.cal-today{
  border-color:rgba(255,140,0,.35);
  box-shadow:0 0 0 1px rgba(255,140,0,.18) inset;
}
.cal-date{
  position:absolute;
  top:8px;
  right:10px;
  font-weight:800;
  color:rgba(255,255,255,.35);
}
.cal-item{
  margin-top:18px;
  padding:10px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  *{transition:none !important; scroll-behavior:auto !important;}
}
