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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  color: #fff;
}

/* ── Views ── */
.view {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.view.hidden {
  display: none;
}

/* ── Spinner ── */
.spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 255, 255, 0.12);
  border-top-color: #f5a623;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Loading ── */
.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

.loading-screen.error .spinner {
  display: none;
}

.loading-screen.error span {
  color: #ff8a65;
}

/* ── Hauptansicht ── */
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card.hidden {
  display: none;
}

.image-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  background: #0f0f20;
}

#article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 24px 28px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: bold;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* ── Navigationsleiste ── */
.nav-bar {
  display: flex;
  align-items: stretch;
  background: #16152e;
  min-height: 96px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:disabled {
  color: rgba(255, 255, 255, 0.18);
  cursor: default;
}

.nav-btn:not(:disabled):active {
  background: rgba(245, 166, 35, 0.18);
  color: #f5a623;
}

.article-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 28px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  padding: 0 14px;
  letter-spacing: 0.04em;
  margin: 22px 8px;
}

/* ── Artikel-Ansicht ── */
#article-view {
  background: #f8f4ef;
  color: #1a1a1a;
}

#article-view .loading-screen {
  color: #aaa;
}

#article-view .spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: #f5a623;
}

.article-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.article-content.hidden {
  display: none;
}

.article-text-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 24px;
  color: #111;
  padding-bottom: 20px;
  border-bottom: 3px solid #f5a623;
}

.article-text-body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  line-height: 1.85;
  color: #2a2a2a;
  white-space: pre-wrap;
}

/* ── Controls-Bar ── */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #12122a;
  min-height: 84px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.control-btn {
  background: #f5a623;
  border: none;
  color: #1a1a2e;
  font-size: 1.7rem;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.5);
}

.control-btn:active {
  background: #d4920a;
  transform: scale(0.89);
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

/* ── Zurück-Button ── */
.back-btn {
  width: 100%;
  min-height: 90px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-top: 3px solid rgba(245, 166, 35, 0.45);
  font-size: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}

.back-btn:active {
  background: #252547;
}
