/* MacWP EOY Challenge - Layouts & Structure (Consolidated) */

/* ===== MAIN NAVIGATION ===== */

.main-navigation {
  background: linear-gradient(135deg, #1f5f3f 0%, #15432a 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 100;
  overflow: hidden;
  border-bottom: none;
}

/* Winter Pattern Overlay */
.main-navigation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 60%);
  background-size: 30px 30px;
  background-position: 0 0, 0 0;
  pointer-events: none;
}

/* Geometric Accent */
.main-navigation::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  /* 20px 16px */
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.nav-brand .brand-title {
  color: #ffffff;
  font-size: 1.875rem;
  /* 30px */
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.03em;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.nav-brand .brand-title .icon {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.user-display {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 1;
}

/* ===== MAIN CONTAINER ===== */

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 80px);
  background: transparent;
}

/* ===== SECTIONS ===== */

.setup-section,
.auth-section,
.status-section,
.dashboard-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--space-8) 0;
}

.setup-card,
.auth-card,
.status-card {
  width: 100%;
  max-width: 500px;
}

.auth-card {
  max-width: 400px;
  margin: 60px auto;
}

/* ===== DASHBOARD LAYOUTS ===== */

.dashboard-header {
  margin-bottom: var(--space-6);
}

.header-card .card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.header-info {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.dashboard-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--primary-green);
  margin: 0;
}

.challenge-selector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.challenge-selector label {
  font-weight: var(--font-medium);
  color: var(--text-bark);
  white-space: nowrap;
}

.challenge-selector .form-select {
  min-width: 150px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-grid.single-column {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Specific Card Layouts */
.status-card .card-content {
  text-align: center;
}

.status-indicator {
  margin-bottom: var(--space-4);
}

.status-details {
  margin-top: var(--space-4);
}

.actions-card .action-buttons {
  display: grid;
  gap: var(--space-4);
}

.setup-info {
  margin-bottom: var(--space-6);
}

.setup-checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.setup-checklist li {
  padding: var(--space-2) 0;
  color: var(--text-bark);
}

.setup-actions {
  text-align: center;
  margin-top: var(--space-6);
}

/* Player Dashboard */
.player-status-card .player-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.player-info .status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-label {
  font-weight: var(--font-medium);
  color: var(--text-bark);
}

.status-value {
  color: var(--text-mist);
}

.game-status-content {
  text-align: center;
}

/* Tab Navigation */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(31, 95, 63, 0.15);
  background: #e8f4ed;
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  gap: 0.25rem;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #6b6b6b;
  cursor: pointer;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: color 0.2s ease, background-color 0.2s ease;
  transform: none;
  border-bottom: 2px solid transparent;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  justify-content: center;
}

.tab-btn:hover {
  background: #e8f4ed;
  color: #1f5f3f;
  transform: none;
}

.tab-btn.active {
  background: transparent;
  color: #1f5f3f;
  border-bottom: 2px solid #1f5f3f;
  font-weight: 600;
}

/* ===== RESPONSIVE LAYOUTS ===== */

/* Tablet */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
  }

  .app-container {
    padding: var(--space-4);
  }
}

/* Mobile Navigation & Layouts */
@media (max-width: 900px) {
  .nav-user .user-display {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 0.75rem;
  }

  .nav-brand .brand-title {
    font-size: 1.25rem;
  }

  .nav-user {
    gap: 0.5rem;
  }

  .nav-user .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 2.5rem;
  }

  .app-container {
    padding: var(--space-3);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .challenge-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .actions-card .action-buttons {
    gap: var(--space-3);
  }

  .setup-section,
  .auth-section,
  .status-section {
    min-height: 50vh;
    padding: var(--space-4) 0;
  }

  /* Mobile Tabs */
  .admin-tabs {
    padding: 0.5rem 0.5rem 0.25rem 0.5rem;
    gap: 0.25rem;
  }

  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    flex: 1 1 calc(50% - 0.125rem);
    /* 2 Tabs pro Zeile */
  }

  .tab-btn .icon {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
  }
}

@media (max-width: 600px) {
  .nav-brand .brand-title {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.75rem 0.5rem;
  }

  .nav-brand .brand-title {
    font-size: 1rem;
  }

  .nav-user .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 2.25rem;
  }

  /* Mobile Tabs Small */
  .tab-btn {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    flex: 1 1 100%;
    /* 1 Tab pro Zeile */
    gap: 0.25rem;
  }

  .tab-btn .icon {
    width: 14px;
    height: 14px;
    margin-right: 0.125rem;
  }
}

@media (max-width: 360px) {
  .nav-brand .brand-title {
    font-size: 0.875rem;
  }

  .nav-user .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
  }
}

/* Large screens */
@media (min-width: 1400px) {
  .app-container {
    max-width: 1400px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* ===== PRINT STYLES ===== */

@media print {

  .main-navigation,
  .btn,
  .admin-tabs {
    display: none;
  }

  .winter-card {
    box-shadow: none;
    border: 1px solid var(--border-winter);
  }

  .app-container {
    max-width: none;
    padding: 0;
  }
}