/* Root Variables */
:root {
  --bg-light: #f5f7fa;
  --bg-dark: #0a0c12;
  --text-light: #0f1724;
  --text-dark: #e6eef9;
  --accent: #4f46e5;
  --accent-2: #9333ea;
  --glass-light: rgba(255, 255, 255, 0.95);
  --glass-dark: rgba(20, 20, 20, 0.85);
  --slide-bg-light: rgba(255,255,255,0.95);
  --slide-bg-dark: rgba(20, 20, 20, 0.85);
  --hover-bg: rgba(79, 70, 229, 0.1);
  --transition: 350ms cubic-bezier(.2, .9, .3, 1);
}

/* Body */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  transition: background var(--transition), color var(--transition);
}
body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(10px);
  background: var(--glass-light);
  border-radius: 16px;
  margin: 1rem;
  transition: background var(--transition);
  position: relative;
  z-index: 1000;
}
body.dark header {
  background: var(--glass-dark);
}

/* Branding */
.brand {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.brand .logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text .top-line {
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.brand-text .top-line span {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 600;
}
.brand-text .bottom-line {
  font-size: .9rem;
  opacity: 0.8;
}

/* Navigation */
nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  position: relative;
}
nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: all .3s ease;
  padding: .5rem .8rem;
  border-radius: 8px;
}
nav a:hover {
  background: var(--hover-bg);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  padding: .6rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 0 20px var(--accent-2);
  animation: glow 2s infinite alternate;
}
.btn.primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 30px var(--accent-2);
}

@keyframes glow {
  0% { box-shadow: 0 0 5px var(--accent-2); }
  100% { box-shadow: 0 0 25px var(--accent-2); }
}

/* Theme Switch */
.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
  display: inline-block;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 34px;
  transition: .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider:before {
  content: "☀️";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 2px;
  bottom: 2px;
  background: white;
  transition: .4s;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
input:checked + .slider {
  background: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(30px);
  content: "🌙";
}

/* Slideshow */
.slideshow-container {
  background: var(--slide-bg-light);
  border-radius: 16px;
  max-width: 900px;
  margin: 2rem auto;
  overflow: hidden;
  transition: background var(--transition);
  position: relative;
  z-index: 0;
}
body.dark .slideshow-container {
  background: var(--slide-bg-dark);
}
.slideshow {
  position: relative;
  width: 100%;
  height: 350px;
}
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.3s ease, transform 1.5s ease;
}
.slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 1rem;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: .3rem;
}
.hero p {
  font-size: 1rem;
  color: gray;
  margin-top: 0;
}
body.dark .hero p {
  color: #aaa;
}
.hero .discord-btn {
  margin-top: 1rem;
  display: inline-block;
  font-size: 1.1rem;
  padding: .8rem 1.6rem;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.card {
  background: var(--glass-light);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 1rem;
  transition: transform .3s ease, background var(--transition);
}
body.dark .card {
  background: var(--glass-dark);
}
.card:hover {
  transform: translateY(-5px);
}
.card h3 {
  margin-top: 0;
}
.card p {
  margin-bottom: 1rem;
}
.card .btn {
  font-size: .9rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: gray;
}

/* Plot Cards */
.plots-container {
  max-width: 1000px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.plot-card {
  background: var(--glass-light);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.plot-card:hover {
  transform: translateY(-7px);
}
body.dark .plot-card {
  background: var(--glass-dark);
}
.plot-card img {
  width: 100%;
  display: block;
}
.plot-card .info {
  padding: 1rem;
}
.plot-card .info h3 {
  margin: 0 0 .5rem 0;
}
.plot-card .info p {
  margin: 0;
  font-size: .9rem;
  color: gray;
}
body.dark .plot-card .info p {
  color: #ccc;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 2000;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 16px;
}
.lightbox .close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: gray;
}

/* Mobile */
#mobileMenuBtn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: inherit;
  cursor: pointer;
  z-index: 1100;
  transition: transform .3s;
}
#mobileMenuBtn:hover {
  transform: scale(1.2);
}

  .lightbox-arrow {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    font-size:3rem;
    cursor:pointer;
    user-select:none;
    padding:1rem;
}
.arrow-left { left:10px; }
.arrow-right { right:10px; }  

.projects-container { 
    max-width:1000px; margin:2rem auto; 
    display:grid; grid-template-columns:1fr; 
    gap:2rem; 
  }
  .project-card { 
    background: var(--glass-light); 
    backdrop-filter:blur(8px); 
    border-radius:16px; 
    overflow:hidden; 
    transition:transform 0.3s ease; 
  }
  body.dark .project-card { 
    background: var(--glass-dark); 
  }
  .project-card h3{ 
    margin:0.5rem 1rem; 
  }
  .project-card p{ 
    margin:0.5rem 1rem 1rem 1rem; 
    color:gray; 
  }
  body.dark .project-card p{ 
    color:#ccc; 
  }
  .project-slideshow{
    position:relative;
    width:100%;
    height:350px; 
    overflow:hidden; 
    border-radius:16px;
  }
  .project-slide{
    position:absolute; 
    inset:0; background-size:cover; 
    background-position:center; 
    opacity:0; 
    transition:opacity 1.2s ease;
  }
  .project-slide.active{
    opacity:1;
  }
  .Startseite{
    color: black;
    text-decoration: none;
  }
  body.dark .Startseite {
  color: white;
}
@media (max-width: 768px) {
  .brand-text .top-line {
    font-size: 1rem;
  }
  .brand-text .bottom-line {
    font-size: .8rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 65px;
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--glass-light);
    backdrop-filter: blur(16px);
    border-radius: 0 0 16px 16px;
    padding: 1rem 2rem;
    gap: 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: all .4s ease, transform .4s ease;
  }
  body.dark nav {
    background: var(--glass-dark);
  }
  nav.show {
    display: flex;
    animation: slideDown .35s ease forwards;
  }
  nav a {
    padding: 1rem 1.4rem;
    font-size: 1.15rem;
    border-radius: 12px;
    transition: all .3s ease;
  }
  nav a:hover {
    background: var(--accent);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
