/* Home / Landing-Page Styles. Greift auf theme.css für Farben + Font zu. */

body {
  /* theme.css setzt schon ein Hintergrund-Gradient; hier nur sicherstellen,
     dass die Seite scrollbar bleibt. */
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────────── */
.home-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 234, 227, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.home-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-midnight);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.home-brand-icon {
  width: 32px;
  height: 32px;
}
.home-brand-text {
  display: inline-flex;
  align-items: center;
}
.home-brand-accent { color: var(--c-reddish); margin: 0 1px; }
.home-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.home-nav-link {
  color: var(--c-crimson);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.home-nav-link:hover {
  background: var(--c-silk);
  color: var(--c-midnight);
}
.home-nav-cta {
  background: var(--c-almond);
  color: var(--c-midnight);
}
.home-nav-cta:hover {
  background: var(--c-reddish);
  color: var(--c-silk);
}
.home-nav-username {
  color: var(--c-midnight);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--c-silk);
  letter-spacing: 0.01em;
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.home-hero {
  padding: 90px 24px 60px;
}
.home-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.home-hero-eyebrow {
  display: inline-block;
  background: var(--c-silk);
  color: var(--c-crimson);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.home-hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-midnight);
  margin: 0 0 20px;
}
.home-hero-accent {
  background: linear-gradient(135deg, var(--c-reddish), var(--c-almond));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}
.home-hero-sub {
  font-size: 1.1rem;
  color: var(--c-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.55;
}
.home-hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-hero-btn {
  padding: 14px 22px !important;
  font-size: 1rem !important;
}

/* ─── Card-Reihe ────────────────────────────────────────────────── */
.home-cards {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
/* Zwei feste Spalten — wenn nur zwei Karten in der Reihe stehen und sie
   sich auf großen Screens nicht halb-halb teilen sollen. */
.home-cards-2col {
  grid-template-columns: repeat(2, 1fr);
  padding-bottom: 18px;
}
@media (max-width: 640px) {
  .home-cards-2col {
    grid-template-columns: 1fr;
  }
}
.home-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.18s ease;
}
.home-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-almond);
  box-shadow: var(--shadow-md);
}
.home-card-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.home-card-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--c-midnight);
}
.home-card-desc {
  flex: 1;
  margin: 0 0 16px;
  color: var(--c-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}
.home-card-cta {
  color: var(--c-reddish);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ─── Features-Grid ─────────────────────────────────────────────── */
.home-features {
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 70px 24px;
}
.home-features-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.home-section-title {
  font-size: 1.8rem;
  text-align: center;
  margin: 0 0 40px;
  color: var(--c-midnight);
}
.home-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.home-feature {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.home-feature-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.home-feature h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--c-midnight);
}
.home-feature p {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ─── Bottom CTA ────────────────────────────────────────────────── */
.home-cta {
  padding: 80px 24px;
  text-align: center;
}
.home-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}
.home-cta h2 {
  font-size: 1.8rem;
  margin: 0 0 12px;
  color: var(--c-midnight);
}
.home-cta p {
  color: var(--c-muted);
  margin: 0 0 26px;
}
.home-cta-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.home-footer {
  background: var(--c-midnight);
  color: var(--c-silk);
  padding: 24px;
}
.home-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.home-footer-sub {
  color: rgba(245, 208, 197, 0.6);
  font-size: 0.85rem;
}

/* ─── Meine Turniere ─────────────────────────────────────────────── */
.home-my-tournaments {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.home-my-tournaments-inner {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.home-my-tournaments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}
.home-tournament-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.home-tournament-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.18s ease;
  font-family: inherit;
}
.home-tournament-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-almond);
  box-shadow: var(--shadow-md);
  background: var(--c-surface);
}
.home-tournament-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-tournament-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-midnight);
}
.home-tournament-card-role {
  background: var(--c-almond);
  color: var(--c-midnight);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.home-tournament-card-meta {
  color: var(--c-muted);
  font-size: 0.86rem;
}
.home-tournament-card-cta {
  margin-top: 6px;
  color: var(--c-reddish);
  font-weight: 700;
  font-size: 0.9rem;
}
.home-tournament-card-pending {
  cursor: default;
  border-style: dashed;
  border-color: var(--c-almond);
  background: var(--c-surface);
}
.home-tournament-card-pending:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}
.home-tournament-card-role-pending {
  background: var(--c-silk);
  color: var(--c-crimson);
}
.home-tournament-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.home-tournament-card-actions .btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ─── Login-Modal ───────────────────────────────────────────────── */
.home-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(50, 10, 40, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.home-modal-backdrop.show { opacity: 1; }
.home-modal-backdrop[hidden] { display: none; }
.home-modal {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px 24px;
  max-width: 380px;
  width: 100%;
  transform: translateY(8px);
  transition: transform 0.18s ease;
}
.home-modal-backdrop.show .home-modal { transform: translateY(0); }
.home-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-muted);
  font-size: 1.4rem;
  line-height: 1;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-modal-close:hover {
  background: var(--c-silk);
  color: var(--c-midnight);
}
.home-modal-field {
  margin-bottom: 12px;
}
.home-modal-submit {
  width: 100%;
  padding: 12px 18px !important;
  justify-content: center;
  margin-top: 6px;
}
.home-modal-error {
  background: rgba(142, 68, 61, 0.10);
  color: var(--c-crimson);
  border: 1px solid rgba(142, 68, 61, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.home-modal-hint {
  color: var(--c-muted);
  font-size: 0.82rem;
  text-align: center;
  margin: 14px 0 0;
}
.home-modal-link {
  color: var(--c-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}
.home-modal-link:hover {
  color: var(--c-reddish);
}

/* ─── Toast ─────────────────────────────────────────────────────── */
.home-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--c-midnight);
  color: var(--c-silk);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 110;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.home-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.home-toast[hidden] { display: none; }
