/*
Theme Name:  Obergenie
Theme URI:   https://obergenie.de
Author:      Sparrow Games
Description: Offizielle Website für das Spiel Obergenie
Version:     1.0
License:     All Rights Reserved
Text Domain: obergenie
*/

/* ════════════════════════════════════════════════════════════════
   OBERGENIE THEME — style.css
   ════════════════════════════════════════════════════════════════

   QUICK EDIT GUIDE:
   ┌──────────────────────────────────────────────────────────────┐
   │ Custom cursor     →  --cursor-img  (~line 35)               │
   │ Building positions→  #btn-ueber / #btn-team etc. (~line 220) │
   │ Panel colors      →  --color-* variables below              │
   └──────────────────────────────────────────────────────────────┘
════════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ───────────────────────────────────────────── */
:root {
  /*
    CURSOR
    EDIT: Replace 'Mauszeiger.png' with your cursor file in assets/.
    Ideal size: 32×32 or 64×64 px PNG.
  */
  --cursor-img: url('assets/Mauszeiger.png') 16 16, auto;

  --c-bg:        #120820;
  --c-primary:   #ff6b00;
  --c-yellow:    #ffe600;
  --c-pink:      #ff00aa;
  --c-green:     #00ff88;
  --c-text:      #f0e6ff;
  --c-panel-bg:  rgba(14, 6, 32, 0.97);
  --c-panel-glow:rgba(255, 107, 0, 0.4);

  --panel-w:     min(680px, 94vw);
  --panel-maxh:  88vh;
  --btn-img-h:   90px;
}

/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
  width: 100%; height: 100%;
  background: var(--c-bg);
  font-family: 'Nunito', 'Trebuchet MS', Arial, sans-serif;
  color: var(--c-text);
  cursor: var(--cursor-img);
  overflow: hidden;
}

/* Hide WordPress admin bar on frontend */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

a, button { cursor: var(--cursor-img); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1e0e3a; }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-pink); }


/* ════════════════════════════════════════════════════════════════
   FALLBACK NAVIGATION
════════════════════════════════════════════════════════════════ */
#fallback-nav {
  position: fixed; top: 1rem; left: 1rem;
  z-index: 900;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}

.nav-toggle {
  background: var(--c-primary); color: #fff;
  border: 3px solid var(--c-yellow);
  padding: .45rem 1.1rem;
  font-family: 'Bangers', cursive; font-size: 1.15rem; letter-spacing: 2px;
  border-radius: 10px; transform: rotate(-1.5deg);
  transition: transform .2s, background .15s, box-shadow .15s;
  box-shadow: 3px 3px 0 rgba(0,0,0,.55);
  cursor: var(--cursor-img); white-space: nowrap;
}
.nav-toggle:hover {
  background: var(--c-pink);
  transform: rotate(1.5deg) scale(1.07);
  box-shadow: 5px 5px 0 rgba(0,0,0,.55);
}

#nav-menu {
  display: none; flex-direction: column; list-style: none;
  background: var(--c-panel-bg);
  border: 3px solid var(--c-primary); border-radius: 12px;
  padding: 6px; gap: 3px;
  box-shadow: 5px 5px 0 rgba(0,0,0,.55), 0 0 20px var(--c-panel-glow);
  min-width: 180px;
}
#nav-menu.open { display: flex; }
#nav-menu li a {
  display: block; color: var(--c-yellow); text-decoration: none;
  padding: .38rem .9rem; font-weight: 700; font-size: .9rem;
  border-radius: 8px; transition: background .12s, transform .12s;
  letter-spacing: .5px; cursor: var(--cursor-img);
}
#nav-menu li a:hover { background: var(--c-primary); color: #fff; transform: translateX(5px); }


/* ════════════════════════════════════════════════════════════════
   MAP
════════════════════════════════════════════════════════════════ */
#map-wrapper { width: 100vw; height: 100vh; overflow: hidden; position: relative; }
#map-container { position: relative; width: 100%; height: 100%; }

#map-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  user-select: none; -webkit-user-drag: none;
  filter: saturate(1.1) brightness(.95);
}

/* ── DECORATIVE CHARACTERS ───────────────────────────────────── */
.map-deco {
  position: absolute; pointer-events: none;
  user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(2px 4px 8px rgba(0,0,0,.6)); z-index: 15;
}
/* EDIT: Adjust positions */
#deco-elf  { height: 120px; left: 5%;  bottom: 10%; animation: deco-bounce 2.8s ease-in-out infinite; }
#deco-dino { height: 100px; right: 5%; bottom: 8%;  animation: deco-bounce 3.2s ease-in-out infinite .6s; }
@keyframes deco-bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}


/* ════════════════════════════════════════════════════════════════
   BUILDING BUTTONS
   ════════════════════════════════════════════════════════════════
   EDIT POSITIONS below — left/top = % of map container.
════════════════════════════════════════════════════════════════ */
.building-btn {
  position: absolute; background: transparent; border: none;
  cursor: var(--cursor-img);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transform-origin: bottom center;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), filter .2s;
  z-index: 20; padding: 0;
}
.building-btn:hover { transform: scale(1.15) translateY(-6px); filter: drop-shadow(0 8px 20px rgba(255,107,0,.9)); z-index: 25; }
.building-btn:active { transform: scale(.96) translateY(-2px); }
.building-btn img { height: var(--btn-img-h); width: auto; object-fit: contain; display: block; filter: drop-shadow(2px 4px 8px rgba(0,0,0,.65)); user-select: none; -webkit-user-drag: none; }

.building-label {
  background: var(--c-yellow); color: #120820;
  font-family: 'Bangers', cursive; font-size: .82rem; letter-spacing: 1.5px;
  padding: 2px 10px; border-radius: 5px; white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(0,0,0,.45);
  opacity: 0; transform: translateY(5px);
  transition: opacity .18s, transform .18s; pointer-events: none;
}
.building-btn:hover .building-label { opacity: 1; transform: translateY(0); }

/* EDIT: Positions for each building button */
#btn-ueber    { left: 63%; top: 28%; } /* TV-Turm      */
#btn-team     { left: 40%; top: 50%; } /* Brandenburger Tor */
#btn-video    { left: 20%; top: 35%; } /* Funkturm     */
#btn-impressum{ left: 57%; top: 63%; } /* Späti        */


/* ════════════════════════════════════════════════════════════════
   OVERLAY
════════════════════════════════════════════════════════════════ */
#overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); z-index: 100;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
#overlay.active { display: block; animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }


/* ════════════════════════════════════════════════════════════════
   SECTION PANELS
════════════════════════════════════════════════════════════════ */
.section-panel {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: var(--panel-w); max-height: var(--panel-maxh);
  background: var(--c-panel-bg);
  border: 4px solid var(--c-primary); border-radius: 18px;
  box-shadow: 0 0 0 2px var(--c-yellow), 0 25px 70px rgba(0,0,0,.85), 0 0 40px var(--c-panel-glow);
  z-index: 200; overflow: hidden;
}
.section-panel.active { display: block; animation: panel-pop .35s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes panel-pop {
  0%   { transform: translate(-50%,-50%) scale(.55) rotate(-3deg); opacity: 0; }
  70%  { transform: translate(-50%,-50%) scale(1.04) rotate(.5deg); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1) rotate(0); opacity: 1; }
}

.panel-inner { padding: 1.6rem 1.8rem 2rem; overflow-y: auto; max-height: calc(var(--panel-maxh) - 20px); overscroll-behavior: contain; }

.panel-close {
  position: absolute; top: .75rem; right: .75rem;
  background: var(--c-pink); color: #fff;
  border: 3px solid #fff; border-radius: 50%;
  width: 38px; height: 38px; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: var(--cursor-img); z-index: 10;
  transition: transform .2s, background .15s;
  box-shadow: 3px 3px 0 rgba(0,0,0,.45);
}
.panel-close:hover { background: #f00; transform: rotate(90deg) scale(1.2); }

.section-panel h2 {
  font-family: 'Bangers', cursive; font-size: 2.4rem; letter-spacing: 3px;
  color: var(--c-yellow); text-shadow: 3px 3px 0 var(--c-primary), 5px 5px 0 rgba(0,0,0,.4);
  margin-bottom: 1.2rem; text-align: center; line-height: 1.1;
}
.section-panel h3 { font-family: 'Bangers', cursive; font-size: 1.5rem; color: var(--c-yellow); letter-spacing: 1px; margin-bottom: .3rem; }
.section-panel p  { line-height: 1.65; margin-bottom: .85rem; font-size: 1rem; }

.panel-banner { display: block; max-width: 75%; max-height: 100px; object-fit: contain; margin: 0 auto .8rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.panel-screenshot { width: 100%; border-radius: 10px; margin-top: 1rem; border: 3px solid var(--c-primary); display: block; box-shadow: 0 4px 16px rgba(0,0,0,.5); }

.feature-list { list-style: none; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.feature-list li { background: rgba(255,107,0,.12); border: 2px solid var(--c-primary); border-radius: 10px; padding: .5rem .9rem; font-weight: 700; font-size: .92rem; transition: background .15s, transform .15s; }
.feature-list li:hover { background: rgba(255,107,0,.28); transform: translateX(3px); }

.video-wrapper { position: relative; width: 100%; padding-top: 56.25%; margin-bottom: 1rem; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 10px; border: 3px solid var(--c-primary); box-shadow: 0 0 20px var(--c-panel-glow); }
.video-caption { text-align: center; font-style: italic; color: var(--c-yellow); font-weight: 700; font-size: 1.05rem; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem; margin: 1rem 0; }
.team-member { background: rgba(255,255,255,.05); border: 3px solid var(--c-pink); border-radius: 14px; padding: 1.5rem 1.2rem 1.2rem; text-align: center; transition: transform .2s, box-shadow .2s; }
.team-member:hover { transform: translateY(-6px) rotate(.5deg); box-shadow: 0 8px 24px rgba(255,0,170,.35); }
.team-member img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; object-position: top; border: 4px solid var(--c-yellow); margin: 0 auto .9rem; display: block; background: rgba(255,255,255,.08); }
.team-member p { font-size: .88rem; opacity: .82; margin-top: .3rem; }

.impressum-text { background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.1); border-radius: 10px; padding: 1.2rem 1.4rem; font-size: .92rem; line-height: 1.85; }
.impressum-text a { color: var(--c-yellow); text-decoration: underline; }
.impressum-text strong { color: var(--c-yellow); font-size: .95rem; }

.btn-game {
  display: inline-block; background: var(--c-primary); color: #fff; text-decoration: none;
  padding: .6rem 1.5rem; border-radius: 10px;
  font-family: 'Bangers', cursive; font-size: 1.3rem; letter-spacing: 2px;
  border: 3px solid var(--c-yellow); box-shadow: 4px 4px 0 rgba(0,0,0,.45);
  transition: transform .15s, box-shadow .15s, background .15s; cursor: var(--cursor-img);
}
.btn-game:hover { background: var(--c-pink); transform: translateY(-3px) scale(1.04); box-shadow: 6px 6px 0 rgba(0,0,0,.45); }
.btn-game:active { transform: translateY(0) scale(.97); box-shadow: 2px 2px 0 rgba(0,0,0,.45); }


/* ════════════════════════════════════════════════════════════════
   BOUNCING LOGO LAYER
════════════════════════════════════════════════════════════════ */
#logo-layer { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
body.panel-open #logo-layer { opacity: .15; pointer-events: none; }

#bouncing-logo {
  position: absolute; top: 0; left: 0;
  width: 420px; height: auto;
  transform-origin: 0 0;
  transform: translate(0,0) scale(0);
  pointer-events: all; cursor: var(--cursor-img);
  user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 6px 22px rgba(0,0,0,.65));
}
#bouncing-logo:hover { filter: drop-shadow(0 6px 22px rgba(0,0,0,.65)) drop-shadow(0 0 28px rgba(255,220,0,.75)); }


/* ════════════════════════════════════════════════════════════════
   COOKIE LAYER
════════════════════════════════════════════════════════════════ */
#cookie-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
body.panel-open #cookie-layer { opacity: .25; pointer-events: none; }

.cookie-item { position: absolute; top: 0; left: 0; pointer-events: all; cursor: var(--cursor-img); user-select: none; -webkit-user-drag: none; will-change: transform; filter: drop-shadow(2px 3px 5px rgba(0,0,0,.35)); border-radius: 50%; }
.cookie-item:hover { filter: drop-shadow(0 0 14px gold) drop-shadow(2px 3px 5px rgba(0,0,0,.35)); }

@keyframes cookie-eat {
  0%   { transform: var(--base-transform) scale(1)   rotate(0deg);   opacity: 1; }
  25%  { transform: var(--base-transform) scale(1.5) rotate(-15deg); opacity: 1; }
  60%  { transform: var(--base-transform) scale(.3)  rotate(30deg);  opacity: .7; }
  100% { transform: var(--base-transform) scale(0)   rotate(60deg);  opacity: 0; }
}
.cookie-eaten { animation: cookie-eat .45s ease-out forwards !important; pointer-events: none !important; }

.crumb { position: absolute; border-radius: 50%; pointer-events: none; animation: crumb-fly .7s ease-out forwards; }
@keyframes crumb-fly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx),var(--ty)) scale(0); opacity: 0; } }

.eat-feedback { position: fixed; font-family: 'Bangers', cursive; pointer-events: none; z-index: 700; text-shadow: 2px 2px 0 rgba(0,0,0,.5); animation: eat-pop .8s ease-out forwards; white-space: nowrap; }
@keyframes eat-pop { 0% { opacity: 1; transform: translate(-50%,-50%) scale(.4); } 35% { opacity: 1; transform: translate(-50%,-80%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-160%) scale(1); } }


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --btn-img-h: 60px; --panel-w: 94vw; --panel-maxh: 82vh; }
  .building-label { opacity: 1; transform: none; font-size: .72rem; padding: 2px 6px; }
  #bouncing-logo { width: 260px; }
}

@media (max-width: 600px) {
  html, body { overflow: auto; }
  #map-wrapper { height: 60vh; min-height: 280px; }
  :root { --btn-img-h: 48px; --panel-w: 96vw; --panel-maxh: 78vh; }
  #bouncing-logo { width: 200px; }

  #fallback-nav { top: auto; bottom: 0; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--c-panel-bg); border-top: 3px solid var(--c-primary); padding: 6px 8px 8px; gap: 4px; }
  .nav-toggle { display: none; }
  #nav-menu { display: flex !important; flex-direction: row; flex-wrap: wrap; justify-content: center; border: none; background: transparent; padding: 0; gap: 4px; min-width: unset; box-shadow: none; }
  #nav-menu li a { font-size: .72rem; padding: .3rem .5rem; }

  .section-panel h2 { font-size: 1.8rem; }
  .feature-list { grid-template-columns: 1fr; }
  .panel-inner { padding: 1rem 1rem 1.5rem; }
  #deco-elf, #deco-dino { display: none; }
}

@media (max-width: 380px) {
  :root { --btn-img-h: 38px; }
  #bouncing-logo { width: 160px; }
}
