/* patch.css
   Add-on für mehr Tiefe / 3D / Animation – ohne dein bestehendes Theme zu verändern.
   Lade diese Datei NACH styles.css, sidebar.css und (optional) style_dark.css.
*/

/* -----------------------------
   0) Defaults & Safety
   ----------------------------- */
:root{
  --fx-ease: cubic-bezier(.2,.8,.2,1);
  --fx-shadow-xs: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --fx-shadow-sm: 0 2px 6px rgba(0,0,0,.06), 0 18px 40px rgba(0,0,0,.08);
  --fx-shadow-md: 0 10px 30px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  --fx-shadow-lg: 0 22px 70px rgba(0,0,0,.16), 0 6px 18px rgba(0,0,0,.10);
  --fx-ring: 0 0 0 3px rgba(52,152,219,.18);
  --fx-glow: 0 0 0 1px rgba(255,255,255,.55) inset;
  --fx-tilt: 0.9deg;
  --fx-lift: -6px;
}

/* Dark Mode Variablen */
html[data-theme="dark"]{
  --fx-shadow-xs: 0 2px 10px rgba(0,0,0,.35), 0 18px 60px rgba(0,0,0,.35);
  --fx-shadow-sm: 0 3px 14px rgba(0,0,0,.40), 0 26px 70px rgba(0,0,0,.35);
  --fx-shadow-md: 0 10px 30px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.35);
  --fx-shadow-lg: 0 26px 90px rgba(0,0,0,.65), 0 8px 22px rgba(0,0,0,.35);
  --fx-ring: 0 0 0 3px rgba(122,162,255,.18);
}

/* Motion Safety */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------
   1) Subtile Background-Tiefe
   ----------------------------- */
body{
  position: relative;
  overflow-x: hidden;
}

/* feines "Ambient Light" + very subtle noise */
body::before{
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(52,152,219,.10), transparent 60%),
    radial-gradient(55% 45% at 85% 20%, rgba(155,89,182,.08), transparent 65%),
    radial-gradient(70% 60% at 40% 90%, rgba(46,204,113,.06), transparent 60%);
  filter: blur(18px);
  transform: translateZ(0);
  animation: fx-ambient 18s var(--fx-ease) infinite alternate;
  opacity: .9;
}

body::after{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.015), rgba(255,255,255,.015) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  opacity: .28;
}

html[data-theme="dark"] body::after{
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02), rgba(255,255,255,.02) 1px, transparent 1px, transparent 3px);
  opacity: .20;
}

@keyframes fx-ambient{
  from{ transform: translate3d(-1.5%, -1.2%, 0) scale(1); }
  to  { transform: translate3d( 1.5%,  1.2%, 0) scale(1.03); }
}

/* -----------------------------
   2) 3D Cards / Surfaces
   ----------------------------- */
.post,
.post-preview,
.static-page,
.widget,
.plugin,
.pagination-prev,
.pagination-next,
.footer{
  position: relative;
  transform: translateZ(0);
  box-shadow: var(--fx-shadow-xs);
  transition: transform .35s var(--fx-ease), box-shadow .35s var(--fx-ease), filter .35s var(--fx-ease);
  will-change: transform, box-shadow, filter;
}

/* Glassy highlight line */
.post::before,
.post-preview::before,
.static-page::before,
.widget::before,
.plugin::before,
.pagination-prev::before,
.pagination-next::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 22%),
    radial-gradient(120% 60% at 20% 10%, rgba(255,255,255,.35), transparent 55%);
  opacity: .35;
  mix-blend-mode: soft-light;
}

html[data-theme="dark"] .post::before,
html[data-theme="dark"] .post-preview::before,
html[data-theme="dark"] .static-page::before,
html[data-theme="dark"] .widget::before,
html[data-theme="dark"] .plugin::before,
html[data-theme="dark"] .pagination-prev::before,
html[data-theme="dark"] .pagination-next::before{
  opacity: .20;
}

/* Lift on hover */
@media (hover:hover){
  .post:hover,
  .post-preview:hover,
  .static-page:hover,
  .widget:hover,
  .plugin:hover,
  .pagination-prev:hover,
  .pagination-next:hover{
    transform: translate3d(0, var(--fx-lift), 0) rotateX(var(--fx-tilt));
    box-shadow: var(--fx-shadow-lg);
    filter: saturate(1.03);
  }
}

/* Active press */
.post:active,
.post-preview:active,
.static-page:active,
.widget:active,
.plugin:active,
.pagination-prev:active,
.pagination-next:active{
  transform: translate3d(0, -1px, 0);
  box-shadow: var(--fx-shadow-sm);
}

/* -----------------------------
   3) Header / Nav: Tiefe + Micro-Animation
   ----------------------------- */
.header{
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 1px rgba(0,0,0,.03), 0 14px 40px rgba(0,0,0,.08);
  border-bottom: 1px solid rgba(225,232,237,.9);
}

html[data-theme="dark"] .header{
  border-bottom-color: rgba(36,49,79,.9);
  box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 18px 60px rgba(0,0,0,.45);
}

.site-logo{
  box-shadow: 0 10px 24px rgba(0,0,0,.12), var(--fx-glow);
  transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), filter .25s var(--fx-ease);
}

@media (hover:hover){
  .site-logo:hover{
    transform: translate3d(0,-2px,0) rotate(-2deg);
    box-shadow: 0 18px 44px rgba(0,0,0,.16), var(--fx-glow);
    filter: saturate(1.05);
  }
}

.navigation a{
  position: relative;
}

.navigation a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(52,152,219,0), rgba(52,152,219,.8), rgba(52,152,219,0));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s var(--fx-ease);
  opacity: .85;
}

html[data-theme="dark"] .navigation a::after{
  background: linear-gradient(90deg, rgba(122,162,255,0), rgba(122,162,255,.85), rgba(122,162,255,0));
}

.navigation a:hover::after,
.navigation a.active::after{
  transform: scaleX(1);
}

/* -----------------------------
   4) Buttons / Chips / Links: Glanz + Glow
   ----------------------------- */
.tag,
.tag-cloud-item,
.post-category,
.pagination-prev,
.pagination-next{
  box-shadow: 0 10px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04) inset;
  transition: transform .25s var(--fx-ease), box-shadow .25s var(--fx-ease), filter .25s var(--fx-ease);
}

@media (hover:hover){
  .tag:hover,
  .tag-cloud-item:hover,
  .pagination-prev:hover,
  .pagination-next:hover{
    transform: translate3d(0,-2px,0);
    box-shadow: 0 18px 48px rgba(0,0,0,.14);
    filter: saturate(1.05);
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline: none;
  box-shadow: var(--fx-ring);
  border-radius: 10px;
}

/* -----------------------------
   5) Sidebar Plugins: mehr "Card-Stack"
   ----------------------------- */
.plugin{
  border-color: rgba(233,238,243,.9);
  box-shadow: var(--fx-shadow-xs);
}

.plugin::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.55) inset;
  opacity: .55;
}

html[data-theme="dark"] .plugin::after{
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset;
  opacity: .6;
}

/* -----------------------------
   6) Form Inputs: depth + focus
   ----------------------------- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
textarea,
select,
#jspluginSearchText{
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transition: box-shadow .25s var(--fx-ease), transform .25s var(--fx-ease), border-color .25s var(--fx-ease);
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
#jspluginSearchText:focus{
  transform: translate3d(0,-1px,0);
  box-shadow: var(--fx-shadow-sm), var(--fx-ring);
}

/* -----------------------------
   7) Micro-Animation: "Shimmer" auf Hover (sparsam)
   ----------------------------- */
@media (hover:hover){
  .post:hover::after,
  .post-preview:hover::after,
  .static-page:hover::after,
  .widget:hover::after,
  .plugin:hover::after{
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.22) 18%, transparent 38%);
    transform: translateX(-40%);
    animation: fx-shimmer .9s var(--fx-ease) 1;
    mix-blend-mode: soft-light;
  }

  html[data-theme="dark"] .post:hover::after,
  html[data-theme="dark"] .post-preview:hover::after,
  html[data-theme="dark"] .static-page:hover::after,
  html[data-theme="dark"] .widget:hover::after,
  html[data-theme="dark"] .plugin:hover::after{
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.10) 18%, transparent 38%);
  }
}

@keyframes fx-shimmer{
  from{ transform: translateX(-45%); opacity: .0; }
  30% { opacity: .6; }
  to  { transform: translateX(45%); opacity: 0; }
}

/* -----------------------------
   8) Optional: "Floating" Widgets (very subtle)
   ----------------------------- */
@media (hover:hover){
  .widget,
  .plugin{
    animation: fx-float 10s var(--fx-ease) infinite alternate;
    animation-delay: calc(var(--fx-seed, 0) * 1s);
  }
  .plugin:nth-child(2n){ --fx-seed: 1; }
  .plugin:nth-child(3n){ --fx-seed: 2; }
  .plugin:nth-child(4n){ --fx-seed: 3; }
}

@keyframes fx-float{
  from{ transform: translate3d(0,0,0); }
  to  { transform: translate3d(0,-3px,0); }
}
