  @import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@400;700;900&display=swap');

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

  :root {
    --bg: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --border: rgba(255,255,255,0.1);
    --border-hover: rgba(255,255,255,0.25);
    --text: #f0f0f0;
    --text-muted: #888;
    --accent: #1D9E75;
    --accent-orange: #ffd200;
  }

  html, body { background: var(--bg); }

  body {
    font-family: 'Nunito', Arial, sans-serif;
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Embedded-Mode: ohne Footer, ohne BG (iframe integriert sich in Landing) */
  body.embedded { background: transparent; min-height: auto; }
  body.embedded footer { display: none; }
  body.embedded main { padding: 20px 16px; min-height: auto; }

  main {
    flex: 1;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  /* Header */
  .header {
    text-align: center;
    margin-bottom: 24px;
  }

  .logo {
    font-family: 'Lilita One', cursive;
    font-size: clamp(30px, 6vw, 50px);
    background: linear-gradient(135deg, #ff8c00, #ffd200, #ff4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255,180,0,0.35));
  }

  .subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 4px;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Card */
  .card {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border);
    border-radius: 2px;
    padding: 32px 28px;
    width: 100%;
    max-width: 440px;
  }

  /* Progress */
  .progress-wrap { margin-bottom: 24px; }

  .progress-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
  }

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

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8c00, #ffd200);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255,180,0,0.35);
  }

  /* Question */
  .question {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 900;
    color: var(--text);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.3;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Answer buttons */
  .answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .btn-answer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    transition: all 0.2s;
    text-align: left;
  }

  .btn-answer:hover {
    background: rgba(29,158,117,0.12);
    border-color: var(--accent);
    transform: translateX(4px);
  }

  .btn-answer:active { transform: scale(0.98); }

  .btn-icon {
    font-size: 26px;
    min-width: 32px;
    text-align: center;
  }

  /* Start-Screen (neu) */
  .start-wrap {
    text-align: center;
  }

  .start-intro {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'Courier New', Courier, monospace;
  }

  .start-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
  }

  .btn-start {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 2px;
    font-family: 'Lilita One', cursive;
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff8c00, #ffd200);
    color: #1a0a00;
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 1px;
  }

  .btn-start:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(255,180,0,0.35);
  }

  .btn-start-secondary {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: transparent;
    color: var(--text);
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-start-secondary:hover {
    background: rgba(29,158,117,0.12);
    border-color: var(--accent);
  }

  /* Top-3 Preview auf Start-Screen */
  .top3 {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
  }

  .top3-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: left;
  }

  .top3-title::before { content: '# '; color: var(--accent); }

  .top3-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  .top3-item:last-child { border-bottom: none; }

  .top3-rank {
    min-width: 24px;
    color: var(--text-muted);
  }
  .top3-rank.gold   { color: #ffd200; }
  .top3-rank.silver { color: #c0c0c0; }
  .top3-rank.bronze { color: #cd7f32; }

  .top3-name { flex: 1; color: var(--text); }
  .top3-brawler { color: var(--text-muted); font-size: 13px; }
  .top3-time { color: var(--accent); font-weight: 700; }

  .top3-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 12px 0;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Lootbox */
  .lootbox-wrap { text-align: center; }

  .lootbox {
    font-size: 92px;
    display: block;
    margin: 10px auto 20px;
    animation: float 1.4s ease-in-out infinite alternate;
    cursor: pointer;
    filter: drop-shadow(0 0 20px rgba(255,180,0,0.5));
  }

  @keyframes float {
    from { transform: scale(1) rotate(-4deg) translateY(0); }
    to   { transform: scale(1.08) rotate(4deg) translateY(-8px); }
  }

  .lootbox-text {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 20px;
  }

  .btn-open {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 2px;
    font-family: 'Lilita One', cursive;
    font-size: 22px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff8c00, #ffd200);
    color: #1a0a00;
    box-shadow: 0 6px 25px rgba(255,180,0,0.35);
    transition: all 0.2s;
    letter-spacing: 1px;
  }

  .btn-open:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 35px rgba(255,180,0,0.5);
  }

  /* Loading */
  .loading-wrap {
    text-align: center;
    padding: 40px 0;
  }

  .loading-emoji {
    font-size: 52px;
    animation: spin 0.6s linear infinite;
    display: block;
    margin-bottom: 16px;
  }

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

  .loading-text {
    color: var(--text-muted);
    font-size: 16px;
  }

  /* Result */
  .result-wrap { text-align: center; }

  .result-img-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
  }

  .result-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    position: relative;
    z-index: 1;
  }

  .result-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(255,180,0,0.35) 0%, transparent 70%);
    animation: pulseGlow 1.5s ease-in-out infinite alternate;
    border-radius: 50%;
  }

  @keyframes pulseGlow {
    from { opacity: 0.5; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1.1); }
  }

  @keyframes popIn {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg); opacity: 1; }
  }

  .result-name {
    font-family: 'Lilita One', cursive;
    font-size: clamp(30px, 7vw, 42px);
    background: linear-gradient(135deg, #ff8c00, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,180,0,0.5));
    margin: 8px 0 6px;
    animation: popIn 0.5s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  }

  .result-trait {
    display: inline-block;
    background: rgba(29,158,117,0.12);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', Courier, monospace;
  }

  .result-desc {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 0 8px;
  }

  /* Highscore input */
  .hs-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 16px;
    margin-bottom: 16px;
  }

  .hs-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    font-family: 'Courier New', Courier, monospace;
  }

  .hs-label::before { content: '$ '; color: var(--accent); }

  .hs-input-row {
    display: flex;
    gap: 8px;
  }

  .hs-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    outline: none;
  }

  .hs-input:focus {
    border-color: var(--accent);
    background: rgba(29,158,117,0.08);
  }

  .hs-input::placeholder { color: var(--text-muted); }

  .btn-hs-save {
    padding: 10px 16px;
    border: none;
    border-radius: 2px;
    background: var(--accent);
    color: #0f0f0f;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s;
  }

  .btn-hs-save:hover { transform: scale(1.05); }

  /* Buttons row */
  .btn-row { display: flex; gap: 10px; }

  .btn-secondary {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: transparent;
    color: var(--text);
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-secondary:hover {
    background: rgba(29,158,117,0.12);
    border-color: var(--accent);
  }

  .btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 2px;
    background: linear-gradient(135deg, #ff8c00, #ffd200);
    color: #1a0a00;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-primary:hover { transform: scale(1.03); }

  /* Highscore board (Full-View) */
  .hs-board {
    width: 100%;
    max-width: 440px;
    margin-top: 20px;
  }

  .hs-title {
    font-family: 'Lilita One', cursive;
    color: var(--accent-orange);
    font-size: 20px;
    text-align: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 8px rgba(255,210,0,0.35));
  }

  .hs-list {
    background: var(--bg-secondary);
    border: 0.5px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
  }

  .hs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
  }

  .hs-item:last-child { border-bottom: none; }

  .hs-rank {
    font-family: 'Lilita One', cursive;
    font-size: 18px;
    min-width: 28px;
    color: var(--text-muted);
  }

  .hs-rank.gold   { color: #ffd200; }
  .hs-rank.silver { color: #c0c0c0; }
  .hs-rank.bronze { color: #cd7f32; }

  .hs-name { flex: 1; }
  .hs-brawler { color: var(--text-muted); font-size: 14px; }
  .hs-time { color: var(--accent); font-size: 15px; }

  .hs-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 15px;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Confetti */
  .confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 2px;
    animation: confettiFall var(--duration) ease-in var(--delay) forwards;
    z-index: 999;
  }

  @keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg) translateX(0); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) translateX(var(--drift)); opacity: 0; }
  }

  /* Timer */
  .timer {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Transitions */
  .fade-in { animation: fadeIn 0.3s ease both; }

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

  /* Footer */
  footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 0.5px solid var(--border);
    font-family: 'Courier New', Courier, monospace;
  }
  footer a { color: var(--accent); text-decoration: none; }
  footer a:hover { text-decoration: underline; }
