/* SBF Prüfungssimulator – Premium Maritime Design */

:root {
  --ocean-dark: #0a1628;
  --ocean-mid: #0f2744;
  --ocean-light: #163a5f;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --accent-bright: #7dd3fc;
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.3);
  --gold: #f59e0b;
  --teal: #2dd4bf;
  --purple: #a78bfa;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-bright: #f8fafc;
  --glass-bg: rgba(15, 39, 68, 0.6);
  --glass-border: rgba(56, 189, 248, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ocean-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ocean animated background */
.ocean-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  background: linear-gradient(180deg, #060f1d 0%, #0a1628 30%, #0f2744 60%, #163a5f 100%);
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23163a5f' fill-opacity='0.3' d='M0,160L48,176C96,192,192,224,288,218.7C384,213,480,171,576,165.3C672,160,768,192,864,186.7C960,181,1056,139,1152,128C1248,117,1344,139,1392,149.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 50% 100%;
  animation: wave-move 12s linear infinite;
  opacity: 0.5;
}

.wave2 {
  height: 160px;
  animation: wave-move 8s linear infinite reverse;
  opacity: 0.3;
  bottom: 20px;
}

.wave3 {
  height: 120px;
  animation: wave-move 15s linear infinite;
  opacity: 0.2;
  bottom: 40px;
}

@keyframes wave-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Screens */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 20px;
}

.screen.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== START SCREEN ===== */
.logo-area {
  text-align: center;
  padding: 60px 0 30px;
}

.compass-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.logo-area h1 {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 6px;
  margin: 24px 0 16px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  color: var(--text-dim);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.tab.active {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-bright);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.tab-icon {
  font-size: 24px;
}

.tab-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.start-card {
  margin-top: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.info-item {
  text-align: center;
  padding: 20px 12px;
  background: rgba(56, 189, 248, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.info-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.1;
}

.info-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.exam-info p {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 20px;
}

.pass-criteria {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.pass-criteria h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 10px;
}

.pass-criteria ul {
  list-style: none;
}

.pass-criteria li {
  font-size: 14px;
  padding: 4px 0;
  color: var(--text);
}

.source-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 20px;
}

.source-note a {
  color: var(--accent);
  text-decoration: none;
}

.source-note a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ocean-dark);
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary .btn-icon {
  margin-right: 8px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-submit {
  background: linear-gradient(135deg, var(--green) 0%, #059669 100%) !important;
}

/* ===== EXAM SCREEN ===== */
.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.question-counter {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.question-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.type-basis {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.type-see {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-bright);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.type-binnen {
  background: rgba(45, 212, 191, 0.15);
  color: var(--teal);
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.type-segel {
  background: rgba(167, 139, 250, 0.15);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-warning {
  color: var(--red) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-icon {
  font-size: 16px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 24px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #818cf8 100%);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Question Card */
.question-card {
  margin-bottom: 24px;
  position: relative;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-number {
  position: absolute;
  top: -14px;
  left: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  color: var(--ocean-dark);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-bright);
  margin-bottom: 24px;
  padding-top: 8px;
}

/* Question Images */
.question-images {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.question-img {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
}

.review-images {
  margin-bottom: 16px;
}

.review-images .question-img {
  max-height: 120px;
}

/* Answer Buttons */
.answer-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.answer-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateX(4px);
}

.answer-btn.selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.answer-label {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.2s;
}

.answer-btn.selected .answer-label {
  background: var(--accent);
  color: var(--ocean-dark);
}

.answer-text {
  padding-top: 3px;
}

/* Navigation */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 400px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.dot.current {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  transform: scale(1.3);
}

.dot.answered {
  background: rgba(56, 189, 248, 0.4);
  border-color: rgba(56, 189, 248, 0.5);
}

/* ===== RESULT SCREEN ===== */
.result-card {
  text-align: center;
  margin-top: 40px;
}

.result-icon {
  font-size: 72px;
  margin-bottom: 16px;
}

.result-card h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-card.passed h1 { color: var(--green); }
.result-card.failed h1 { color: var(--red); }

.result-subtitle {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 32px;
}

.score-display {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.score-circle {
  position: relative;
  width: 140px;
  height: 140px;
}

.score-circle svg {
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease, stroke 0.3s;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number {
  font-size: 40px;
  font-weight: 900;
  display: block;
  line-height: 1;
}

.score-total {
  font-size: 14px;
  color: var(--text-dim);
}

.score-details {
  max-width: 400px;
  margin: 0 auto 24px;
  text-align: left;
}

.score-detail-item {
  display: grid;
  grid-template-columns: 130px 1fr 60px 120px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.detail-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.detail-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
  width: 0;
}

.detail-score {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.detail-status {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.result-time {
  margin-bottom: 28px;
  color: var(--text-dim);
  font-size: 14px;
}

.result-buttons {
  display: flex;
  gap: 12px;
}

.result-buttons .btn-primary,
.result-buttons .btn-secondary {
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* ===== REVIEW SCREEN ===== */
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.review-header h1 {
  font-size: 28px;
  font-weight: 800;
}

.review-item {
  margin-bottom: 16px;
  padding: 24px;
}

.review-item.review-correct {
  border-left: 3px solid var(--green);
}

.review-item.review-wrong {
  border-left: 3px solid var(--red);
}

.review-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.review-number {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-result {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
}

.review-result.correct { color: var(--green); }
.review-result.wrong { color: var(--red); }

.review-question {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-bright);
  margin-bottom: 16px;
}

.review-answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-answer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.review-answer .answer-label {
  width: 24px;
  height: 24px;
  font-size: 11px;
  flex-shrink: 0;
}

.review-answer.is-correct {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--green);
}

.review-answer.is-wrong.was-selected {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.check-icon {
  margin-left: auto;
  font-weight: 800;
  flex-shrink: 0;
}

.review-footer {
  padding: 24px 0;
  text-align: center;
}

.review-footer .btn-primary {
  max-width: 300px;
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
/* ===== RESPONSIVE – TABLET ===== */
@media (max-width: 768px) {
  .score-detail-item {
    grid-template-columns: 100px 1fr 50px 100px;
    gap: 8px;
  }
  .detail-label { font-size: 12px; }
}

/* ===== RESPONSIVE – MOBILE (iOS) ===== */
@media (max-width: 640px) {
  /* Safe areas for notch & home indicator */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .screen { padding: 10px; }
  .glass-card { padding: 18px; }

  /* Start screen */
  .logo-area { padding: 30px 0 16px; }
  .logo-area h1 { font-size: 32px; }
  .compass-icon { font-size: 48px; }
  .subtitle { font-size: 14px; letter-spacing: 3px; }

  /* Tabs */
  .tab-bar { gap: 4px; padding: 4px; margin: 16px 0 12px; }
  .tab { padding: 10px 8px; }
  .tab-icon { font-size: 20px; }
  .tab-label { font-size: 10px; }

  /* Info grid */
  .info-grid { gap: 8px; }
  .info-item { padding: 14px 8px; }
  .info-number { font-size: 22px; }
  .info-label { font-size: 10px; }

  /* Exam info */
  .exam-info p { font-size: 13px; }
  .pass-criteria { padding: 12px 14px; }
  .pass-criteria li { font-size: 13px; }
  .btn-primary { padding: 14px 24px; font-size: 15px; }

  /* Exam header */
  .exam-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
  }
  .question-counter { font-size: 13px; }
  .question-type { font-size: 10px; padding: 3px 8px; }
  .timer { font-size: 16px; padding: 6px 12px; }

  /* Question */
  .question-text { font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
  .question-number { width: 28px; height: 28px; font-size: 12px; top: -12px; left: 18px; }

  /* Answer buttons – 44px minimum touch target (Apple HIG) */
  .answer-btn {
    padding: 14px 12px;
    font-size: 13px;
    min-height: 48px;
    gap: 10px;
    margin-bottom: 8px;
  }
  .answer-label { width: 26px; height: 26px; font-size: 11px; }

  /* Navigation */
  .nav-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }
  .btn-secondary { padding: 12px 16px; font-size: 13px; min-height: 44px; }
  .btn-primary#next-btn { min-height: 44px; }
  .question-dots {
    order: 3;
    width: 100%;
    margin-top: 4px;
    justify-content: center;
  }
  .dot { width: 8px; height: 8px; }

  /* Results */
  .result-card { margin-top: 20px; }
  .result-card h1 { font-size: 28px; }
  .result-subtitle { font-size: 14px; }
  .score-circle { width: 120px; height: 120px; }
  .score-number { font-size: 32px; }
  .score-detail-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }
  .detail-label { font-size: 13px; font-weight: 600; color: var(--text); }
  .detail-bar-container { height: 8px; }
  .detail-score { font-size: 14px; }
  .detail-status { text-align: left; }
  .result-buttons { flex-direction: column; gap: 8px; }
  .result-buttons .btn-secondary { justify-content: center; }

  /* Review */
  .review-header h1 { font-size: 22px; }
  .review-item { padding: 16px; }
  .review-question { font-size: 14px; }
  .review-answer { padding: 8px 10px; font-size: 12px; }
  .review-answer .answer-label { width: 22px; height: 22px; font-size: 10px; }
}

/* ===== VERY SMALL SCREENS (iPhone SE, etc.) ===== */
@media (max-width: 375px) {
  .logo-area h1 { font-size: 28px; }
  .info-number { font-size: 20px; }
  .tab-label { font-size: 9px; }
  .question-text { font-size: 14px; }
  .answer-btn { font-size: 12px; }
}

/* ===== iOS-specific fixes ===== */
/* ===== SEO CONTENT ===== */
.seo-content {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
}

.seo-container {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 16px;
  line-height: 1.3;
}

.seo-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 32px 0 12px;
}

.seo-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.seo-content strong {
  color: var(--text);
}

.seo-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.seo-feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.seo-feature:hover {
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.seo-feature-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

.seo-feature h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.seo-feature p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.seo-tips {
  list-style: none;
  padding: 0;
}

.seo-tips li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  padding: 8px 0 8px 24px;
  position: relative;
}

.seo-tips li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.seo-tips strong {
  color: var(--text);
}

.seo-faq {
  margin-top: 16px;
}

.seo-faq details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}

.seo-faq summary {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  list-style: none;
}

.seo-faq summary::before {
  content: '＋';
  margin-right: 10px;
  color: var(--accent);
  font-weight: 700;
}

.seo-faq details[open] summary::before {
  content: '−';
}

.seo-faq summary:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.03);
}

.seo-faq details p {
  padding: 0 18px 14px;
  font-size: 13px;
  margin: 0;
}

@media (max-width: 640px) {
  .seo-content { padding: 40px 16px; }
  .seo-content h2 { font-size: 20px; }
  .seo-features { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(5, 10, 20, 0.95);
  border-top: 1px solid rgba(56, 189, 248, 0.1);
  padding: 48px 20px 24px;
  margin-top: 0;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-bright);
  display: block;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-links-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 14px;
}

.footer-links-col ul { list-style: none; }

.footer-links-col li { margin-bottom: 8px; }

.footer-links-col a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
}

.footer-links-col a:hover {
  color: var(--text-bright);
  padding-left: 4px;
}

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 40px 20px;
}

.legal-container {
  max-width: 720px;
  margin: 0 auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 24px;
  font-weight: 600;
}

.legal-back:hover { opacity: 0.8; }

.legal-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.legal-card h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-card .legal-date {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.legal-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 28px 0 12px;
}

.legal-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.legal-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.legal-card ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-card li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.legal-card a {
  color: var(--accent);
  text-decoration: none;
}

.legal-card a:hover { text-decoration: underline; }

.legal-card .imprint-img {
  max-width: 200px;
  margin: 16px 0;
  border-radius: 8px;
}

.logo-area-small {
  padding: 30px 0 20px;
}

.logo-area-small .compass-icon {
  font-size: 48px;
}

.logo-area-small h1 {
  font-size: 36px;
}

.logo-link,
.logo-link:visited,
.logo-link:hover,
.logo-link:active {
  text-decoration: none;
  color: inherit;
  display: block;
  text-align: center;
  -webkit-text-fill-color: inherit;
}

.logo-link h1 {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-link .subtitle {
  -webkit-text-fill-color: var(--text-dim);
}

@media (max-width: 640px) {
  .logo-area-small h1 { font-size: 28px; }
  .logo-area-small .compass-icon { font-size: 36px; }
  .logo-area-small { padding: 20px 0 14px; }
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .legal-card { padding: 24px; }
  .legal-card h1 { font-size: 26px; }
}

@supports (-webkit-touch-callout: none) {
  /* Prevent iOS text size adjustment */
  body { -webkit-text-size-adjust: 100%; }

  /* Smoother scrolling on iOS */
  .screen { -webkit-overflow-scrolling: touch; }

  /* Fix iOS button styling */
  .btn-primary, .btn-secondary, .answer-btn, .tab {
    -webkit-appearance: none;
    appearance: none;
  }
}
