/* ===== VARIABLEN – Feuriges Rot/Orange/Schwarz/Weiß ===== */
:root {
  --bg-color: #0a0a0a;
  --card-bg: rgba(20, 8, 8, 0.7);
  --card-bg-solid: #1f1414;
  --accent: #ff3333;
  --accent-secondary: #ffaa33;
  --accent-glow: rgba(255, 80, 80, 0.7);
  --text-primary: #ffffff;
  --text-secondary: #eeeeee;
  --text-muted: #aaaaaa;
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.9);
  --border-radius-card: 28px;
  --border-radius-element: 20px;
  --border-radius-btn: 40px;
  --transition: 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

/* ===== RESET & BASIS ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  scroll-behavior: smooth;
  cursor: none; /* Standard-Cursor ausblenden, Custom-Cursor kommt */
}

/* Custom Cursor – wird per JS positioniert */
.cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
  box-shadow: 0 0 15px var(--accent-glow);
}

.cursor-trail {
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
  transition: all 0.05s ease;
  box-shadow: 0 0 10px var(--accent-secondary);
}

/* Canvas im Hintergrund */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* Fokus-Stile für Tastaturnavigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ===== TYPOGRAPHIE & HEADER ===== */
header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

header h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ff4d4d, #ffaa33);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(255, 80, 80, 0.5);
  position: relative;
  display: inline-block;
}

/* Glitch-Effekt beim Hover */
.glitch:hover {
  animation: glitch 0.3s infinite;
}

@keyframes glitch {
  0% { transform: skew(0deg, 0deg); opacity: 1; text-shadow: 2px 2px 0 red, -2px -2px 0 orange; }
  25% { transform: skew(2deg, 1deg); opacity: 0.9; text-shadow: -3px 0 red, 3px 0 orange; }
  50% { transform: skew(-2deg, -1deg); opacity: 0.8; text-shadow: 2px -2px red, -2px 2px orange; }
  75% { transform: skew(1deg, 2deg); opacity: 0.9; text-shadow: -2px 2px red, 2px -2px orange; }
  100% { transform: skew(0deg, 0deg); opacity: 1; text-shadow: 2px 2px 0 red, -2px -2px 0 orange; }
}

header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* ===== YOUTUBE BUTTON ===== */
.yt-button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, #ff4d4d, #cc3700);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: var(--border-radius-btn);
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(255, 80, 80, 0.3);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: none;
  cursor: none;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.yt-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.yt-button:hover::after {
  width: 300px;
  height: 300px;
}

.yt-button:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 80, 80, 0.6);
  background: linear-gradient(135deg, #ff6666, #e64400);
}

/* ===== LAYOUT ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ===== KARTEN (Glas-Effekt) ===== */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-card);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 80, 80, 0.3);
}

/* ===== ICONS ===== */
.icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.icons img {
  width: 64px;
  height: 64px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  object-fit: contain;
}

.icons img:hover {
  transform: scale(1.15) rotate(2deg);
  background: rgba(255, 80, 80, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

/* ===== PROJEKT-GRID ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--card-bg-solid);
  border-radius: var(--border-radius-element);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card h3 {
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1.2rem;
}

.project-card:hover {
  border-color: rgba(255, 80, 80, 0.4);
  background: #2a1a1a;
}

.details-btn {
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: var(--border-radius-btn);
  cursor: none;
  transition: all var(--transition);
  align-self: flex-start;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.details-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 80, 80, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.details-btn:hover::after {
  width: 300px;
  height: 300px;
}

.details-btn:hover {
  background: var(--accent);
  color: #000000;
  box-shadow: 0 0 20px var(--accent-glow);
  border-color: transparent;
}

/* Gesperrter Button */
.details-btn.locked {
  background: #3a2a2a;
  border-color: #aa5555;
  color: #ccaaaa;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

.details-btn.locked::after {
  display: none;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #1a1212;
  border-radius: var(--border-radius-card);
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  color: var(--text-primary);
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 80, 80, 0.3);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content a {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: var(--border-radius-btn);
  text-decoration: none;
  transition: all var(--transition);
}

.modal-content a:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent-glow);
}

.close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition);
  line-height: 1;
}

.close:hover {
  color: var(--accent);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
  body {
    padding: 1.2rem;
    cursor: auto; /* Auf mobilen Geräten Standard-Cursor */
  }
  
  .cursor, .cursor-trail {
    display: none; /* Custom Cursor auf Mobilgeräten ausblenden */
  }

  .icons img {
    width: 52px;
    height: 52px;
  }

  header h1 {
    font-size: 2.4rem;
  }

  .card {
    padding: 1.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.8rem;
  }
}

@media (max-width: 480px) {
  .yt-button {
    display: block;
    text-align: center;
  }

  .details-btn {
    width: 100%;
    text-align: center;
  }

  .icons {
    justify-content: center;
  }
}

/* Respektiert die Animationseinstellungen der Nutzer */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
