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

body {
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 2.75rem;
  background: radial-gradient(circle at top, #fff4f6 0%, #fbe4eb 45%, #f3d5dd 80%);
  color: #5c4752;
  position: relative;
}

body.info-page {
  align-items: stretch;
  justify-content: flex-start;
}

/* TOP CLOUDS */
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 150px;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.cloud {
  position: absolute;
  top: 30px;
  width: 180px;
  height: 60px;
  background: rgba(255, 247, 249, 0.85);
  border-radius: 50px;
  filter: drop-shadow(0 10px 12px rgba(203, 146, 167, 0.25));
  left: -220px;
  animation: cloud-move 30s linear infinite;
}

/* little bumps */
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before {
  width: 70px;
  height: 70px;
  top: -28px;
  left: 20px;
}
.cloud::after {
  width: 90px;
  height: 90px;
  top: -38px;
  right: 18px;
}

/* --- HINZUGEFÜGT: Stile für Namensgenerator im Join-Popup --- */

.name-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  /* Dieser Wrapper übernimmt den Abstand vom Input-Feld */
  margin-bottom: 1rem;
}

/* Passt das Input-Feld an, WENN es im Wrapper ist */
.name-input-wrapper .input-field {
  flex: 1; /* Lässt das Input-Feld den verfügbaren Platz einnehmen */
  margin-bottom: 0; /* Entfernt den doppelten Abstand */
}

/* Stil für den neuen Zufalls-Button (aus create.html kopiert) */
.random-name-button {
  padding: 0 1rem;
  border-radius: 10px;
  border: 2px solid rgba(245, 209, 219, 0.9);
  background: rgba(255, 252, 253, 0.9);
  color: #914b63;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.random-name-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.16);
}

/* stagger + different speeds */
.cloud-2 {
  top: 65px;
  width: 150px;
  animation-delay: 5s;
  animation-duration: 38s;
  opacity: 0.85;
}

.cloud-3 {
  top: 10px;
  width: 210px;
  animation-delay: 10s;
  animation-duration: 50s;
  opacity: 0.6;
}

.cloud-4 {
  top: 90px;
  width: 140px;
  animation-delay: 14s;
  animation-duration: 34s;
  opacity: 0.7;
}

.cloud-5 {
  top: 25px;
  width: 190px;
  animation-delay: 21s;
  animation-duration: 45s;
  opacity: 0.5;
}

@keyframes cloud-move {
  0% { left: -220px; }
  100% { left: 110%; }
}

.container {
  text-align: center;
  padding: 1.5rem;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2; /* above clouds */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - 140px);
}

.header-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(2.5rem, 7vh, 5rem);
}

h1 {
  font-size: clamp(4rem, 8vw, 6rem);
  color: #b25d7a;
  text-shadow: 0 2px 12px rgba(178, 93, 122, 0.25);
  letter-spacing: 0.04em;
}

.ghost-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  border: 2px solid rgba(245, 209, 219, 0.95);
  background: rgba(255, 252, 253, 0.9);
  color: #954f68;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(223, 144, 168, 0.24);
  transition: all 0.2s ease;
}

.ghost-button:hover {
  background: #ffffff;
  transform: translateY(-50%) translateY(-1px);
  box-shadow: 0 10px 22px rgba(200, 128, 151, 0.26);
}

.ghost-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.play-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
  justify-content: flex-start;
  width: 100%;
  padding-top: clamp(2rem, 8vh, 5rem);
}

.footer-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.sub-button {
  background: linear-gradient(145deg, #f3c7d3 0%, #f7d9e1 80%);
  color: #4f3f46;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 10px 20px rgba(231, 134, 164, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sub-button:hover {
  background: linear-gradient(145deg, #f9d8e0 0%, #fbd0da 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(222, 105, 141, 0.26);
}

.sub-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.main-button {
  background: linear-gradient(145deg, #f7a9bc 0%, #f3becb 80%);
  color: #4f3f46;
  border: none;
  width: min(420px, 100%);
  min-height: 72px;
  padding: 1.35rem 2rem;
  border-radius: 18px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 12px 24px rgba(231, 134, 164, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(2px);
}

.main-button:hover {
  background: linear-gradient(145deg, #fbc0ce 0%, #f9adb8 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(222, 105, 141, 0.28);
}

.main-button:active {
  transform: translateY(0);
}

.main-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.info-container {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 6.5rem) 1.5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.info-panel {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 18px;
  background: rgba(255, 252, 253, 0.82);
  border: 2px solid rgba(245, 209, 219, 0.9);
  box-shadow: 0 14px 32px rgba(223, 144, 168, 0.18);
  color: #5c4752;
}

.info-panel h1 {
  margin-bottom: 1.25rem;
}

.info-panel h2 {
  color: #b25d7a;
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
}

.info-panel p {
  line-height: 1.6;
  margin: 0.5rem 0;
}

.info-panel ol {
  margin: 1rem 0 0 1.25rem;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7a9bc 0%, #f3becb 80%);
  color: #4f3f46;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(231, 134, 164, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.back-link:hover {
  background: linear-gradient(145deg, #fbc0ce 0%, #f9adb8 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(222, 105, 141, 0.26);
}

.back-link-top {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  color: #7e6470;
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
}

.contact-links a,
.contact-copy {
  color: #954f68;
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 252, 253, 0.72);
  border: 1px solid rgba(245, 209, 219, 0.85);
  box-shadow: 0 6px 14px rgba(223, 144, 168, 0.16);
  font: inherit;
}

.contact-copy {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.contact-links a:hover,
.contact-copy:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.copy-feedback {
  color: #7e6470;
  font-size: 0.78rem;
  font-weight: 700;
}

/* popup overlay */
#popupOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(247, 228, 233, 0.45);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 1000;
}

/* popup */
#joinPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #fadae2 0%, #f8e8ec 80%);
  padding: 2.5rem 2.25rem 2.25rem;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  width: 90%;
  max-width: 400px;
  display: none;
  z-index: 1001;
  border: 1px solid rgba(255, 204, 216, 0.6);
}

.popup-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.popup-header h3 {
  color: #b25d7a;
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.popup-header p {
  color: #7e6470;
  font-size: 0.9rem;
}

.popup-back-button {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(234, 183, 196, 0.9);
  background: rgba(255, 250, 251, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 10;
}

.popup-back-button:hover {
  background: rgba(255, 240, 244, 0.8);
  transform: scale(1.05);
}

.back-icon {
  width: 20px;
  height: 20px;
  stroke: #b25d7a;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin-left: -3px;
}

.input-field {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: #fbe8f1;
  border: 2px solid rgba(245, 209, 219, 0.9);
  border-radius: 10px;
  color: #5a4853;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.input-field::placeholder {
  color: #b08697;
}

.input-field:focus {
  outline: none;
  border-color: #af4f67;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(244, 194, 207, 0.25);
}

.error {
  color: #d35c71;
  margin: 0.25rem 0 0.75rem;
  min-height: 1.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  text-align: center;
}

.field-error {
  color: #d35c71;
  min-height: 1.1rem;
  margin: -0.25rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
}

@media (max-width: 768px) {
  h1 {
    font-size: 3.4rem;
    text-align: center;
  }

  .container {
    min-height: unset;
    padding: 1rem;
  }

  .header-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .ghost-button {
    position: static;
    transform: none;
    align-self: flex-end;
  }

  .main-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 100%;
  }

  .play-section {
    padding-top: 1.25rem;
  }

  #joinPopup {
    padding: 2.25rem 1.5rem 2rem;
  }

  .sky {
    height: 130px;
  }
}
