@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --dark-lighter: #334155;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background */
.bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: blur(0.5px);
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.95) 100%);
  z-index: -1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

@keyframes textShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Header */
.header {
  padding: 4rem 0 2rem;
  text-align: center;
  animation: fadeInDown 1s ease 0.2s both;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.logo-img {
  width: 64px;
  height: 64px;
  transition: transform 0.3s ease;
  animation: logoFloat 4s ease-in-out infinite;
}

.logo-img:hover {
  transform: scale(1.1) rotate(5deg);
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 3s ease-in-out infinite;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 0.4s both;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  animation: scaleIn 1s ease 0.6s both;
  position: relative;
}

.hero-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
  animation: fadeInUp 1s ease 1s both;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
  animation: fadeInUp 1s ease 0.8s both;
}

/* Filter Section */
.filter-section {
  padding: 3rem 0;
  text-align: center;
}

.filter-container {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 4rem;
}

.filter-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--dark-light);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Fraktionen Grid */
.fraktionen-section {
  padding: 2rem 0 5rem;
}

.fraktionen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.fraktion-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  animation: fadeInUp 1s ease both;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fraktion-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--fraktion-color, var(--primary));
  border-radius: 20px 20px 0 0;
}

.fraktion-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

.fraktion-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--fraktion-color, var(--primary));
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.fraktion-card:hover::after {
  left: 100%;
}

.fraktion-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fraktion-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--fraktion-color, var(--primary));
  color: white;
  flex-shrink: 0;
}

.fraktion-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.fraktion-type {
  font-size: 0.75rem;
  color: var(--fraktion-color, var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.fraktion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.fraktion-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.fraktion-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fraktion-stat {
  background: var(--dark-light);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.fraktion-stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fraktion-color, var(--primary));
  margin-bottom: 0.25rem;
}

.fraktion-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fraktion-rang {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--dark-light);
  border-radius: 8px;
  text-align: center;
}

.fraktion-rang strong {
  color: var(--text-primary);
}

.fraktion-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.fraktion-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fraktion-btn-primary {
  background: var(--fraktion-color, var(--primary));
  color: white;
}

.fraktion-btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.fraktion-btn-secondary {
  background: var(--dark-light);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.fraktion-btn-secondary:hover {
  background: var(--dark-lighter);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Fraktion Types */
.fraktion-card.staatlich {
  --fraktion-color: var(--primary);
}

.fraktion-card.medizin {
  --fraktion-color: var(--success);
}

.fraktion-card.legal {
  --fraktion-color: var(--warning);
}

/* Loading */
.loading-container {
  text-align: center;
  padding: 4rem 0;
  display: none;
}

.loading-container.show {
  display: block;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--glass-border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  animation: fadeInUp 1s ease both;
}

.footer-text {
  color: var(--text-muted);
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  color: var(--text-primary);
  position: relative;
  animation: scaleIn 0.3s ease-out both;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: white;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .logo-text {
    font-size: 2rem;
  }

  .logo-img {
    width: 48px;
    height: 48px;
  }

  .fraktionen-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: center;
  }

  .fraktion-actions {
    flex-direction: column;
  }

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .fraktion-card {
    padding: 1.5rem;
  }

  .filter-container {
    padding: 1.5rem;
  }
}
