:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 243.2 17.1% 21.8%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 37.7 92.1% 50.2%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --header-height: 4.5rem;
}

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

body {
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: hsl(var(--primary));
  background-color: hsl(var(--background));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  background-color: hsl(var(--background));
  padding: 1rem 0;
  border-bottom: 1px solid hsl(var(--border));
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  text-decoration: none;
  color: hsl(var(--primary));
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: hsl(var(--primary));
  transition: color 0.3s ease;
}

nav a:hover {
  color: hsl(var(--accent));
}

/* Language Selector Styles */
.language-selector {
  position: relative;
}

.current-lang {
  display: flex;
  align-items: center;
  font-weight: bold;
  background-color: hsl(var(--background));
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.current-lang::after {
  content: '▼';
  font-size: 0.7em;
  margin-left: 5px;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  min-width: 80px;
  z-index: 1010; /* Higher than header */
  margin-top: 5px;
}

.language-dropdown.show {
  display: flex;
}

.language-dropdown a {
  padding: 8px 16px;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.language-dropdown a:hover {
  background-color: hsl(var(--secondary));
}

.language-dropdown a.active {
  color: hsl(var(--accent));
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.03);
}

/* Mobile optimization for language selector */
@media (max-width: 480px) {
  .language-selector {
    position: static; /* Make it position properly in the flex container */
  }
  
  .language-dropdown {
    right: 1rem; /* Align to the right side of the screen with margin */
    top: auto; /* Not relative to .language-selector anymore */
    margin-top: -5px; /* Adjust as needed */
  }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-height) + 1rem);
  width: 100%;
}

main .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

.illustration {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.hero-image {
  max-width: 100%;
  height: auto;
  max-height: min(40vh, 400px);
  object-fit: contain;
}

.app-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.app-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.app-link:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

/* Markdown content styling */
.content h1 {
  font-size: 2.5rem;
  margin: 1.5rem 0 1rem;
}

.content h2 {
  font-size: 1.75rem;
  margin: 1.5rem 0 1rem;
  color: hsl(var(--primary));
}

.content h3 {
  font-size: 1.25rem;
  margin: 1.2rem 0 0.8rem;
}

.content p {
  margin-bottom: 1rem;
}

.content ul {
  margin: 0 0 1.5rem 2rem;
}

.content ul li {
  margin-bottom: 0.5rem;
}

.content a {
  color: hsl(var(--accent));
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* Loading indicator */
.loading {
  text-align: center;
  padding: 2rem;
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

/* Error styling */
.error {
  text-align: center;
  padding: 2rem;
  color: hsl(var(--destructive));
  font-weight: bold;
}

footer {
  background-color: hsl(var(--background));
  padding: 2rem 0;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
  color: hsl(var(--muted-foreground));
}

/* Einheitliche Titelformatierung */
/* .logo, .hero h1 {
  font-size: 2.5rem;
} */

html {
  height: 100%;
}

/* Responsive Anpassungen für kleinere Bildschirmhöhen */
@media (max-height: 700px) {
  .hero-image {
    max-height: 35vh;
  }
}

@media (max-height: 500px) {
  .hero-image {
    max-height: 30vh;
  }
}

/* For smaller screens */
@media (max-width: 768px) {
  :root {
    --header-height: 4rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  nav ul {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 3.5rem;
  }
  
  header {
    height: auto;
    padding: 0.5rem 0;
  }
  
  main {
    padding-top: 6rem; /* Fixed value to accommodate flexible header height */
  }
  
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav {
    margin-top: 0.5rem;
    width: 100%;
  }
  
  nav ul {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .language-selector {
    margin-left: auto;
  }
}

/* Prevent content overlap in very small screens */
@media (max-height: 500px) and (max-width: 480px) {
  header {
    position: relative;
  }
  
  main {
    padding-top: 1rem;
  }
} 