/* =========================================================
   SpurenCheck – Gestaltung
   ========================================================= */

:root {
  --background: #0f1720;
  --background-soft: #16212d;
  --card: #1b2937;
  --card-light: #223344;
  --border: #314659;

  --text: #f5f7fa;
  --text-soft: #aebdca;

  --primary: #38bfa0;
  --primary-dark: #269980;
  --primary-soft: rgba(56, 191, 160, 0.14);

  --warning: #f5a742;
  --danger: #ef6b6b;
  --neutral: #7cc4ff;

  --shadow:
    0 12px 32px rgba(0, 0, 0, 0.28);

  --radius-small: 12px;
  --radius-medium: 18px;
  --radius-large: 24px;
}


/* =========================================================
   Grundlayout
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at top right,
      rgba(56, 191, 160, 0.12),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #111c27 0%,
      var(--background) 100%
    );

  color: var(--text);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  padding-bottom: 96px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  width: 100%;

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  background: #101b25;
  color: var(--text);

  padding: 14px 15px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #718394;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(56, 191, 160, 0.16);

  background: #13212c;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
}


/* =========================================================
   Kopfbereich
   ========================================================= */

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;

  padding:
    calc(18px + env(safe-area-inset-top))
    18px
    18px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.06);

  background:
    rgba(15, 23, 32, 0.88);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  position: sticky;
  top: 0;
  z-index: 50;
}

.logo-symbol {
  width: 54px;
  height: 54px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      var(--primary),
      #287a91
    );

  color: white;

  font-size: 27px;

  box-shadow:
    0 8px 22px rgba(56, 191, 160, 0.26);
}

.app-header h1 {
  margin: 0 0 4px;

  font-size: 24px;
  line-height: 1.1;
}

.app-header p {
  margin: 0;

  color: var(--text-soft);

  font-size: 13px;
  line-height: 1.35;
}


/* =========================================================
   Hauptinhalt
   ========================================================= */

.app-main {
  width: min(100%, 760px);
  margin: 0 auto;

  padding: 18px;
}

.info-card,
.search-card,
.results-section {
  border:
    1px solid rgba(255, 255, 255, 0.07);

  border-radius: var(--radius-large);

  background:
    linear-gradient(
      145deg,
      rgba(34, 51, 68, 0.96),
      rgba(24, 37, 50, 0.96)
    );

  box-shadow: var(--shadow);
}

.info-card {
  margin-bottom: 16px;
  padding: 20px;
}

.info-card h2,
.results-section h2 {
  margin: 0 0 8px;

  font-size: 20px;
}

.info-card p,
.results-section p {
  margin: 0;

  color: var(--text-soft);

  font-size: 14px;
  line-height: 1.55;
}

.search-card {
  padding: 20px;
}


/* =========================================================
   Formulare
   ========================================================= */

.form-group {
  margin-bottom: 17px;
}

.form-group label {
  display: block;

  margin-bottom: 7px;

  color: #dce6ed;

  font-size: 14px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.primary-button {
  width: 100%;
  min-height: 52px;

  border: 0;
  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );

  color: #071512;

  font-weight: 800;
  font-size: 16px;

  cursor: pointer;

  box-shadow:
    0 9px 22px rgba(56, 191, 160, 0.24);

  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

.primary-button:active {
  transform: scale(0.98);

  box-shadow:
    0 5px 14px rgba(56, 191, 160, 0.2);
}

.primary-button:hover {
  filter: brightness(1.05);
}


/* =========================================================
   Aktionsknöpfe
   ========================================================= */

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;

  margin: 16px 0;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 14px;

  width: 100%;
  min-height: 82px;

  padding: 15px;

  border:
    1px solid rgba(255, 255, 255, 0.08);

  border-radius: var(--radius-medium);

  background: var(--card);

  color: var(--text);

  text-align: left;

  cursor: pointer;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.18);

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.action-button:active {
  transform: scale(0.98);
}

.action-button:hover {
  border-color:
    rgba(56, 191, 160, 0.55);

  background: var(--card-light);
}

.action-icon {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border-radius: 15px;

  background: var(--primary-soft);
  color: var(--primary);

  font-size: 28px;
  font-weight: 700;
}

.action-button strong {
  display: block;

  margin-bottom: 5px;

  font-size: 16px;
}

.action-button small {
  display: block;

  color: var(--text-soft);

  font-size: 13px;
  line-height: 1.35;
}


/* =========================================================
   Statistik
   ========================================================= */

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;

  margin-bottom: 16px;
}

.stat-card {
  min-height: 118px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 14px 8px;

  border:
    1px solid rgba(255, 255, 255, 0.07);

  border-radius: var(--radius-medium);

  background: var(--card);

  text-align: center;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.17);
}

.stat-card.warning {
  background:
    linear-gradient(
      145deg,
      rgba(239, 107, 107, 0.14),
      var(--card)
    );

  border-color:
    rgba(239, 107, 107, 0.26);
}

.stat-number {
  display: block;

  margin-bottom: 7px;

  color: var(--primary);

  font-size: 30px;
  font-weight: 800;
}

.stat-card.warning .stat-number {
  color: var(--danger);
}

.stat-label {
  color: var(--text-soft);

  font-size: 11px;
  line-height: 1.3;
}


/* =========================================================
   Trefferliste
   ========================================================= */

.results-section {
  padding: 20px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;

  margin-bottom: 18px;
}

.section-heading select {
  max-width: 190px;
}

.results-list {
  display: grid;
  gap: 13px;
}

.empty-state {
  padding: 34px 18px;

  border:
    1px dashed rgba(255, 255, 255, 0.14);

  border-radius: var(--radius-medium);

  background:
    rgba(10, 18, 25, 0.28);

  text-align: center;
}

.empty-icon {
  margin-bottom: 12px;

  font-size: 38px;
}

.empty-state h3 {
  margin: 0 0 8px;

  font-size: 17px;
}

.empty-state p {
  max-width: 390px;
  margin: 0 auto;
}

.finding-card {
  padding: 16px;

  border:
    1px solid rgba(255, 255, 255, 0.08);

  border-radius: var(--radius-medium);

  background:
    linear-gradient(
      145deg,
      #1b2a38,
      #17232e
    );

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.finding-card.neutral {
  border-left:
    4px solid var(--neutral);
}

.finding-card.unklar {
  border-left:
    4px solid var(--warning);
}

.finding-card.hate {
  border-left:
    4px solid var(--danger);
}

.finding-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 12px;
}

.finding-account {
  margin: 0;

  font-size: 16px;
  font-weight: 800;
}

.finding-platform {
  margin-top: 4px;

  color: var(--text-soft);

  font-size: 12px;
}

.rating-badge {
  flex-shrink: 0;

  padding: 7px 10px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 800;
}

.rating-badge.neutral {
  background:
    rgba(124, 196, 255, 0.14);

  color: var(--neutral);
}

.rating-badge.unklar {
  background:
    rgba(245, 167, 66, 0.14);

  color: var(--warning);
}

.rating-badge.hate {
  background:
    rgba(239, 107, 107, 0.14);

  color: var(--danger);
}

.finding-comment {
  margin: 0 0 13px;

  color: #edf3f7;

  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.finding-meta {
  display: grid;
  gap: 6px;

  color: var(--text-soft);

  font-size: 12px;
  line-height: 1.4;
}

.finding-notes {
  margin-top: 13px;
  padding: 12px;

  border-radius: var(--radius-small);

  background:
    rgba(255, 255, 255, 0.04);

  color: var(--text-soft);

  font-size: 13px;
  line-height: 1.45;
}

.finding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 14px;
}

.small-button {
  min-height: 38px;

  padding: 8px 12px;

  border:
    1px solid var(--border);

  border-radius: 10px;

  background: #111d27;
  color: var(--text);

  cursor: pointer;
}

.small-button.danger {
  border-color:
    rgba(239, 107, 107, 0.35);

  color: #ff9a9a;
}

.finding-link {
  color: var(--primary);

  text-decoration: none;
  font-weight: 700;
}

.finding-link:hover {
  text-decoration: underline;
}


/* =========================================================
   Untere Navigation
   ========================================================= */

.bottom-navigation {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 60;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  padding:
    8px
    8px
    calc(8px + env(safe-area-inset-bottom));

  border-top:
    1px solid rgba(255, 255, 255, 0.08);

  background:
    rgba(13, 22, 30, 0.95);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 -10px 30px rgba(0, 0, 0, 0.25);
}

.nav-button {
  min-height: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  border: 0;
  border-radius: 13px;

  background: transparent;
  color: #8496a5;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;
}

.nav-button span {
  font-size: 20px;
}

.nav-button.active {
  background: var(--primary-soft);
  color: var(--primary);
}


/* =========================================================
   Modal
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;

  z-index: 100;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 0;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;

  background:
    rgba(3, 8, 12, 0.76);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;

  width: 100%;
  max-height: 92vh;

  overflow-y: auto;

  padding:
    20px
    18px
    calc(24px + env(safe-area-inset-bottom));

  border:
    1px solid rgba(255, 255, 255, 0.09);

  border-radius:
    24px
    24px
    0
    0;

  background: #182631;

  box-shadow:
    0 -18px 50px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;

  font-size: 21px;
}

.close-button {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border:
    1px solid var(--border);

  border-radius: 13px;

  background: #101b24;
  color: var(--text);

  font-size: 28px;
  line-height: 1;

  cursor: pointer;
}

.privacy-note {
  margin:
    4px
    0
    18px;

  padding: 14px;

  border:
    1px solid rgba(245, 167, 66, 0.22);

  border-radius: var(--radius-small);

  background:
    rgba(245, 167, 66, 0.09);

  color: #e8d3b5;

  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   Hilfsklassen
   ========================================================= */

.hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}


/* =========================================================
   Grössere Bildschirme
   ========================================================= */

@media (min-width: 600px) {
  .app-main {
    padding: 24px;
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 14px;
  }

  .section-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .modal {
    align-items: center;

    padding: 24px;
  }

  .modal-content {
    width: min(100%, 650px);
    max-height: 90vh;

    border-radius: var(--radius-large);

    padding: 24px;
  }
}


/* =========================================================
   Sehr kleine Handys
   ========================================================= */

@media (max-width: 380px) {
  .app-main {
    padding: 13px;
  }

  .app-header {
    padding-left: 13px;
    padding-right: 13px;
  }

  .statistics-grid {
    gap: 7px;
  }

  .stat-card {
    min-height: 108px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .stat-number {
    font-size: 26px;
  }

  .stat-label {
    font-size: 10px;
  }
}
