/* --- Basis & Layout --- */
html, body {
  background: #000813;
  color: rgba(255, 255, 255, 0.87);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
}

body.home-page {
  display: flex;
  flex-direction: column;
}

body.home-page #message {
  flex: 1;
  margin: 0 auto;
  min-height: 0;
  max-width: 560px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Theming --- */
html.light-theme, body.light-theme {
  background: #ECEFF1;
  color: rgba(0, 0, 0, 0.87);
  height: auto;
  min-height: 100%;
}

body.light-theme #message {
  background: white;
  padding: 32px 24px;
  display: block;
  min-height: auto;
}

/* --- Navigationsleiste --- */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  right: 20px;
}

.menu-icon span {
  display: block;
  width: 25px;
  height: 2px;
  background: rgba(0, 0, 0, 0.6);
  margin: 5px 0;
  transition: 0.3s;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links a {
  margin: 0 15px;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #039be5;
}

.nav-links a.active {
  color: #039be5;
  border-bottom: 2px solid #039be5;
  padding-bottom: 4px;
}

/* --- Language Switcher (Dropdown) --- */
.lang-switcher {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2000;
}

/* Far right on desktop, clearly separated from the centered menu */
@media (min-width: 601px) {
  .lang-switcher {
    right: 20px;
  }
}

/* Leave room for the hamburger icon on mobile */
@media (max-width: 600px) {
  .lang-switcher {
    right: 64px;
  }
}

/* Visible button shows only the currently selected flag + caret */
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #333;
}
.lang-current:hover {
  background: rgba(0, 0, 0, 0.05);
}
.lang-current-flag {
  min-width: 22px;
  text-align: center;
}
.lang-caret {
  font-size: 10px;
  opacity: 0.6;
}

/* Dropdown list hidden until the switcher is opened */
.lang-options {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  padding: 4px;
  min-width: 48px;
}
.lang-switcher.open .lang-options {
  display: flex;
}

.lang-flag {
  cursor: pointer;
  font-size: 20px;
  text-align: center;
  padding: 8px 6px;
  border-radius: 6px;
  opacity: 0.7;
  user-select: none;
  transition: opacity 0.2s, background 0.2s;
}

.lang-flag:hover {
  opacity: 1;
  background: #f0f0f0;
}

.lang-flag.active {
  opacity: 1;
  background: rgba(3, 155, 229, 0.12);
}

/* --- Inhalts-Container --- */
#message {
  background: transparent;
  max-width: 900px;
  margin: 40px auto 16px;
  padding: 0 20px;
  border-radius: 3px;
  overflow: visible;
  position: relative;
  min-height: 400px;
  display: block;
}

#message h1 {
  font-size: 22px;
  font-weight: 300;
  margin: 0 0 16px;
}

#message h2 {
  font-size: 18px;
  font-weight: 300;
  margin: 0 0 8px;
}

#message p {
  line-height: 140%;
  margin: 16px 0 24px;
  font-size: 14px;
}

#message ol, #message ul {
  padding-left: 20px;
  margin: 16px 0;
}

#message li {
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 14px;
}

#message li strong {
  display: block;
  margin-bottom: 8px;
}

#message a.button {
  display: block;
  text-align: center;
  background: #039be5;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 16px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

/* --- Splash-Animationen --- */
.splash-text {
  color: #64FFDA;
  font-size: 32px;
  letter-spacing: 12px;
  font-weight: 300;
  text-transform: uppercase;
  animation: arcanaFade 3s forwards;
  position: absolute;
}

.splash-image {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  animation: imageFadeIn 4s forwards 3s;
}

@keyframes arcanaFade {
  0% { opacity: 0; transform: scale(0.95); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); }
}

@keyframes imageFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* --- Video & Guide Icons --- */
.video-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #039be5;
  border-radius: 8px;
  padding: 4px;
  margin-left: 12px;
  text-decoration: none;
  background: transparent;
  transition: transform 0.2s, border-width 0.1s;
  vertical-align: middle;
}

.video-link-icon:hover {
  transform: scale(1.05);
  border-width: 2px;
  padding: 3px;
}

.video-link-icon .material-symbols-outlined {
  color: #039be5;
  font-size: 20px !important;
}

.guide-descriptions {
  margin-top: 40px;
}

.guide-descriptions h2 {
  color: #039be5;
  font-size: 20px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.pricing-intro-text {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 32px;
  background: rgba(100, 255, 218, 0.1);
  padding: 20px;
  border-radius: 12px;
}

/* --- Pricing Cards & Layout --- */
.pricing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 24px;
}

.pricing-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.pricing-card.highlighted {
  border: 2px solid #039be5;
  background: rgba(3, 155, 229, 0.02);
}

.pricing-card h3 {
  margin-top: 0;
  font-size: 20px;
  color: #039be5;
  font-weight: 600;
}

.card-details {
  margin: 16px 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  flex-grow: 1;
}

.card-details p {
  margin: 8px 0 !important;
}

.card-price {
  font-size: 28px;
  font-weight: 800;
  color: #000813;
  margin-bottom: 20px;
}

/* Base button styles updated for card layout */
.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: #039be5;
  color: white;
  font-weight: 700;
  cursor: pointer;
  padding: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s, transform 0.1s;
}

.buy-button:hover {
  background: #0288d1;
  box-shadow: 0 4px 12px rgba(3, 155, 229, 0.3);
}

.buy-button span {
  font-size: 14px;
}

/* Remove old table styles if no longer used */
.pricing-table { display: none; }

/* ... rest of the file ... */

.purchase-panel {
  margin-top: 24px;
  background: #f7f9fb;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.purchase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.close-button {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,0.6);
}

.purchase-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.purchase-step label {
  font-weight: 600;
  color: rgba(0,0,0,0.7);
}

.purchase-step input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 8px;
  box-sizing: border-box;
  background: white;
}

.primary-btn {
  margin-top: 10px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background: #039be5;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.purchase-error {
  min-height: 20px;
  color: #c62828;
  font-size: 13px;
  margin-top: 2px;
}

.purchase-success {
  color: #176b2c;
  font-weight: 600;
  word-break: break-word;
  margin-bottom: 8px;
}

.payment-box {
  margin: 12px 0;
  padding: 16px;
  background: white;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 8px;
}

#card-element {
  margin-top: 12px;
  padding: 10px;
  background: #2a2e33;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

.pricing-info {
  margin-top: 32px;
  padding: 20px;
  background-color: rgba(3, 155, 229, 0.05);
  border-radius: 4px;
}

.pricing-info h3 {
  margin-top: 0;
  color: #039be5;
  font-size: 18px;
}

.pricing-info p {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* --- Play Store Badge --- */
.play-store-badge {
  display: block;
  margin: 32px auto;
  max-width: 240px;
  transition: transform 0.2s;
}

.play-store-badge:hover {
  transform: scale(1.05);
}

.play-store-badge img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Mobile Queries --- */
@media (max-width: 600px) {
  .lang-switcher {
    right: 75px;
  }

  .pricing-container {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .pricing-card {
    margin-bottom: 16px;
  }

  .menu-icon {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
  }

  #menu-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links a {
    margin: 10px 0;
    width: 100%;
    text-align: center;
    font-size: 16px;
  }

  #message {
    margin-top: 20px;
    background: transparent;
    box-shadow: none;
  }

  body.light-theme,
  body.light-theme #message {
    background: white;
  }
}

@media (max-width: 680px) {
  .pricing-table th:nth-child(1),
  .pricing-table td:nth-child(1) {
    width: 34%;
  }

  .pricing-table th:nth-child(2),
  .pricing-table td:nth-child(2) {
    width: 16%;
  }

  .pricing-table th:nth-child(3),
  .pricing-table td:nth-child(3) {
    width: 20%;
  }

  .pricing-table th:nth-child(4),
  .pricing-table td:nth-child(4) {
    width: 30%;
  }
}
