:root {
  /* Color Palette - Deep Space & Vibrancy */
  --bg-color: #0f172a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #38bdf8;
  /* Sky Blue */
  --accent-secondary: #818cf8;
  /* Indigo */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

  /* Glassmorphism */
  --glass-blur: 12px;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --border-radius: 24px;

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Background Animation Element */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
  z-index: -1;
  animation: pulse 15s ease-in-out infinite alternate;
  pointer-events: none;
  display: none;
  /* Disable old animation */
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.page-container {
  width: 100%;
  max-width: var(--container-width);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Header */
.page-header {
  text-align: center;
  padding: 4rem 0 2rem;
  position: relative;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 2em rgba(56, 189, 248, 0.2));
}

.page-header .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Flex Cards Section */
.flex-card-wrapper {
  display: flex;
  gap: 1.5rem;
  height: 450px;
  width: 100%;
  perspective: 1000px;
}

.flex-card-container {
  flex: 1;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-medium);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
}

.flex-card-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9));
  opacity: 0.6;
  transition: opacity var(--transition-medium);
}

.flex-card-container:hover::after {
  opacity: 0.4;
}

.flex-card-container.active {
  flex: 4;
}

.flex-card-container.active::after {
  opacity: 0.2;
}

/* Icons in Cards */
.icon-wrapper {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.icon-wrapper img {
  width: 50%;
  height: 50%;
  filter: invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.flex-card-container.active .icon-wrapper {
  bottom: 2rem;
  left: 2rem;
  transform: translateX(0);
}

/* Overlay Text */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  padding-left: 6rem;
  /* Space for icon when active */
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-medium);
}

.flex-card-container.active .overlay {
  opacity: 1;
  transform: translateY(0);
}

.text-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.5rem;
}

.text-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* Specific Card Backgrounds */
.bild-1 {
  background-image: url("./Bilder/insta.png");
}

.bild-2 {
  background-image: url("./Bilder/Youtu.png");
}

.bild-3 {
  background-image: url("./Bilder/Twitch-Streamers-Banner.avif");
}

.bild-4 {
  background-image: url("./Bilder/3d drucker.jpg");
}

.bild-5 {
  background-image: url("./Bilder/3d drucker 2.jpg");
}

/* Social Links Section */
.social-links-wrapper {
  text-align: center;
  padding: 2rem 0;
}

.social-links-wrapper h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  color: var(--text-main);
}

.social-links-row {
  display: flex;
  justify-content: center;
  row-gap: 5rem;
  column-gap: 1.5rem;
  flex-wrap: wrap;
}

.magnatic-container-link {
  position: relative;
  width: 100px;
  height: 100px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
}

.magnatic-container-link:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px rgba(56, 189, 248, 0.2);
}

.magnetic-element {
  width: 40px;
  height: 40px;
  z-index: 2;
  transition: transform 0.2s ease-out;
}

.magnetic-element img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.magnetic-background {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.magnatic-container-link:hover .magnetic-background {
  opacity: 1;
}

.tooltip-text {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  border: 1px solid var(--card-border);
}

.magnatic-container-link:hover .tooltip-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Footer */
.page-footer {
  margin-top: auto;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--card-border);
  width: 100%;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 900px) {
  .flex-card-wrapper {
    flex-direction: column;
    height: auto;
  }

  .flex-card-container {
    height: 120px;
    flex: none;
  }

  .flex-card-container.active {
    height: 300px;
    flex: none;
  }

  .page-header h1 {
    font-size: 3rem;
  }
}

@media (max-width: 600px) {
  .page-container {
    padding: 1rem;
  }

  .magnatic-container-link {
    width: 80px;
    height: 80px;
  }

  .magnetic-element {
    width: 32px;
    height: 32px;
  }
}