/* ═══════════════════════════════════════════
   CSS CUSTOM PROPERTIES
═══════════════════════════════════════════ */
:root {
  --accent: #7ab030;
  --accent-bright: #8ecf40;
  --accent-dark: #6aa028;
  --accent-dim: rgba(122, 176, 48, 0.2);
  --accent-glow: rgba(140, 200, 60, 0.5);
  
  /* NEU: Premium Glassmorphism Base */
  --glass-bg: rgba(20, 24, 18, 0.65);
  --glass-blur: blur(20px);
  --glass-border: rgba(255, 255, 255, 0.08);
  --bg-dark: #050505; /* OLED Black */
  
  --gold: #ffc840;
  --gold-dim: rgba(200, 160, 40, 0.5);
  --bg-card: var(--glass-bg);
  --bg-card-solid: rgba(15, 18, 12, 0.95);
  --bg-card-inner: rgba(255, 255, 255, 0.03);
  --text-main: #f0f0f0;
  --text-muted: rgba(220, 220, 210, 0.7);
  --text-dim: rgba(200, 200, 190, 0.4);
  --blue-accent: #00c3ff;
  --red-accent: #ff4a4a;
  --red-dim: rgba(255, 74, 74, 0.2);
  --purple-accent: rgba(170, 90, 255, 1);
  --purple-dim: rgba(170, 90, 255, 0.2);
  --border-accent: rgba(140, 200, 60, 0.25);
  --border-accent-light: rgba(140, 200, 60, 0.4);
  --font-main: 'Outfit', sans-serif;
  --font-display: 'Bebas Neue', cursive;
  --font-mono: 'DM Mono', monospace;
}

    /* ═══════════════════════════════════════════
   BASE
═══════════════════════════════════════════ */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent
    }

    html {
      height: 100%;
      min-height: 100dvh;
      overflow: auto;
    }

    body {
      height: 100%;
      min-height: 100dvh;
      background: #0e1208;
      font-family: 'Outfit', sans-serif;
      font-size: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow: auto;
      color: #e8e8e0;
    }

    /* Layered background */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      z-index: 0;
      background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(90, 140, 30, .18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(40, 60, 15, .25) 0%, transparent 50%),
        linear-gradient(175deg, #0a0f06 0%, #111808 40%, #0e1408 100%);
    }

    /* Grain overlay */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
      background-size: 180px 180px;
      opacity: 0.6;
    }

    .screen {
      display: none;
      flex-direction: column;
      align-items: center;
      width: 100%;
      min-height: 100dvh;
      position: relative;
      z-index: 1;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .screen.active {
      display: flex;
    }

    ::-webkit-scrollbar {
      width: 2px;
    }

    ::-webkit-scrollbar-thumb {
      background: #2a4010;
      border-radius: 2px;
    }

    /* ═══════════════════════════════════════════
   NEUE FEATURES: Adaptive OCR
═══════════════════════════════════════════ */

    /* Adaptive Bot System Status */
    .adaptive-status {
      background: rgba(122, 176, 48, 0.1);
      border: 1px solid rgba(122, 176, 48, 0.3);
      border-radius: 8px;
      padding: 12px;
      margin: 12px 0;
      text-align: center;
    }

    .adaptive-status .status-title {
      color: #7ab030;
      font-weight: 600;
      margin: 0 0 8px 0;
    }

    .adaptive-status .status-text {
      color: rgba(200, 200, 190, 0.9);
      font-size: 0.85rem;
      margin: 0;
    }

    /* ═══════════════════════════════════════════
   ERWEITERTE FEATURES: Achievements, Analytics, Training, Mobile
═══════════════════════════════════════════ */

    /* Enhanced Achievements */
    .enhanced-achievements {
      background: rgba(20, 25, 15, 0.95);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 16px;
      padding: 24px;
      margin: 20px 0;
    }

    .achievements-header {
      text-align: center;
      margin-bottom: 24px;
    }

    .achievements-header h3 {
      color: #e8e8e0;
      margin: 0 0 12px 0;
      font-size: 1.4rem;
    }

    .achievement-progress {
      display: flex;
      align-items: center;
      gap: 12px;
      justify-content: center;
    }

    .progress-text {
      color: #7ab030;
      font-weight: 600;
      font-size: 1.1rem;
    }

    .progress-bar {
      flex: 1;
      max-width: 200px;
      height: 8px;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 4px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #7ab030, #8bc540);
      border-radius: 4px;
      transition: width 0.3s ease;
    }

    .achievements-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
    }

    .achievement-card {
      background: rgba(30, 35, 25, 0.8);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 12px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: all 0.3s ease;
    }

    .achievement-card.unlocked {
      border-color: rgba(120, 180, 50, 0.5);
      box-shadow: 0 4px 12px rgba(120, 180, 50, 0.2);
    }

    .achievement-card.locked {
      opacity: 0.6;
      filter: grayscale(0.8);
    }

    .achievement-card.tier-1 { border-left: 4px solid #cd7f32; } /* Bronze */
    .achievement-card.tier-2 { border-left: 4px solid #c0c0c0; } /* Silver */
    .achievement-card.tier-3 { border-left: 4px solid #ffd700; } /* Gold */

    .achievement-icon {
      font-size: 2rem;
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 8px;
    }

    .achievement-info {
      flex: 1;
    }

    .achievement-name {
      color: #e8e8e0;
      font-weight: 600;
      margin: 0 0 4px 0;
      font-size: 0.95rem;
    }

    .achievement-desc {
      color: rgba(200, 200, 190, 0.8);
      font-size: 0.8rem;
      margin: 0 0 4px 0;
      line-height: 1.3;
    }

    .achievement-reward {
      color: #7ab030;
      font-size: 0.75rem;
      font-weight: 500;
    }

    .achievement-unlocked {
      color: #7ab030;
      font-size: 1.2rem;
      font-weight: bold;
    }

    /* Enhanced Analytics */
    .enhanced-analytics {
      background: rgba(20, 25, 15, 0.95);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 16px;
      padding: 24px;
      margin: 20px 0;
    }

    .analytics-header {
      text-align: center;
      margin-bottom: 24px;
    }

    .analytics-header h3 {
      color: #e8e8e0;
      margin: 0 0 8px 0;
      font-size: 1.4rem;
    }

    .analytics-summary {
      color: rgba(200, 200, 190, 0.8);
      font-size: 0.9rem;
    }

    .analytics-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .metric-card {
      background: rgba(30, 35, 25, 0.8);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 12px;
      padding: 16px;
      text-align: center;
      transition: all 0.3s ease;
    }

    .metric-card.primary {
      border-color: rgba(120, 180, 50, 0.4);
      background: rgba(120, 180, 50, 0.1);
    }

    .metric-title {
      color: rgba(200, 200, 190, 0.9);
      font-size: 0.8rem;
      margin: 0 0 8px 0;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .metric-value {
      color: #e8e8e0;
      font-size: 1.8rem;
      font-weight: 700;
      margin: 0 0 4px 0;
    }

    .metric-trend {
      font-size: 0.8rem;
      font-weight: 600;
    }

    .metric-trend.positive {
      color: #4ecdc4;
    }

    .metric-trend.negative {
      color: #ff6b6b;
    }

    .metric-bar {
      height: 6px;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 3px;
      margin: 8px 0;
      overflow: hidden;
    }

    .metric-fill {
      height: 100%;
      background: linear-gradient(90deg, #7ab030, #8bc540);
      border-radius: 3px;
      transition: width 0.3s ease;
    }

    .metric-sub {
      color: rgba(200, 200, 190, 0.7);
      font-size: 0.7rem;
      margin: 0;
    }

    .metric-value.form-excellent { color: #4ecdc4; }
    .metric-value.form-good { color: #7ab030; }
    .metric-value.form-stable { color: #f7b731; }
    .metric-value.form-declining { color: #ff9f43; }
    .metric-value.form-poor { color: #ff6b6b; }

    .metric-value.risk-conservative { color: #4ecdc4; }
    .metric-value.risk-balanced { color: #f7b731; }
    .metric-value.risk-aggressive { color: #ff6b6b; }

    /* Training Modes */
    .training-modes {
      background: rgba(20, 25, 15, 0.95);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 16px;
      padding: 24px;
      margin: 20px 0;
    }

    .training-header {
      text-align: center;
      margin-bottom: 24px;
    }

    .training-header h3 {
      color: #e8e8e0;
      margin: 0 0 8px 0;
      font-size: 1.4rem;
    }

    .training-header p {
      color: rgba(200, 200, 190, 0.8);
      margin: 0;
      font-size: 0.9rem;
    }

    .training-modes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .training-mode-card {
      background: rgba(30, 35, 25, 0.8);
      border: 1px solid rgba(120, 180, 50, 0.2);
      border-radius: 12px;
      padding: 20px;
      text-align: center;
      transition: all 0.3s ease;
      cursor: pointer;
    }

    .training-mode-card:hover:not(.locked) {
      transform: translateY(-2px);
      border-color: rgba(120, 180, 50, 0.4);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .training-mode-card.locked {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .mode-icon {
      font-size: 3rem;
      margin: 0 0 12px 0;
      display: block;
    }

    .mode-name {
      color: #e8e8e0;
      font-size: 1.1rem;
      font-weight: 600;
      margin: 0 0 8px 0;
    }

    .mode-desc {
      color: rgba(200, 200, 190, 0.8);
      font-size: 0.85rem;
      margin: 0 0 16px 0;
      line-height: 1.4;
    }

    .mode-stats {
      display: flex;
      justify-content: space-around;
      margin: 12px 0;
      font-size: 0.8rem;
      color: rgba(200, 200, 190, 0.7);
    }

    .mode-stats span {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .mode-objectives {
      margin: 16px 0;
    }

    .objective {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 12px;
      margin: 4px 0;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 6px;
      font-size: 0.8rem;
    }

    .objective.completed {
      background: rgba(120, 180, 50, 0.2);
      border: 1px solid rgba(120, 180, 50, 0.4);
    }

    .objective-name {
      color: #e8e8e0;
      font-weight: 500;
    }

    .objective-req {
      color: rgba(200, 200, 190, 0.8);
      font-size: 0.75rem;
    }

    .objective-reward {
      color: #7ab030;
      font-weight: 600;
      font-size: 0.75rem;
    }

    .start-training-btn {
      background: linear-gradient(135deg, #7ab030, #6aa028);
      color: #0a0f06;
      border: none;
      border-radius: 8px;
      padding: 12px 20px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      width: 100%;
      margin-top: 12px;
    }

    .start-training-btn:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(122, 176, 48, 0.3);
    }

    .start-training-btn:disabled {
      background: rgba(120, 180, 50, 0.3);
      color: rgba(200, 200, 190, 0.6);
      cursor: not-allowed;
    }

    .training-history {
      margin-top: 24px;
    }

    .training-history h4 {
      color: #e8e8e0;
      margin: 0 0 16px 0;
      font-size: 1.1rem;
    }

    .history-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .history-entry {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 6px;
      font-size: 0.85rem;
    }

    .history-mode {
      color: #e8e8e0;
      font-weight: 500;
    }

    .history-result {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .history-grade {
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
    }

    .history-grade.grade-gold {
      background: #ffd700;
      color: #000;
    }

    .history-grade.grade-silber {
      background: #c0c0c0;
      color: #000;
    }

    .history-grade.grade-bronze {
      background: #cd7f32;
      color: #fff;
    }

    .history-grade.grade-teilnahme {
      background: rgba(200, 200, 190, 0.3);
      color: #e8e8e0;
    }

    .history-score {
      color: #7ab030;
      font-weight: 600;
    }

    .history-meta {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    .history-date {
      color: rgba(200, 200, 190, 0.7);
      font-size: 0.75rem;
    }

    .history-reward {
      color: #7ab030;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .install-overlay {
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      backdrop-filter: blur(5px);
    }

    .install-prompt {
      background: #1a1f14;
      border: 2px solid #7ab030;
      border-radius: 16px;
      padding: 32px;
      max-width: 400px;
      width: 90%;
      text-align: center;
      color: #e8e8e0;
    }

    .install-icon {
      font-size: 4rem;
      margin: 0 0 16px 0;
    }
    /* Prediction & Trends Section */
    .prediction-section,
    .trends-section {
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid rgba(120, 180, 50, 0.2);
    }

    .prediction-section h4,
    .trends-section h4 {
      color: #e8e8e0;
      margin: 0 0 16px 0;
      font-size: 1.1rem;
    }

    .prediction-grid,
    .trend-items {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px;
    }

    .prediction-card,
    .trend-item {
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid rgba(120, 180, 50, 0.1);
      border-radius: 8px;
      padding: 12px;
      text-align: center;
    }

    .prediction-title,
    .trend-label {
      color: rgba(200, 200, 190, 0.8);
      font-size: 0.8rem;
      margin: 0 0 8px 0;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .prediction-value,
    .trend-value {
      color: #e8e8e0;
      font-size: 1.4rem;
      font-weight: 700;
      margin: 0 0 4px 0;
    }

    .prediction-confidence,
    .prediction-factors {
      color: rgba(200, 200, 190, 0.7);
      font-size: 0.7rem;
      margin: 0;
    }

    /* Responsive Anpassungen */
    @media (max-width: 768px) {
      .achievements-grid,
      .analytics-grid,
      .training-modes-grid,
      .prediction-grid,
      .trend-items {
        grid-template-columns: 1fr;
      }

      .install-buttons {
        flex-direction: column;
      }
    }

    /* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
    .hdr {
      width: 100%;
      flex-shrink: 0;
      padding: 14px 20px 0;
      background: linear-gradient(180deg, rgba(8, 14, 4, .97) 0%, rgba(12, 18, 6, .92) 100%);
      border-bottom: 1px solid rgba(100, 160, 40, .2);
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
    }

    .hdr::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(140, 200, 60, .35) 30%, rgba(140, 200, 60, .35) 70%, transparent);
    }

    .logo {
      font-family: 'Bebas Neue', cursive;
      font-size: clamp(2rem, 8vw, 2.8rem);
      letter-spacing: .16em;
      color: #f0e0a0;
      text-shadow: 0 2px 12px rgba(0, 0, 0, .9), 0 0 30px rgba(200, 170, 60, .15);
      line-height: 1;
    }

    .logo em {
      color: #8ecf40;
      font-style: normal;
    }

    .logo-tag {
      font-size: .6rem;
      letter-spacing: .4em;
      text-transform: uppercase;
      color: rgba(140, 200, 60, .55);
      margin-top: 2px;
      font-weight: 500;
    }

    /* ═══════════════════════════════════════════
   HEADER TOP ROW  (streak left · logo center)
═══════════════════════════════════════════ */
    .hdr-top {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 2px;
      margin-bottom: 4px;
    }

    .streak-corner {
      display: flex;
      align-items: center;
      gap: 5px;
      background: rgba(170, 90, 255, .1);
      border: 1px solid rgba(170, 90, 255, .2);
      border-radius: 8px;
      padding: 4px 9px 4px 7px;
      cursor: default;
      transition: all .3s ease;
      flex-shrink: 0;
    }

    .streak-corner:hover {
      background: rgba(170, 90, 255, .16);
    }

    /* Streak Variants (Colors) */
    .streak-corner.silver {
      background: rgba(200, 210, 225, .12);
      border-color: rgba(200, 210, 225, .3);
    }

    .streak-corner.silver .sc-n {
      color: #d0e0ff;
      text-shadow: 0 0 10px rgba(200, 210, 225, .4);
    }

    .streak-corner.gold {
      background: rgba(255, 215, 0, .1);
      border-color: rgba(255, 215, 0, .4);
      box-shadow: 0 0 15px rgba(255, 200, 0, .05);
    }

    .streak-corner.gold .sc-n {
      color: #ffd700;
      text-shadow: 0 0 10px rgba(255, 215, 0, .4);
    }

    .streak-corner.red {
      background: rgba(255, 60, 60, .1);
      border-color: rgba(255, 50, 50, .4);
      box-shadow: 0 0 15px rgba(255, 50, 50, .08);
    }

    .streak-corner.red .sc-n {
      color: #ff6060;
      text-shadow: 0 0 10px rgba(255, 60, 60, .4);
    }

    .streak-corner.purple {
      background: rgba(180, 0, 255, .1);
      border-color: rgba(180, 0, 255, .4);
      box-shadow: 0 0 15px rgba(180, 0, 255, .1);
    }

    .streak-corner.purple .sc-n {
      color: #d580ff;
      text-shadow: 0 0 10px rgba(210, 100, 255, .4);
    }

    .sc-fire {
      font-size: .85rem;
      line-height: 1;
    }

    .sc-inf {
      display: flex;
      flex-direction: column;
    }

    .sc-n {
      font-family: 'Bebas Neue', cursive;
      font-size: 1rem;
      line-height: 1;
      color: #c880ff;
      text-shadow: 0 0 10px rgba(180, 90, 255, .35);
    }

    .sc-lbl {
      font-size: .38rem;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: rgba(190, 140, 255, .35);
      font-weight: 600;
      line-height: 1;
      margin-top: 1px;
    }

    /* mirrors streak width so logo stays centered */
    .hdr-spacer {
      flex-shrink: 0;
      visibility: hidden;
      pointer-events: none;
    }

    /* ═══════════════════════════════════════════
   PROFIL BUTTON
═══════════════════════════════════════════ */
    .profile-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(100, 150, 200, .12);
      border: 1px solid rgba(100, 150, 200, .25);
      border-radius: 10px;
      padding: 6px 10px 6px 7px;
      cursor: pointer;
      transition: background .2s, border-color .2s;
      flex-shrink: 0;
    }

    .profile-btn:hover {
      background: rgba(100, 150, 200, .18);
      border-color: rgba(100, 150, 200, .35);
    }

    .profile-btn:active {
      background: rgba(100, 150, 200, .22);
    }

    .pb-icon {
      font-size: 1.2rem;
      line-height: 1;
    }

    .pb-inf {
      display: flex;
      flex-direction: column;
    }

    .pb-rank {
      font-family: 'Bebas Neue', cursive;
      font-size: 0.9rem;
      line-height: 1;
      color: #70aaf0;
      text-shadow: 0 0 8px rgba(112, 170, 240, .25);
    }

    .pb-lbl {
      font-size: 0.38rem;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .35);
      font-weight: 600;
      line-height: 1;
      margin-top: 1px;
    }

    /* ═══════════════════════════════════════════
   PROFILE ICON (oben rechts)
═══════════════════════════════════════════ */
    .schuetzenpass-icon {
      font-size: 1.6rem;
      line-height: 1;
      cursor: pointer;
      padding: 6px 10px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .3s ease;
    }

    /* Default - No Ring */
    .schuetzenpass-icon::before {
      content: '';
      position: absolute;
      inset: -8px;
      border-radius: 50%;
      opacity: 0;
      transition: opacity .3s ease;
    }

    /* Modern Ring when active - HIDDEN */
    .schuetzenpass-icon.active::before {
      display: none;
    }

    /* ═══════════════════════════════════════════
   PROFIL OVERLAY (vollwertiger Screen)
═══════════════════════════════════════════ */
    .profile-overlay {
      position: fixed;
      inset: 0;
      z-index: 900;
      background: rgba(0, 0, 0, .55);
      backdrop-filter: blur(4px);
      display: none;
      align-items: flex-end;
      justify-content: center;
      opacity: 0;
      transition: opacity .2s ease;
    }

    .profile-overlay.active {
      display: flex;
      opacity: 1;
    }

    .profile-sheet {
      width: 100%;
      max-width: 480px;
      max-height: 92vh;
      background: linear-gradient(180deg, #0d1a2e 0%, #091220 100%);
      border: 1px solid rgba(100, 150, 200, .22);
      border-bottom: none;
      border-radius: 20px 20px 0 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 -8px 48px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(200, 230, 255, .08);
      animation: sheetUp .28s cubic-bezier(.32, 1.2, .64, 1);
    }

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



    /* Drag handle */
    .profile-sheet-handle {
      width: 36px;
      height: 4px;
      background: rgba(150, 180, 220, .2);
      border-radius: 2px;
      margin: 10px auto 0;
      flex-shrink: 0;
    }

    /* Header inside sheet */
    .ps-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 18px 10px;
      flex-shrink: 0;
      border-bottom: 1px solid rgba(100, 150, 200, .1);
    }

    .ps-title {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.3rem;
      letter-spacing: .12em;
      color: #70aaf0;
      text-shadow: 0 0 12px rgba(100, 160, 240, .25);
    }

    .ps-close {
      background: rgba(100, 150, 200, .1);
      border: 1px solid rgba(100, 150, 200, .2);
      border-radius: 50%;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: rgba(150, 180, 220, .6);
      font-size: .9rem;
      transition: background .2s, color .2s;
    }

    .ps-close:hover {
      background: rgba(100, 150, 200, .2);
      color: #fff;
    }

    /* Hero section */
    .ps-hero {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 18px 12px;
      flex-shrink: 0;
    }

    .ps-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(60, 100, 180, .3), rgba(100, 60, 180, .3));
      border: 2px solid rgba(100, 150, 200, .3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      flex-shrink: 0;
      position: relative;
    }

    .ps-avatar-ring {
      position: absolute;
      inset: -4px;
      border-radius: 50%;
      border: 2px solid transparent;
      background: linear-gradient(135deg, #70aaf0, #c880ff) border-box;
      -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: destination-out;
      mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
      mask-composite: exclude;
    }

    .ps-info {
      flex: 1;
      min-width: 0;
    }

    .ps-name {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.5rem;
      letter-spacing: .08em;
      color: #e8e8e0;
      line-height: 1;
    }

    .ps-rank-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 4px;
      background: rgba(100, 150, 200, .1);
      border: 1px solid rgba(100, 150, 200, .2);
      border-radius: 20px;
      padding: 3px 9px;
    }

    .ps-rank-icon {
      font-size: .85rem;
    }

    .ps-rank-name {
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: #70aaf0;
    }

    .ps-level {
      font-size: .6rem;
      letter-spacing: .15em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .4);
      margin-top: 2px;
    }

    /* XP Bar */
    .ps-xp-wrap {
      padding: 0 18px 12px;
      flex-shrink: 0;
    }

    .ps-xp-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
    }

    .ps-xp-label {
      font-size: .58rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .4);
      font-weight: 600;
    }

    .ps-xp-val {
      font-family: 'DM Mono', monospace;
      font-size: .65rem;
      color: rgba(150, 180, 220, .6);
    }

    .ps-xp-bar {
      height: 6px;
      background: rgba(100, 150, 200, .1);
      border-radius: 3px;
      overflow: hidden;
    }

    .ps-xp-fill {
      height: 100%;
      background: linear-gradient(90deg, #4080d0, #70aaf0);
      border-radius: 3px;
      transition: width .6s cubic-bezier(.34, 1.56, .64, 1);
    }

    /* Tabs */
    .ps-tabs {
      display: flex;
      border-bottom: 1px solid rgba(100, 150, 200, .1);
      flex-shrink: 0;
    }

    .ps-tab {
      flex: 1;
      padding: 9px 4px 10px;
      text-align: center;
      font-size: .62rem;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .35);
      cursor: pointer;
      position: relative;
      transition: color .2s;
      -webkit-tap-highlight-color: transparent;
    }

    .ps-tab::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 20%;
      right: 20%;
      height: 2px;
      background: #70aaf0;
      border-radius: 2px 2px 0 0;
      transform: scaleX(0);
      transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
    }

    .ps-tab.active {
      color: #70aaf0;
    }

    .ps-tab.active::after {
      transform: scaleX(1);
    }

    /* Tab content */
    .ps-body {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
    }

    .ps-panel {
      display: none;
      padding: 14px 16px 24px;
      flex-direction: column;
      gap: 10px;
    }

    .ps-panel.active {
      display: flex;
    }

    /* Stats Grid */
    .ps-stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .ps-stat-card {
      background: rgba(40, 80, 140, .12);
      border: 1px solid rgba(100, 150, 200, .14);
      border-radius: 12px;
      padding: 11px 12px;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .ps-stat-card.full {
      grid-column: 1 / -1;
    }

    .ps-stat-card.highlight {
      border-color: rgba(100, 150, 200, .28);
      background: rgba(40, 80, 140, .2);
    }

    .ps-sc-label {
      font-size: .52rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .4);
      font-weight: 600;
    }

    .ps-sc-val {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.6rem;
      line-height: 1;
      color: #70aaf0;
      text-shadow: 0 0 10px rgba(100, 160, 240, .2);
    }

    .ps-sc-val.gold {
      color: #ffc840;
      text-shadow: 0 0 10px rgba(255, 200, 60, .2);
    }

    .ps-sc-val.green {
      color: #a8e060;
      text-shadow: 0 0 10px rgba(140, 220, 60, .2);
    }

    .ps-sc-val.purple {
      color: #c880ff;
      text-shadow: 0 0 10px rgba(180, 100, 255, .2);
    }

    .ps-sc-sub {
      font-size: .5rem;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .3);
    }

    /* Weapon breakdown */
    .ps-weapon-row {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(40, 80, 140, .1);
      border: 1px solid rgba(100, 150, 200, .12);
      border-radius: 10px;
      padding: 10px 12px;
    }

    .ps-weapon-icon {
      font-size: 1.3rem;
      flex-shrink: 0;
    }

    .ps-weapon-info {
      flex: 1;
      min-width: 0;
    }

    .ps-weapon-name {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: rgba(200, 220, 255, .7);
    }

    .ps-weapon-detail {
      font-size: .58rem;
      color: rgba(150, 180, 220, .4);
      margin-top: 2px;
    }

    .ps-weapon-streak {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.2rem;
      color: #c880ff;
      text-align: right;
      flex-shrink: 0;
    }

    .ps-weapon-streak-lbl {
      font-size: .42rem;
      letter-spacing: .15em;
      text-transform: uppercase;
      color: rgba(190, 140, 255, .35);
      text-align: right;
    }

    /* ── Leistungskurve ──────────────────────── */
    .perf-chart-wrap {
      margin-top: 18px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 14px;
      padding: 14px 14px 12px;
    }

    .perf-chart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .perf-chart-title {
      font-size: .52rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      font-weight: 600;
    }

    .perf-toggle-group {
      display: flex;
      gap: 5px;
    }

    .perf-toggle {
      font-size: .58rem;
      font-family: 'Outfit', sans-serif;
      font-weight: 600;
      letter-spacing: .06em;
      padding: 4px 11px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, .12);
      background: transparent;
      color: rgba(255, 255, 255, .35);
      cursor: pointer;
      transition: all .18s;
    }

    .perf-toggle.active[id="perfToggleLG"] {
      background: rgba(122, 176, 48, .15);
      border-color: rgba(122, 176, 48, .5);
      color: #7ab030;
    }

    .perf-toggle.active[id="perfToggleKK"] {
      background: rgba(240, 200, 64, .12);
      border-color: rgba(240, 200, 64, .45);
      color: #f0c840;
    }

    .perf-chart-box {
      position: relative;
      height: 160px;
      width: 100%;
    }

    #perfChart {
      display: block;
    }

    .perf-chart-empty {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: .68rem;
      color: rgba(255, 255, 255, .2);
      line-height: 1.6;
      pointer-events: none;
    }

    /* ═══════════════════════════════════════════
   SUN SYSTEM
═══════════════════════════════════════════ */
    .sun-section-title {
      font-size: .55rem;
      letter-spacing: .28em;
      text-transform: uppercase;
      color: rgba(255, 200, 80, .5);
      font-weight: 600;
      margin-top: 4px;
      margin-bottom: 2px;
      padding-left: 2px;
    }

    .sun-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .sun-card {
      background: rgba(30, 25, 10, .5);
      border: 1px solid rgba(200, 160, 40, .12);
      border-radius: 12px;
      padding: 11px 8px 9px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      position: relative;
      transition: border-color .2s, background .2s;
    }

    .sun-card.earned {
      background: rgba(60, 50, 10, .5);
      border-color: rgba(200, 160, 40, .35);
      box-shadow: 0 0 12px rgba(200, 160, 40, .08);
    }

    .sun-card.locked {
      opacity: .45;
      filter: grayscale(.6);
    }

    .sun-icon {
      font-size: 1.6rem;
      line-height: 1;
    }

    .sun-name {
      font-size: .55rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: rgba(220, 200, 120, .8);
      text-align: center;
      line-height: 1.2;
    }

    .sun-card.locked .sun-name {
      color: rgba(150, 150, 150, .5);
    }

    .sun-desc {
      font-size: .48rem;
      color: rgba(200, 180, 100, .4);
      text-align: center;
      line-height: 1.3;
    }

    .sun-card.locked .sun-desc {
      color: rgba(120, 120, 120, .35);
    }

    .sun-check {
      position: absolute;
      top: 5px;
      right: 6px;
      font-size: .6rem;
      color: #ffc840;
    }

    .sun-progress-wrap {
      width: 100%;
      height: 3px;
      background: rgba(200, 160, 40, .1);
      border-radius: 2px;
      overflow: hidden;
    }

    .sun-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #c8a020, #ffc840);
      border-radius: 2px;
      transition: width .5s ease;
    }

    .sun-total-badge {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(60, 50, 10, .4);
      border: 1px solid rgba(200, 160, 40, .2);
      border-radius: 10px;
      padding: 10px 14px;
    }

    .sun-total-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .sun-total-label {
      font-size: .52rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(220, 180, 80, .5);
      font-weight: 600;
    }

    .sun-total-val {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.8rem;
      line-height: 1;
      color: #ffc840;
      text-shadow: 0 0 14px rgba(255, 200, 60, .3);
    }

    .sun-stars {
      display: flex;
      gap: 3px;
    }

    .sun-star {
      font-size: 1.1rem;
      opacity: .2;
      transition: opacity .3s;
    }

    .sun-star.lit {
      opacity: 1;
    }

    /* History panel */
    .ps-history-empty {
      text-align: center;
      padding: 32px 16px;
      color: rgba(150, 180, 220, .3);
      font-size: .75rem;
      letter-spacing: .08em;
    }

    .ps-history-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      background: rgba(40, 80, 140, .08);
      border: 1px solid rgba(100, 150, 200, .1);
      border-radius: 10px;
    }

    .phi-result {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .75rem;
      flex-shrink: 0;
      font-weight: 700;
    }

    .phi-result.win {
      background: rgba(80, 160, 40, .2);
      color: #a8e060;
      border: 1px solid rgba(80, 160, 40, .3);
    }

    .phi-result.lose {
      background: rgba(180, 60, 40, .2);
      color: #f08070;
      border: 1px solid rgba(180, 60, 40, .3);
    }

    .phi-result.draw {
      background: rgba(180, 140, 20, .2);
      color: #ffc840;
      border: 1px solid rgba(180, 140, 20, .3);
    }

    .phi-info {
      flex: 1;
      min-width: 0;
    }

    .phi-title {
      font-size: .7rem;
      font-weight: 600;
      color: rgba(200, 220, 255, .7);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .phi-sub {
      font-size: .55rem;
      color: rgba(150, 180, 220, .35);
      margin-top: 1px;
    }

    .phi-score {
      font-family: 'Bebas Neue', cursive;
      font-size: 1rem;
      color: rgba(150, 180, 220, .5);
      flex-shrink: 0;
      text-align: right;
    }

    .phi-score.win {
      color: #a8e060;
    }

    .phi-score.lose {
      color: #f08070;
    }

    /* Profile Menu Modal (legacy – kept for fallback, now hidden) */
    .profile-menu {
      display: none !important;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .profile-menu-title {
      font-size: 0.85rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(150, 180, 220, .5);
      font-weight: 600;
      margin-bottom: 4px;
    }

    .profile-stat {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px;
      background: rgba(40, 80, 140, .15);
      border-radius: 8px;
      border: 1px solid rgba(100, 150, 200, .15);
    }

    .profile-stat-label {
      font-size: 0.75rem;
      color: rgba(150, 180, 220, .6);
      text-transform: uppercase;
      letter-spacing: .08em;
    }

    .profile-stat-value {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.3rem;
      color: #70aaf0;
      text-shadow: 0 0 8px rgba(112, 170, 240, .3);
    }

    .profile-close {
      position: absolute;
      top: 8px;
      right: 8px;
      background: none;
      border: none;
      color: rgba(150, 180, 220, .4);
      cursor: pointer;
      font-size: 1.2rem;
      line-height: 1;
      padding: 4px;
      transition: color .2s;
    }

    .profile-close:hover {
      color: rgba(150, 180, 220, .7);
    }

    /* ═══════════════════════════════════════════
   WEAPON TABS
═══════════════════════════════════════════ */
    .weapon-tabs {
      display: flex;
      width: 100%;
      margin-top: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .weapon-tab {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px 8px 11px;
      cursor: pointer;
      position: relative;
      transition: background .18s;
      -webkit-tap-highlight-color: transparent;
    }

    .weapon-tab:active {
      background: rgba(255, 255, 255, .03);
    }

    .weapon-tab::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 16%;
      right: 16%;
      height: 3px;
      background: #8ecf40;
      border-radius: 3px 3px 0 0;
      transform: scaleX(0);
      transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
    }

    .weapon-tab.active::after {
      transform: scaleX(1);
    }

    .wt-name {
      font-size: .88rem;
      font-weight: 700;
      letter-spacing: .07em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .32);
      transition: color .2s;
      line-height: 1;
    }

    .weapon-tab.active .wt-name {
      color: #c8ee80;
    }

    /* Separator line between tabs */
    .weapon-tabs .weapon-tab:not(:last-child) {
      border-right: 1px solid rgba(255, 255, 255, .06);
    }

    /* ═══════════════════════════════════════════
   STAT CHIPS IN HEADER
═══════════════════════════════════════════ */
    .hdr-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      width: 100%;
      max-width: 520px;
      justify-content: center;
    }

    .chip {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: rgba(0, 0, 0, .45);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 10px;
      padding: 6px 14px;
      min-width: 76px;
    }

    .chip.green {
      border-color: rgba(100, 180, 40, .25);
      background: rgba(60, 120, 10, .2);
    }

    .chip.red {
      border-color: rgba(180, 60, 40, .25);
      background: rgba(100, 20, 10, .2);
    }

    .chip.gold {
      border-color: rgba(180, 140, 20, .25);
      background: rgba(100, 70, 5, .2);
    }

    .chip-label {
      font-size: .52rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .3);
      font-weight: 600;
    }

    .chip-val {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.7rem;
      line-height: 1.1;
      color: #f0e0a0;
    }

    .chip-sub {
      font-size: .45rem;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .2);
    }

    .chip.gold .chip-val {
      color: #ffc840;
    }

    .chip.green .chip-val {
      color: #a8e060;
    }

    .chip.red .chip-val {
      color: #f08070;
    }

    @keyframes pulse {
      from {
        opacity: 1
      }

      to {
        opacity: .45
      }
    }

    .chip-val.low {
      color: #ff5030 !important;
      animation: pulse .6s ease infinite alternate;
    }

    .hdr-tag {
      font-size: .5rem;
      letter-spacing: .28em;
      text-transform: uppercase;
      color: rgba(140, 200, 60, .6);
      background: rgba(100, 160, 30, .08);
      border: 1px solid rgba(100, 160, 30, .18);
      border-radius: 4px;
      padding: 3px 12px;
      margin: 8px 0 10px;
    }

    /* ═══════════════════════════════════════════
   COMMON CARDS
═══════════════════════════════════════════ */
    .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      max-width: 420px;
      padding: 16px 18px;
      gap: 13px;
    }

    /* Setup-Screen: Content nimmt natürliche Höhe, damit untere Hälfte
       (5er-Salve, DUELL STARTEN) sichtbar bleibt und die Seite scrollt */
    #screenSetup .content {
      flex: 0 0 auto;
    }

    .card {
      width: 100%;
      background: rgba(0, 0, 0, .5);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 14px;
      padding: 14px 16px;
    }

    .card-hd {
      font-size: .55rem;
      letter-spacing: .3em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      font-weight: 600;
      margin-bottom: 12px;
    }

    /* ═══════════════════════════════════════════
   SHOT COUNT SELECTOR
═══════════════════════════════════════════ */
    .sc-row {
      display: flex;
      gap: 8px;
    }

    .scb {
      flex: 1;
      padding: 11px 4px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(255, 255, 255, .09);
      border-radius: 10px;
      cursor: pointer;
      transition: all .18s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .scb-n {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.6rem;
      color: rgba(255, 255, 255, .55);
      line-height: 1;
    }

    .scb-u {
      font-size: .46rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .2);
    }

    .scb.active {
      background: rgba(110, 170, 40, .14);
      border-color: #6aaa28;
      box-shadow: 0 0 14px rgba(110, 170, 40, .15);
    }

    .scb.active .scb-n {
      color: #c8ee80;
    }

    .scb.active .scb-u {
      color: rgba(160, 220, 80, .5);
    }

    /* 5-shot burst button */
    .btn-burst {
      width: 100%;
      padding: 11px 16px;
      font-family: 'Outfit', sans-serif;
      font-size: .88rem;
      font-weight: 700;
      letter-spacing: .05em;
      color: rgba(120, 200, 255, .7);
      background: rgba(40, 100, 200, .06);
      border: 1px solid rgba(80, 150, 255, .2);
      border-radius: 10px;
      cursor: pointer;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-burst.on {
      color: #70c8ff;
      background: rgba(40, 120, 220, .15);
      border-color: rgba(80, 160, 255, .4);
      box-shadow: 0 0 12px rgba(80, 160, 255, .12);
    }

    .btn-burst:active {
      background: rgba(40, 100, 200, .18);
    }

    .burst-badge {
      font-size: .52rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      padding: 1px 6px;
      border-radius: 3px;
      background: rgba(80, 160, 255, .15);
      border: 1px solid rgba(80, 160, 255, .3);
      color: rgba(120, 190, 255, .7);
      font-weight: 700;
    }

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

    .db {
      flex: 1;
      padding: 13px 4px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(255, 255, 255, .09);
      border-radius: 10px;
      cursor: pointer;
      transition: all .18s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .db.hidden {
      display: none;
    }

    .db-n {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.6rem;
      color: rgba(255, 255, 255, .55);
      line-height: 1;
    }

    .db-u {
      font-size: .48rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .22);
    }

    .db.active {
      background: rgba(110, 170, 40, .14);
      border-color: #6aaa28;
      box-shadow: 0 0 14px rgba(110, 170, 40, .15);
    }

    .db.active .db-n {
      color: #c8ee80;
    }

    .db.active .db-u {
      color: rgba(160, 220, 80, .5);
    }

    /* ═══════════════════════════════════════════
   INFO / HINT STRIPS
═══════════════════════════════════════════ */
    .info-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 14px;
      background: rgba(20, 40, 80, .25);
      border: 1px solid rgba(80, 130, 200, .15);
      border-radius: 10px;
      width: 100%;
    }

    .info-ico {
      font-size: 1.1rem;
      margin-top: 1px;
      flex-shrink: 0;
    }

    .info-txt {
      font-size: .85rem;
      color: rgba(180, 205, 240, .55);
      line-height: 1.45;
      font-weight: 400;
    }

    .info-txt b {
      color: rgba(200, 225, 255, .75);
      font-weight: 600;
    }

    /* ═══════════════════════════════════════════
   DIFFICULTY BUTTONS
═══════════════════════════════════════════ */
    .diff-row {
      display: flex;
      gap: 8px;
    }

    .dif {
      flex: 1;
      padding: 13px 6px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 10px;
      cursor: pointer;
      transition: background .2s, border-color .2s, box-shadow .2s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .dif-ico {
      font-size: 1.4rem;
      line-height: 1;
    }

    .dif-name {
      font-size: .82rem;
      font-weight: 700;
      color: rgba(255, 255, 255, .45);
      letter-spacing: .04em;
    }

    .dif-desc {
      font-size: .5rem;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .2);
    }

    .dif.easy {
      border-color: rgba(80, 180, 80, .15);
    }

    .dif.easy.active {
      background: rgba(50, 140, 50, .16);
      border-color: #46b040;
      box-shadow: 0 0 14px rgba(70, 176, 64, .15);
    }

    .dif.easy.active .dif-name {
      color: #80d860;
    }

    .dif.real {
      border-color: rgba(80, 130, 220, .15);
    }

    .dif.real.active {
      background: rgba(50, 100, 200, .14);
      border-color: #4882d8;
      box-shadow: 0 0 14px rgba(72, 130, 216, .15);
    }

    .dif.real.active .dif-name {
      color: #70aaf0;
    }

    .dif.hard {
      border-color: rgba(200, 60, 40, .15);
    }

    .dif.hard.active {
      background: rgba(180, 35, 25, .16);
      border-color: #c82818;
      box-shadow: 0 0 14px rgba(200, 40, 24, .18);
    }

    .dif.hard.active .dif-name {
      color: #f07060;
    }

    .dif.elite {
      border-color: rgba(220, 170, 20, .15);
    }

    .dif.elite.active {
      background: linear-gradient(135deg, rgba(120, 80, 0, .25), rgba(80, 50, 0, .2));
      border-color: #d4a820;
      box-shadow: 0 0 18px rgba(212, 168, 32, .25), inset 0 0 12px rgba(212, 168, 32, .06);
    }

    .dif.elite.active .dif-name {
      color: #f0c840;
    }

    .dif.elite.active .dif-ico {
      filter: drop-shadow(0 0 4px rgba(255, 210, 50, .6));
    }

    /* Diff badge */
    .diff-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: .52rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      border-radius: 5px;
      padding: 2px 10px;
      margin-top: 5px;
      border: 1px solid;
      font-weight: 600;
    }

    .diff-badge.easy {
      color: #80d860;
      border-color: rgba(128, 216, 96, .3);
      background: rgba(70, 176, 64, .08);
    }

    .diff-badge.real {
      color: #70aaf0;
      border-color: rgba(112, 170, 240, .3);
      background: rgba(72, 130, 216, .08);
    }

    .diff-badge.hard {
      color: #f07060;
      border-color: rgba(240, 112, 96, .3);
      background: rgba(200, 40, 24, .08);
    }

    .diff-badge.elite {
      color: #f0c840;
      border-color: rgba(240, 200, 64, .4);
      background: rgba(160, 110, 0, .15);
      box-shadow: 0 0 8px rgba(240, 200, 64, .15);
    }

    /* Weapon badge in battle header */
    .weapon-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: .5rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      border-radius: 4px;
      padding: 2px 9px;
      margin-top: 3px;
      border: 1px solid;
      font-weight: 700;
    }

    .weapon-badge.lg {
      color: #70d8f8;
      border-color: rgba(112, 216, 248, .3);
      background: rgba(40, 140, 200, .08);
    }

    .weapon-badge.kk {
      color: #f8c870;
      border-color: rgba(248, 200, 112, .3);
      background: rgba(160, 100, 20, .08);
    }

    /* ═══════════════════════════════════════════
   ACTION BUTTONS
═══════════════════════════════════════════ */
    .actions {
      width: 100%;
      max-width: 420px;
      padding: 0 18px 18px;
      padding-bottom: calc(18px + env(safe-area-inset-bottom, 0));
      display: flex;
      flex-direction: column;
      gap: 9px;
      flex-shrink: 0;
      contain: layout;
    }

    .btn-fire {
      width: 100%;
      padding: 18px 20px;
      font-family: 'Bebas Neue', cursive;
      font-size: 2.2rem;
      letter-spacing: .2em;
      color: #0c1008;
      background: linear-gradient(175deg, #dab228 0%, #a07c10 48%, #c8981c 100%);
      border: none;
      border-radius: 13px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      box-shadow: 0 5px 0 #5a3c08, 0 8px 24px rgba(180, 140, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .3);
      transition: transform .1s, box-shadow .1s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      will-change: transform;
      -webkit-font-smoothing: antialiased;
    }

    .btn-fire::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 46%;
      background: rgba(255, 255, 255, .15);
      border-radius: 11px 11px 50% 50%;
    }

    .btn-fire:active {
      opacity: 0.85;
      box-shadow: 0 2px 0 #5a3c08, 0 4px 12px rgba(180, 140, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .3);
    }

    .btn-fire:disabled {
      background: linear-gradient(180deg, #282828, #1a1a1a);
      color: rgba(255, 255, 255, .2);
      box-shadow: 0 3px 0 #111;
      cursor: not-allowed;
    }

    .btn-sec {
      width: 100%;
      padding: 12px 16px;
      font-family: 'Outfit', sans-serif;
      font-size: .9rem;
      font-weight: 600;
      letter-spacing: .06em;
      color: rgba(255, 100, 80, .55);
      background: rgba(255, 50, 30, .04);
      border: 1px solid rgba(255, 50, 30, .16);
      border-radius: 10px;
      cursor: pointer;
      transition: background .2s;
    }

    .btn-sec:active {
      background: rgba(255, 50, 30, .1);
    }

    /* ═══════════════════════════════════════════
   BATTLE SCREEN
═══════════════════════════════════════════ */
    #screenBattle .content {
      padding: 10px 18px;
      gap: 9px;
    }

    .target-wrap {
      position: relative;
      flex-shrink: 0;
      width: 100%;
      display: flex;
      justify-content: center;
    }

    .target-shadow {
      position: absolute;
      bottom: -10px;
      left: 50%;
      transform: translateX(-50%);
      width: 80%;
      height: 18px;
      background: radial-gradient(ellipse, rgba(0, 0, 0, .6) 0%, transparent 75%);
      filter: blur(6px);
    }

    #targetCanvas {
      display: block;
      border-radius: 50%;
      box-shadow: 0 0 0 2px rgba(60, 60, 60, .35), 0 12px 40px rgba(0, 0, 0, .55);
      will-change: transform;
    }

    /* Live dual-score bar */
    .live-score-bar {
      width: 100%;
      background: rgba(0, 0, 0, .5);
      border: 1px solid rgba(180, 55, 40, .22);
      border-radius: 12px;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .lsb-block {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex: 1;
    }

    .lsb-lbl {
      font-size: .48rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      font-weight: 600;
      margin-bottom: 2px;
    }

    .lsb-val {
      font-family: 'DM Mono', monospace;
      font-size: 1.55rem;
      font-weight: 500;
      line-height: 1;
    }

    .lsb-val.dec {
      color: #f08070;
    }

    .lsb-val.int {
      color: rgba(240, 130, 110, .5);
    }

    .lsb-val.proj {
      color: rgba(255, 200, 80, .45);
      font-size: 1.1rem;
    }

    .lsb-divider {
      width: 1px;
      height: 32px;
      background: rgba(255, 255, 255, .08);
      flex-shrink: 0;
    }

    /* Shot progress bar */
    .shot-progress {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .sp-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .sp-lbl {
      font-size: .5rem;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(255, 195, 60, .38);
      font-weight: 600;
    }

    .sp-count {
      font-family: 'DM Mono', monospace;
      font-size: .9rem;
      color: #ffc840;
    }

    .sp-count.low {
      color: #ff5030;
    }

    .sp-bar {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, .07);
      border-radius: 3px;
      overflow: hidden;
    }

    .sp-fill {
      height: 100%;
      border-radius: 3px;
      transition: width .2s ease, background .3s;
      background: linear-gradient(90deg, #5a9020, #a0d030);
      will-change: width;
    }

    .sp-fill.low {
      background: linear-gradient(90deg, #8a1010, #e04040);
    }

    /* ═══════════════════════════════════════════
   MATCH TIMER HUD
═══════════════════════════════════════════ */
    .match-timer-box {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(0, 0, 0, .45);
      border: 1px solid rgba(255, 200, 60, .18);
      border-radius: 9px;
      padding: 4px 11px;
      margin-top: 6px;
      transition: border-color .3s;
    }

    .match-timer-box.warning {
      border-color: rgba(255, 80, 40, .5);
      animation: timerPulse .8s ease infinite alternate;
    }

    @keyframes timerPulse {
      from {
        background: rgba(0, 0, 0, .45)
      }

      to {
        background: rgba(120, 20, 10, .25)
      }
    }

    .mt-ico {
      font-size: .85rem;
      line-height: 1;
    }

    .mt-inf {
      display: flex;
      flex-direction: column;
    }

    .mt-lbl {
      font-size: .38rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255, 200, 60, .4);
      font-weight: 600;
      line-height: 1;
      margin-top: 1px;
    }

    .mt-val {
      font-family: 'DM Mono', monospace;
      font-size: .95rem;
      font-weight: 500;
      color: #ffc840;
      line-height: 1;
      text-shadow: 0 0 8px rgba(255, 180, 0, .3);
    }

    .match-timer-box.warning .mt-val {
      color: #ff5030;
    }

    /* ═══════════════════════════════════════════
   DISCIPLINE TABS (under weapon tabs)
═══════════════════════════════════════════ */
    .disc-tabs {
      display: flex;
      width: 100%;
      gap: 6px;
      padding: 10px 0 0;
    }

    .disc-tab {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 9px 6px 10px;
      cursor: pointer;
      background: rgba(255, 255, 255, .02);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 10px;
      transition: background .2s, border-color .2s, box-shadow .2s;
      -webkit-tap-highlight-color: transparent;
    }

    .disc-tab:active {
      opacity: .75;
    }

    .dt-name {
      font-size: .8rem;
      font-weight: 800;
      letter-spacing: .05em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .3);
      transition: color .2s;
      line-height: 1;
    }

    .dt-desc {
      font-size: .44rem;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .15);
      margin-top: 3px;
      font-weight: 600;
    }

    .disc-tab.active {
      background: rgba(110, 170, 40, .14);
      border-color: #6aaa28;
      box-shadow: 0 0 14px rgba(110, 170, 40, .15);
    }

    .disc-tab.active .dt-name {
      color: #c8ee80;
    }

    .disc-tab.active .dt-desc {
      color: rgba(160, 220, 80, .5);
    }

    /* ═══════════════════════════════════════════
   POSITION BAR (3×20)
═══════════════════════════════════════════ */
    .pos-bar {
      display: none;
      /* shown only in 3x20 mode */
      width: 100%;
      flex-shrink: 0;
      padding: 8px 18px 0;
      justify-content: center;
      gap: 6px;
    }

    .pos-bar.visible {
      display: flex;
    }

    .pos-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 8px 4px 9px;
      background: rgba(0, 0, 0, .4);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 10px;
      transition: all .25s;
      position: relative;
      overflow: hidden;
    }

    .pos-item.done {
      background: rgba(50, 120, 20, .12);
      border-color: rgba(100, 180, 40, .3);
    }

    .pos-item.active {
      background: rgba(90, 160, 30, .2);
      border-color: #7aba30;
      box-shadow: 0 0 18px rgba(100, 190, 40, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
    }

    .pos-item::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 10%;
      right: 10%;
      height: 2px;
      background: #8ecf40;
      border-radius: 2px 2px 0 0;
      transform: scaleX(0);
      transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
    }

    .pos-item.active::after {
      transform: scaleX(1);
    }

    .pi-ico {
      font-size: 1.2rem;
      line-height: 1;
    }

    .pi-name {
      font-size: .62rem;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      transition: color .2s;
    }

    .pos-item.active .pi-name {
      color: #c8ee80;
    }

    .pos-item.done .pi-name {
      color: rgba(140, 200, 80, .5);
    }

    .pi-shots {
      font-family: 'DM Mono', monospace;
      font-size: .7rem;
      color: rgba(255, 255, 255, .2);
      transition: color .2s;
    }

    .pos-item.active .pi-shots {
      color: rgba(200, 240, 120, .6);
    }

    .pos-item.done .pi-shots {
      color: rgba(100, 180, 60, .4);
    }

    .pi-done-check {
      position: absolute;
      top: 5px;
      right: 6px;
      font-size: .65rem;
      opacity: 0;
      transition: opacity .2s;
    }

    .pos-item.done .pi-done-check {
      opacity: .7;
    }

    @keyframes posTransition {
      0% {
        transform: scale(1);
      }

      40% {
        transform: scale(1.04);
      }

      100% {
        transform: scale(1);
      }
    }

    .pos-item.transition {
      animation: posTransition .4s ease;
    }

    /* ═══════════════════════════════════════════
   SHOT LOG – scrollable, grouped
═══════════════════════════════════════════ */
    .shot-log-wrap {
      width: 100%;
      max-height: 88px;
      /* ~3 rows of pills */
      overflow-y: auto;
      overflow-x: hidden;
    }

    .shot-log-wrap::-webkit-scrollbar {
      width: 2px;
    }

    .shot-log-wrap::-webkit-scrollbar-thumb {
      background: rgba(140, 200, 60, .2);
      border-radius: 2px;
    }

    .sl-group {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 3px;
      margin-bottom: 4px;
    }

    .sl-group-hd {
      font-size: .44rem;
      letter-spacing: .24em;
      text-transform: uppercase;
      color: rgba(140, 200, 60, .35);
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0 1px;
    }

    .sl-group-hd::after {
      content: '';
      flex: 1;
      height: 1px;
      background: rgba(140, 200, 60, .12);
    }

    .sl-group-pills {
      display: flex;
      gap: 3px;
      flex-wrap: wrap;
    }

    /* legacy flat log (non-3x20) */
    .shot-log {
      width: 100%;
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      min-height: 22px;
    }

    .sl-pill {
      font-family: 'DM Mono', monospace;
      font-size: .65rem;
      font-weight: 500;
      padding: 2px 6px;
      border-radius: 4px;
      border: 1px solid;
      animation: fadeUp .2s ease forwards;
    }

    .sl-pill.x {
      color: #ffd040;
      border-color: rgba(255, 208, 64, .4);
      background: rgba(255, 208, 64, .1);
    }

    .sl-pill.hi {
      color: #a0e060;
      border-color: rgba(160, 224, 96, .3);
      background: rgba(100, 180, 40, .1);
    }

    .sl-pill.mid {
      color: #70aaf0;
      border-color: rgba(112, 170, 240, .25);
      background: rgba(70, 120, 200, .1);
    }

    .sl-pill.lo {
      color: rgba(255, 255, 255, .4);
      border-color: rgba(255, 255, 255, .1);
      background: rgba(255, 255, 255, .04);
    }

    .sl-pill.miss {
      color: rgba(255, 100, 80, .5);
      border-color: rgba(255, 80, 60, .2);
      background: rgba(255, 50, 30, .06);
    }

    /* Last shot info box */
    .last-shot-box {
      width: 100%;
      padding: 9px 13px;
      background: rgba(0, 0, 0, .38);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 10px;
    }

    .ls-txt {
      font-size: .86rem;
      color: rgba(180, 210, 240, .5);
      line-height: 1.4;
    }

    .ls-txt b {
      color: rgba(200, 225, 255, .75);
      font-weight: 700;
    }

    /* ═══════════════════════════════════════════
   ENTRY SCREEN
═══════════════════════════════════════════ */
    #screenEntry {
      justify-content: flex-start;
    }

    #screenEntry .content {
      padding: 14px 18px;
      gap: 13px;
    }

    .bot-result {
      width: 100%;
      background: linear-gradient(135deg, rgba(40, 5, 5, .7), rgba(25, 0, 0, .8));
      border: 1px solid rgba(180, 50, 40, .3);
      border-radius: 14px;
      padding: 16px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }

    .bot-result::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(180, 40, 30, .12) 0%, transparent 70%);
      pointer-events: none;
    }

    .br-lbl {
      font-size: .55rem;
      letter-spacing: .3em;
      text-transform: uppercase;
      color: rgba(240, 110, 90, .45);
      font-weight: 600;
      margin-bottom: 6px;
    }

    .br-pts {
      font-family: 'Bebas Neue', cursive;
      font-size: 3.2rem;
      color: #f08070;
      line-height: 1;
      text-shadow: 0 0 24px rgba(240, 100, 80, .35);
    }

    .br-sub {
      font-size: .78rem;
      color: rgba(255, 255, 255, .28);
      margin-top: 4px;
      font-weight: 400;
    }

    .entry-card2 {
      width: 100%;
      background: rgba(0, 0, 0, .48);
      border: 1px solid rgba(110, 170, 40, .2);
      border-radius: 14px;
      padding: 15px;
    }

    .ec-lbl {
      font-size: .55rem;
      letter-spacing: .28em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .25);
      font-weight: 600;
      margin-bottom: 12px;
    }

    .ec-row {
      display: flex;
      gap: 8px;
      align-items: stretch;
    }

    .score-inp {
      flex: 1;
      padding: 13px 8px;
      font-family: 'DM Mono', monospace;
      font-size: 1.4rem;
      font-weight: 500;
      letter-spacing: .05em;
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(110, 170, 40, .28);
      border-radius: 9px;
      color: #b8e870;
      outline: none;
      text-align: center;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: textfield;
      transition: border-color .2s, box-shadow .2s;
    }

    .score-inp:focus {
      border-color: #7ab030;
      box-shadow: 0 0 14px rgba(120, 180, 40, .18);
    }

    .score-inp.inp-error {
      border-color: #e84040;
      box-shadow: 0 0 14px rgba(232, 64, 64, .35);
      animation: shake .25s ease;
    }

    .score-inp.inp-ok {
      border-color: #7ab030;
      box-shadow: 0 0 10px rgba(120, 180, 40, .3);
    }

    @keyframes shake {

      0%,
      100% {
        transform: translateX(0);
      }

      25% {
        transform: translateX(-5px);
      }

      75% {
        transform: translateX(5px);
      }
    }

    .inp-hint {
      font-size: .62rem;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: #e84040;
      margin-top: 5px;
      min-height: 1em;
      text-align: center;
      transition: opacity .2s;
    }

    .score-inp::placeholder {
      color: rgba(255, 255, 255, .15);
    }

    .btn-calc {
      padding: 13px 16px;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: .9rem;
      letter-spacing: .05em;
      background: linear-gradient(135deg, #5a9020, #3a6010);
      color: #d8f8a0;
      border: none;
      border-radius: 9px;
      cursor: pointer;
      box-shadow: 0 3px 0 #1a3008;
      transition: transform .1s, box-shadow .1s;
      white-space: nowrap;
    }

    .btn-calc:active {
      opacity: 0.85;
      box-shadow: 0 2px 0 #1a3008;
    }

    /* Foto-Button (Wettkampf-Foto vergleichen) — immer sichtbar auf Ergebnis-Screen */
    .ic-go-upload-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      max-width: 320px;
      margin: 8px auto 4px;
      padding: 11px 18px;
      background: rgba(120, 180, 40, .1);
      border: 1px solid rgba(120, 180, 40, .25);
      border-radius: 12px;
      color: rgba(180, 230, 80, .8);
      font-family: 'Outfit', sans-serif;
      font-size: .78rem;
      font-weight: 600;
      letter-spacing: .06em;
      cursor: pointer;
      transition: all .2s ease;
    }

    .ic-go-upload-btn:hover {
      background: rgba(120, 180, 40, .16);
      border-color: rgba(120, 180, 40, .4);
      color: #a0e060;
    }

    .ic-go-upload-btn:active {
      background: rgba(120, 180, 40, .22);
    }

    .ic-go-upload-ico {
      font-size: 1.1rem;
    }

    /* Auto-calc Ganze hint */
    .auto-int {
      margin-top: 7px;
      font-size: .78rem;
      color: rgba(200, 255, 150, .35);
      font-family: 'DM Mono', monospace;
      letter-spacing: .04em;
      transition: color .2s;
    }

    .auto-int.active {
      color: rgba(200, 255, 150, .65);
    }

    .auto-int span {
      font-weight: 700;
      color: #a0e060;
    }

    .divider {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .divider-line {
      flex: 1;
      height: 1px;
      background: rgba(255, 255, 255, .08);
    }

    .divider-txt {
      font-size: .58rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .18);
      font-weight: 600;
    }

    .quick-pair {
      width: 100%;
      display: flex;
      gap: 9px;
    }

    .btn-win {
      flex: 1;
      padding: 16px 8px;
      font-family: 'Outfit', sans-serif;
      font-size: 1rem;
      font-weight: 800;
      letter-spacing: .04em;
      color: #0a1206;
      background: linear-gradient(175deg, #90d838, #5a9c18);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 4px 0 #245008, 0 6px 18px rgba(100, 190, 30, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
      transition: transform .1s, box-shadow .1s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .btn-win:active {
      opacity: 0.9;
      box-shadow: 0 2px 0 #245008;
    }

    .btn-lose {
      flex: 1;
      padding: 16px 8px;
      font-family: 'Outfit', sans-serif;
      font-size: 1rem;
      font-weight: 800;
      letter-spacing: .04em;
      color: #fff0ee;
      background: linear-gradient(175deg, #982820, #621410);
      border: none;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 4px 0 #240808, 0 6px 18px rgba(160, 35, 25, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
      transition: transform .1s, box-shadow .1s;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .btn-lose:active {
      opacity: 0.9;
      box-shadow: 0 2px 0 #240808;
    }

    .qb-ico {
      font-size: 1.5rem;
      line-height: 1;
    }

    .qb-main {
      font-size: 1rem;
      font-weight: 800;
      letter-spacing: .03em;
    }

    .qb-sub {
      font-size: .62rem;
      opacity: .5;
      font-weight: 500;
    }

    /* ═══════════════════════════════════════════
   GAME OVER
═══════════════════════════════════════════ */
    #screenOver {
      justify-content: center;
      gap: 16px;
      text-align: center;
      padding: 28px 22px;
      overflow-y: auto;
    }

    .go-emoji {
      font-size: 4.5rem;
      line-height: 1;
      margin-bottom: 10px;
      filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
      animation: emoji-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes emoji-pop {
      0% { transform: scale(0.5) rotate(-15deg); opacity: 0; }
      100% { transform: scale(1) rotate(0); opacity: 1; }
    }

    .go-title {
      font-family: 'Bebas Neue', cursive;
      font-size: clamp(2.8rem, 12vw, 4.5rem);
      letter-spacing: .1em;
      line-height: 1;
    }

    .go-title.win {
      color: #90d838;
      text-shadow: 0 0 32px rgba(144, 216, 56, .35);
    }

    .go-title.lose {
      color: #f06050;
      text-shadow: 0 0 32px rgba(240, 96, 80, .35);
    }

    .go-title.draw {
      color: #f0c838;
      text-shadow: 0 0 32px rgba(240, 200, 56, .35);
    }

    .go-sub {
      color: rgba(255, 255, 255, .4);
      font-size: 1rem;
      max-width: 280px;
      line-height: 1.45;
      font-weight: 400;
    }

    .go-scores {
      display: flex;
      align-items: stretch;
      gap: 0;
      background: rgba(0, 0, 0, .48);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 16px;
      overflow: hidden;
    }

    .gs-block {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 16px 28px;
    }

    .gs-block:first-child {
      border-right: 1px solid rgba(255, 255, 255, .07);
    }

    .gs-who {
      font-size: .52rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      font-weight: 600;
    }

    .gs-num {
      font-family: 'DM Mono', monospace;
      font-size: 2.8rem;
      font-weight: 500;
      line-height: 1;
    }

    .gs-num.you {
      color: #b0e870;
    }

    .gs-num.bot {
      color: #f08070;
    }

    .gs-unit {
      font-size: .6rem;
      color: rgba(255, 255, 255, .25);
      letter-spacing: .15em;
      text-transform: uppercase;
      font-weight: 500;
    }

    .gs-sep {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      font-family: 'Bebas Neue', cursive;
      font-size: 1.6rem;
      color: rgba(255, 255, 255, .12);
      background: rgba(0, 0, 0, .3);
    }

    .go-reason {
      font-size: .62rem;
      color: rgba(255, 255, 255, .2);
      letter-spacing: .18em;
      text-transform: uppercase;
      font-weight: 500;
    }

    .go-margin {
      font-size: .82rem;
      font-weight: 600;
      letter-spacing: .04em;
      padding: 5px 16px;
      border-radius: 20px;
      border: 1px solid;
    }

    .go-margin.win {
      color: #90d838;
      border-color: rgba(144, 216, 56, .3);
      background: rgba(100, 200, 40, .08);
    }

    .go-margin.lose {
      color: #f06050;
      border-color: rgba(240, 96, 80, .3);
      background: rgba(200, 60, 40, .08);
    }

    .go-margin.draw {
      color: #f0c838;
      border-color: rgba(240, 200, 56, .3);
      background: rgba(200, 160, 40, .08);
    }

    /* ── Trefferbild-Analyse ─────────────────────────────────────── */
    .analysis-box {
      width: 100%;
      max-width: 360px;
      margin: 10px auto 0;
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(255, 255, 255, .09);
      border-radius: 14px;
      padding: 13px 16px 14px;
      text-align: left;
      position: relative;
      overflow: hidden;
    }

    .analysis-box::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 14px;
      opacity: .07;
      pointer-events: none;
    }

    .analysis-box.ab-compact::before {
      background: #7ab030;
    }

    .analysis-box.ab-horiz::before {
      background: #f0c838;
    }

    .analysis-box.ab-vert::before {
      background: #60b8f0;
    }

    .analysis-box.ab-wide::before {
      background: #f08050;
    }

    .analysis-box.ab-neutral::before {
      background: #aaaaaa;
    }

    .ab-header {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-bottom: 7px;
    }

    .ab-icon {
      font-size: 1.1rem;
      line-height: 1;
    }

    .ab-label {
      font-size: .52rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .35);
      font-weight: 600;
    }

    .ab-shape {
      font-size: .78rem;
      font-weight: 700;
      letter-spacing: .04em;
      margin-bottom: 4px;
    }

    .analysis-box.ab-compact .ab-shape {
      color: #90d838;
    }

    .analysis-box.ab-horiz .ab-shape {
      color: #f0c838;
    }

    .analysis-box.ab-vert .ab-shape {
      color: #60b8f0;
    }

    .analysis-box.ab-wide .ab-shape {
      color: #f08050;
    }

    .analysis-box.ab-neutral .ab-shape {
      color: rgba(255, 255, 255, .55);
    }

    .ab-tip {
      font-size: .68rem;
      color: rgba(255, 255, 255, .55);
      line-height: 1.5;
    }

    .ab-tip b {
      color: rgba(255, 255, 255, .82);
      font-weight: 600;
    }

    .ab-stats {
      display: flex;
      gap: 10px;
      margin-top: 9px;
      padding-top: 9px;
      border-top: 1px solid rgba(255, 255, 255, .07);
    }

    .ab-stat {
      flex: 1;
      text-align: center;
    }

    .ab-stat-val {
      font-family: 'DM Mono', monospace;
      font-size: .9rem;
      font-weight: 700;
      color: rgba(255, 255, 255, .75);
    }

    .ab-stat-lbl {
      font-size: .48rem;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      margin-top: 1px;
    }

    /* Diopter-Korrektur-Badge im Header */
    .ab-diopter-badge {
      margin-left: auto;
      font-size: .5rem;
      letter-spacing: .1em;
      text-transform: uppercase;
      background: rgba(240, 180, 40, .15);
      border: 1px solid rgba(240, 180, 40, .35);
      color: #f0c838;
      border-radius: 20px;
      padding: 2px 8px;
      font-weight: 600;
      white-space: nowrap;
    }

    /* Diopter-Korrektur-Block */
    .ab-diopter {
      margin-top: 8px;
      padding: 8px 10px;
      background: rgba(240, 180, 40, .07);
      border: 1px solid rgba(240, 180, 40, .2);
      border-radius: 8px;
    }

    .ab-diopter-line {
      font-size: .72rem;
      color: #f0c838;
      font-weight: 600;
      letter-spacing: .03em;
      line-height: 1.7;
    }

    .ab-diopter-line b {
      color: #ffd040;
    }

    /* Stabilitäts-Hinweis */
    .ab-stability {
      margin-top: 6px;
      font-size: .68rem;
      color: rgba(240, 120, 60, .85);
      line-height: 1.45;
      padding: 5px 8px;
      background: rgba(240, 80, 40, .07);
      border-left: 2px solid rgba(240, 100, 50, .4);
      border-radius: 0 6px 6px 0;
    }

    .ab-stability b {
      color: #f08050;
    }

    /* 3×20 Stellungs-Grid */
    .ab-section-title {
      font-size: .52rem;
      letter-spacing: .24em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .28);
      font-weight: 600;
      text-align: center;
      margin: 10px 0 8px;
    }

    .ab-pos-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
    }

    .ab-pos-box {
      max-width: 100%;
    }

    /* Dual score display */
    .dual-score {
      display: flex;
      align-items: baseline;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .ds-main {
      font-family: 'DM Mono', monospace;
      font-size: 2.8rem;
      font-weight: 500;
      line-height: 1;
    }

    .ds-sep {
      font-size: 1rem;
      color: rgba(255, 255, 255, .2);
      font-weight: 300;
    }

    .ds-int {
      font-family: 'DM Mono', monospace;
      font-size: 1.6rem;
      font-weight: 400;
      color: rgba(255, 255, 255, .38);
      line-height: 1;
    }

    .ds-int-lbl {
      font-size: .5rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .22);
      display: block;
      text-align: center;
      margin-top: 1px;
    }

    .ds-dec-lbl {
      font-size: .5rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      display: block;
      text-align: center;
      margin-top: 1px;
    }

    .dual-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
    }

    .dual-col {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    /* ═══════════════════════════════════════════
   FX
═══════════════════════════════════════════ */
    #muzzleFlash {
      position: fixed;
      inset: 0;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      /* Gradient bis ganz unten deckend, Rand gleicht Body-Hintergrund (#0e1208) — kein hellgrüner Streifen */
      background: radial-gradient(ellipse 150% 150% at 50% 40%, rgba(255, 240, 120, .9) 0%, rgba(255, 120, 0, .25) 40%, rgba(14, 18, 8, .6) 75%, #0e1208 100%);
      z-index: 999;
      pointer-events: none;
      opacity: 0;
      will-change: opacity;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }

    @keyframes camShake {
      0% {
        transform: translate(0, 0) rotate(0)
      }

      12% {
        transform: translate(-5px, 4px) rotate(-.6deg)
      }

      30% {
        transform: translate(5px, -3px) rotate(.5deg)
      }

      52% {
        transform: translate(-3px, 4px) rotate(-.35deg)
      }

      78% {
        transform: translate(3px, -1px) rotate(.2deg)
      }

      100% {
        transform: translate(0, 0) rotate(0)
      }
    }

    .shaking {
      animation: camShake .32s ease;
      will-change: transform;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(16px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .fade-up {
      animation: fadeUp .38s ease forwards;
    }

    @keyframes popIn {
      from {
        opacity: 0;
        transform: scale(.88)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    .pop-in {
      animation: popIn .3s cubic-bezier(.34, 1.56, .64, 1) forwards;
    }

    .x-hit {
      color: #ffd040;
      text-shadow: 0 0 8px rgba(255, 210, 0, .5);
    }

    /* streak new badge */
    .streak-new {
      display: inline-block;
      font-size: .5rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      background: rgba(180, 90, 255, .2);
      border: 1px solid rgba(180, 90, 255, .4);
      border-radius: 3px;
      padding: 1px 6px;
      color: #e0b0ff;
      margin-left: 6px;
      animation: fadeUp .4s ease forwards;
    }

    /* ═══════════════════════════════════════════
   SCHÜTZENPASS / XP SYSTEM
═══════════════════════════════════════════ */
    .schuetzenpass {
      width: 100%;
      padding: 10px 14px 12px;
      background: linear-gradient(135deg, rgba(180, 130, 10, .12), rgba(100, 70, 5, .1));
      border: 1px solid rgba(200, 160, 20, .22);
      border-radius: 12px;
      margin: 8px 0 4px;
      position: relative;
      overflow: hidden;
    }

    .schuetzenpass::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(220, 180, 40, .4) 50%, transparent);
    }

    .sp-hd {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .sp-rank-lbl {
      font-size: .5rem;
      letter-spacing: .28em;
      text-transform: uppercase;
      color: rgba(200, 160, 40, .5);
      font-weight: 600;
    }

    .sp-rank-name {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.1rem;
      letter-spacing: .12em;
      color: #f0c840;
      text-shadow: 0 0 12px rgba(240, 200, 64, .3);
    }

    .sp-xp-info {
      font-family: 'DM Mono', monospace;
      font-size: .72rem;
      color: rgba(200, 160, 60, .6);
    }

    .sp-progress-wrap {
      width: 100%;
      height: 8px;
      background: rgba(0, 0, 0, .4);
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid rgba(200, 160, 20, .15);
    }

    .sp-progress-fill {
      height: 100%;
      border-radius: 4px;
      background: linear-gradient(90deg, #8a6010, #f0c840, #ffe080);
      transition: width .5s cubic-bezier(.34, 1.56, .64, 1);
      position: relative;
    }

    .sp-progress-fill::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent 70%, rgba(255, 255, 255, .25));
    }

    .sp-rank-row {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
    }

    .sp-rank-cur {
      font-size: .48rem;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: rgba(200, 160, 40, .45);
    }

    .sp-rank-next {
      font-size: .48rem;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: rgba(200, 160, 40, .25);
    }

    /* XP float animation */
    @keyframes xpFloat {
      0% {
        opacity: 0;
        transform: translateY(0) scale(.8);
      }

      20% {
        opacity: 1;
        transform: translateY(-8px) scale(1.1);
      }

      80% {
        opacity: 1;
        transform: translateY(-32px) scale(1);
      }

      100% {
        opacity: 0;
        transform: translateY(-44px) scale(.9);
      }
    }

    .xp-pop {
      position: fixed;
      pointer-events: none;
      z-index: 9999;
      font-family: 'Bebas Neue', cursive;
      font-size: 1.6rem;
      letter-spacing: .1em;
      color: #ffd040;
      text-shadow: 0 0 12px rgba(255, 200, 0, .8), 0 2px 4px rgba(0, 0, 0, .6);
      animation: xpFloat 1.6s ease forwards;
    }

    /* ═══════════════════════════════════════════
   LEADERBOARD SCREEN
═══════════════════════════════════════════ */
    #screenLeaderboard {
      justify-content: flex-start;
    }

    #screenLeaderboard .hdr {
      padding-bottom: 10px;
    }

    .lb-list {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .lb-xp {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.1rem;
      color: #f0c840;
      text-shadow: 0 0 8px rgba(240, 200, 64, .25);
      flex-shrink: 0;
      text-align: right;
    }

    .lb-xp-lbl {
      font-size: .42rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(240, 200, 64, .3);
      display: block;
    }

    .lb-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      background: rgba(0, 0, 0, .4);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 10px;
      transition: border-color .2s;
    }

    .lb-row.top1 {
      border-color: rgba(240, 200, 40, .35);
      background: linear-gradient(135deg, rgba(80, 55, 0, .4), rgba(40, 25, 0, .3));
    }

    .lb-row.top2 {
      border-color: rgba(190, 190, 190, .2);
      background: rgba(40, 40, 40, .3);
    }

    .lb-row.top3 {
      border-color: rgba(180, 100, 40, .2);
      background: rgba(50, 25, 10, .3);
    }

    .lb-pos {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.4rem;
      color: rgba(255, 255, 255, .2);
      width: 24px;
      text-align: center;
      flex-shrink: 0;
    }

    .lb-row.top1 .lb-pos {
      color: #f0c840;
    }

    .lb-row.top2 .lb-pos {
      color: #c0c0c0;
    }

    .lb-row.top3 .lb-pos {
      color: #c87840;
    }

    .lb-info {
      flex: 1;
      min-width: 0;
    }

    .lb-name {
      font-size: .9rem;
      font-weight: 700;
      color: rgba(255, 255, 255, .8);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .lb-meta {
      font-size: .6rem;
      color: rgba(255, 255, 255, .25);
      letter-spacing: .08em;
      margin-top: 1px;
    }

    .lb-streak {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.5rem;
      color: #c880ff;
      text-shadow: 0 0 10px rgba(180, 90, 255, .3);
      flex-shrink: 0;
    }

    .lb-streak-lbl {
      font-size: .42rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(190, 140, 255, .3);
      text-align: right;
      display: block;
    }

    .lb-empty {
      text-align: center;
      padding: 40px 20px;
      color: rgba(255, 255, 255, .2);
      font-size: .85rem;
    }

    .lb-loading {
      text-align: center;
      padding: 30px;
      color: rgba(255, 255, 255, .25);
      font-size: .8rem;
      letter-spacing: .1em;
    }

    .lb-submit-row {
      width: 100%;
      display: flex;
      gap: 8px;
      margin-bottom: 4px;
    }

    .lb-name-inp {
      flex: 1;
      padding: 10px 12px;
      font-family: 'Outfit', sans-serif;
      font-size: .9rem;
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(140, 200, 60, .2);
      border-radius: 9px;
      color: #c8ee80;
      outline: none;
    }

    .lb-name-inp::placeholder {
      color: rgba(255, 255, 255, .15);
    }

    .lb-name-inp:focus {
      border-color: #6aaa28;
    }

    .btn-lb-submit {
      padding: 10px 14px;
      font-weight: 700;
      font-size: .85rem;
      background: linear-gradient(135deg, #5a9020, #3a6010);
      color: #d8f8a0;
      border: none;
      border-radius: 9px;
      cursor: pointer;
      box-shadow: 0 3px 0 #1a3008;
      transition: transform .1s, box-shadow .1s;
      white-space: nowrap;
    }

    .btn-lb-submit:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #1a3008;
    }

    .lb-my-best {
      width: 100%;
      padding: 12px 16px;
      background: rgba(170, 90, 255, .08);
      border: 1px solid rgba(170, 90, 255, .18);
      border-radius: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .lb-my-lbl {
      font-size: .52rem;
      letter-spacing: .22em;
      text-transform: uppercase;
      color: rgba(190, 140, 255, .4);
      font-weight: 600;
    }

    .lb-my-val {
      font-family: 'Bebas Neue', cursive;
      font-size: 1.5rem;
      color: #c880ff;
    }

    /* ═══════════════════════════════════════════
   WELCOME MODAL
═══════════════════════════════════════════ */
    #welcomeOverlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 10000;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease;
    }

    #welcomeOverlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .welcome-card {
      background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(15, 15, 15, 0.95));
      border: 1px solid rgba(140, 200, 60, 0.3);
      border-radius: 20px;
      padding: 30px 24px;
      width: 100%;
      max-width: 360px;
      text-align: center;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
      transform: translateY(30px) scale(0.95);
      transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    #welcomeOverlay.active .welcome-card {
      transform: translateY(0) scale(1);
    }

    .welcome-icon {
      font-size: 3.5rem;
      margin-bottom: 16px;
      animation: float 3s ease-in-out infinite;
    }

    .welcome-title {
      font-family: 'Bebas Neue', cursive;
      font-size: 2.5rem;
      color: #fff;
      margin-bottom: 8px;
      letter-spacing: 0.05em;
    }

    .welcome-sub {
      color: rgba(255, 255, 255, 0.6);
      font-size: 0.95rem;
      margin-bottom: 24px;
      line-height: 1.4;
    }

    .welcome-inp {
      width: 100%;
      padding: 16px;
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(140, 200, 60, 0.4);
      border-radius: 12px;
      color: #c8ee80;
      font-family: 'Outfit', sans-serif;
      font-size: 1.2rem;
      font-weight: 500;
      text-align: center;
      outline: none;
      transition: all 0.2s;
      margin-bottom: 20px;
    }

    .welcome-inp:focus {
      border-color: #8cc83c;
      box-shadow: 0 0 15px rgba(140, 200, 60, 0.2);
    }

    .welcome-inp::placeholder {
      color: rgba(255, 255, 255, 0.2);
    }

    .welcome-btn {
      width: 100%;
      padding: 18px;
      background: linear-gradient(135deg, #7ab030, #4a7515);
      color: #d8f8a0;
      border: none;
      border-radius: 12px;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 1.1rem;
      letter-spacing: 0.1em;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(100, 150, 40, 0.3);
      transition: transform 0.1s, box-shadow 0.1s, filter 0.2s;
    }

    .welcome-btn:active {
      transform: translateY(2px);
      box-shadow: 0 2px 8px rgba(100, 150, 40, 0.3);
    }

    /* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════ */
    @media (max-width: 380px) {
      .ps-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
      }

      .sun-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
      }

      .sun-icon {
        font-size: 1.3rem;
      }

      .sun-name {
        font-size: .48rem;
      }

      .ps-sc-val {
        font-size: 1.35rem;
      }

      .ps-hero {
        padding: 10px 14px 8px;
        gap: 10px;
      }

      .ps-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
      }

      .ps-name {
        font-size: 1.3rem;
      }

      .ps-xp-wrap {
        padding: 0 14px 10px;
      }

      .ps-panel {
        padding: 10px 12px 20px;
        gap: 8px;
      }
    }

    @media (max-width: 320px) {
      .sun-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .ps-tab {
        font-size: .55rem;
        padding: 8px 2px 9px;
      }
    }

    /* Safe area for notch/home indicator */
    .profile-sheet {
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Touch feedback */
    .ps-tab:active,
    .sun-card:active,
    .ps-stat-card:active {
      opacity: .7;
    }

    /* Prevent text selection on interactive elements */
    .ps-tab,
    .sun-card,
    .ps-close,
    .profile-sheet-handle {
      user-select: none;
      -webkit-user-select: none;
    }

    /* Smooth scroll in body */
    .ps-body {
      scroll-behavior: smooth;
    }

    /* Larger touch targets on mobile */
    @media (hover: none) and (pointer: coarse) {
      .ps-tab {
        padding: 12px 4px 13px;
      }

      .ps-close {
        width: 36px;
        height: 36px;
      }
    }

    /* XP Pop-up Animation */
    .xp-pop {
      position: fixed;
      font-family: 'Bebas Neue', cursive;
      font-size: 1.8rem;
      color: #ffd700;
      text-shadow: 0 0 15px rgba(255, 215, 0, .6);
      z-index: 2000;
      pointer-events: none;
      animation: xpFlyUp 1.7s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    @keyframes xpFlyUp {
      0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
      }

      20% {
        opacity: 1;
        transform: translateY(-30px) scale(1.1);
      }

      100% {
        transform: translateY(-120px) scale(1);
        opacity: 0;
      }
    }

    /* Leaderboard link button in pass */
    .btn-lb-link {
      display: inline-block;
      margin-top: 5px;
      background: rgba(190, 140, 255, .1);
      border: 1px solid rgba(190, 140, 255, .2);
      border-radius: 4px;
      cursor: pointer;
      font-size: .62rem;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: rgba(190, 140, 255, .6);
      padding: 3px 10px;
      transition: all .2s;
    }

    .btn-lb-link:hover {
      background: rgba(190, 140, 255, .18);
      border-color: rgba(190, 140, 255, .4);
    }

  /* ─── SHARE BUTTON ─────────────────────────────── */
  .btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 320px;
    margin: 10px auto 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a3a60, #0d2040);
    border: 1px solid rgba(100, 160, 255, 0.35);
    border-radius: 12px;
    color: rgba(140, 190, 255, 0.9);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    z-index: 1;
  }
  .btn-share:hover {
    background: linear-gradient(135deg, #1e4a80, #112860);
    border-color: rgba(100, 160, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(60, 120, 255, 0.25);
  }
  .btn-share:active { transform: translateY(0); }

  /* ─── SHARE OVERLAY ────────────────────────────── */
  .share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .share-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
  .share-modal {
    background: linear-gradient(160deg, #0f1f0a, #0a1506);
    border: 1px solid rgba(122, 176, 48, 0.2);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 36px;
    width: 100%;
    max-width: 440px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .share-overlay.active .share-modal {
    transform: translateY(0);
  }

  /* ─── SHARE CARD (das was visuell geteilt wird) ─ */
  .share-card {
    background: linear-gradient(145deg, #0c1e06, #0a1a08);
    border: 1px solid rgba(122, 176, 48, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
  }
  .share-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse at 50% 0%,
      rgba(122, 176, 48, 0.08),
      transparent 70%
    );
    pointer-events: none;
  }
  .sc-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }
  .sc-brand-icon { font-size: 1.2rem; }
  .sc-brand-name {
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: rgba(122, 176, 48, 0.7);
  }
  .sc-divider {
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(122, 176, 48, 0.3),
      transparent
    );
    margin-bottom: 14px;
  }
  .sc-result-emoji {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1;
  }
  .sc-result-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 16px;
  }
  .sc-result-title.win  { color: #a0e060; }
  .sc-result-title.lose { color: #f06050; }
  .sc-result-title.draw { color: #c0c060; }

  .sc-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
  }
  .sc-score-block { text-align: center; min-width: 80px; }
  .sc-who {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .sc-pts {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.2rem;
    line-height: 1;
  }
  .sc-pts.you  { color: #a0e060; }
  .sc-pts.bot  { color: #f08070; }
  .sc-unit {
    font-family: 'Outfit', sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-top: 2px;
  }
  .sc-vs {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    padding-bottom: 24px;
  }
  .sc-margin {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.5);
  }
  .sc-meta {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(122, 176, 48, 0.4);
    margin-bottom: 8px;
  }
  .sc-url {
    text-align: center;
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    color: rgba(122, 176, 48, 0.3);
    letter-spacing: 0.08em;
  }

  /* ─── SHARE ACTIONS ────────────────────────────── */
  .share-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
  }
  .btn-share-go {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #2a5010, #1a3808);
    border: 1px solid rgba(122, 176, 48, 0.5);
    border-radius: 12px;
    color: #a0e060;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.18s;
  }
  .btn-share-go:hover {
    background: linear-gradient(135deg, #355e14, #234a0a);
    transform: translateY(-1px);
  }
  .btn-share-close {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.18s;
  }
  .btn-share-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
  }
  .share-copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .share-copy-inp {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
  }
  .share-copy-btn {
    padding: 10px 14px;
    background: rgba(122, 176, 48, 0.15);
    border: 1px solid rgba(122, 176, 48, 0.3);
    border-radius: 8px;
    color: rgba(122, 176, 48, 0.8);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  /* ─── DAILY CHALLENGE ────────────────────────────── */
  .daily-challenge-card {
    background: linear-gradient(145deg, rgba(30, 45, 20, 0.95), rgba(20, 30, 15, 0.95));
    border: 1px solid rgba(122, 176, 48, 0.3);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
  }

  .daily-challenge-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7ab030, transparent);
    opacity: 0.7;
  }

  .dc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(122, 176, 48, 0.15);
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .dc-title {
    color: #a0e060;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .dc-streak {
    background: rgba(255, 150, 50, 0.15);
    border: 1px solid rgba(255, 150, 50, 0.3);
    color: #ff9632;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .dc-body {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .dc-body.completed .dc-text {
    opacity: 0.8;
  }

  .dc-status-icon {
    font-size: 2rem;
    background: rgba(122, 176, 48, 0.1);
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #8ecf40;
    box-shadow: 0 0 15px rgba(122, 176, 48, 0.2);
  }

  .dc-text {
    flex: 1;
  }

  .dc-desc {
    color: #e8e8e0;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  .dc-reward-text {
    color: rgba(200, 200, 190, 0.6);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .dc-progress-wrapper {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .dc-circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
  }

  .dc-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2.5;
  }

  .dc-circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke: #7ab030;
    transition: stroke-dasharray 0.8s ease-out;
  }

  .dc-percentage {
    fill: #a0e060;
    font-family: 'DM Mono', monospace;
    font-size: 0.4rem;
    font-weight: 600;
    text-anchor: middle;
  }

  .daily-completion-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(20, 35, 10, 0.95), rgba(10, 20, 5, 0.95));
    border: 1px solid #7ab030;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(122, 176, 48, 0.3);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
  }

  .dcb-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 200, 50, 0.5));
  }

  .dcb-content {
    flex: 1;
  }

  .dcb-title {
    color: #8ecf40;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(140, 200, 60, 0.4);
  }

  .dcb-sub {
    color: #e8e8e0;
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 8px;
    opacity: 0.9;
  }

  .dcb-rewards {
    color: #ffc840;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'DM Mono', monospace;
  }

  .dcb-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
  }
/* Toolboxes Animation overlay */
.toolbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 0.4s ease;
}

.toolbox-container {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center; justify-content: center;
  flex-direction: column;
}

.toolbox-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  z-index: 2;
  animation: toolbox-shake 1.5s cubic-bezier(.36,.07,.19,.97) both, scale-up 0.5s 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.toolbox-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  animation: glow-pop 0.5s 1.5s forwards;
}

.toolbox-container.wood .toolbox-glow {
  box-shadow: 0 0 150px 80px rgba(180, 100, 30, 0.7);
}

.toolbox-open-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  margin-top: 20px;
  position: absolute;
  bottom: -40px;
  opacity: 0;
  transform: translateY(20px);
  animation: text-pop 0.5s 1.5s forwards;
}

@keyframes toolbox-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) rotate(-3deg); }
  20%, 40%, 60%, 80% { transform: translateX(5px) rotate(3deg); }
}

@keyframes scale-up {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.2); }
}

@keyframes glow-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes text-pop {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Modifizierte Daily Challenge List */
.dc-body.mini {
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.dc-list .dc-body.mini:first-child {
  border-top: none;
}

/* Duolingo Style Quests */
.duo-quests-card {
  background: #18232c;
  border: 2px solid #28343e;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.duo-quest-row {
  padding: 16px 20px;
  border-bottom: 2px solid #28343e;
}

.duo-quest-row.no-border {
  border-bottom: none;
}

.duo-quest-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.duo-quest-progress-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.duo-quest-bar-bg {
  flex: 1;
  background: #37464f;
  height: 24px;
  border-radius: 12px;
  position: relative;
  margin-right: 15px; /* space for chest */
}

.duo-quest-bar-fill {
  background: #1cb0f6;
  height: 100%;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.15);
}

.duo-quest-bar-text {
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  z-index: 2;
  white-space: nowrap;
}

.duo-quest-bar-text.empty {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.5);
}

.duo-quest-chest {
  width: 45px;
  height: 45px;
  position: absolute;
  right: -10px;
  top: -10px;
}

.duo-quest-chest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}
.duo-quest-chest img.opened {
  transform: scale(1.1);
  filter: drop-shadow(0 0px 10px rgba(255, 215, 0, 0.5));
}

/* Belohnungs-Anzeige */
.duo-quest-reward-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  justify-content: flex-end;
}

.duo-quest-reward {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.duo-quest-reward.chest-reward {
  background: linear-gradient(135deg, rgba(139,105,20,0.2), rgba(197,150,31,0.2));
  border: 1px solid rgba(197,150,31,0.4);
  color: #C5961F;
}

.duo-quest-reward.xp-reward {
  background: linear-gradient(135deg, rgba(28,176,246,0.15), rgba(28,176,246,0.1));
  border: 1px solid rgba(28,176,246,0.3);
  color: #1cb0f6;
}

.duo-streak-card {
  background: #18232c;
  border: 2px solid #28343e;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.duo-streak-title {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN - TABLET & DESKTOP
═══════════════════════════════════════════ */

/* TABLET (768px+) */
@media (min-width: 768px) {
  .logo {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }
  
  .screen {
    min-height: 100dvh;
  }
  
  .content {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .profile-sheet {
    max-width: 600px;
  }
}

/* DESKTOP (1024px+) */
@media (min-width: 1024px) {
  .logo {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
  
  #targetCanvas {
    max-width: 500px;
  }
  
  .actions {
    max-width: 500px;
  }
  
  .profile-sheet {
    max-width: 700px;
    max-height: 90vh;
  }
  
  .btn-fire {
    font-size: 2.5rem;
  }
}

/* LANDSCAPE MODE */
@media (orientation: landscape) and (max-height: 600px) {
  .hdr {
    padding: 8px 20px 0;
  }
  
  .logo {
    font-size: clamp(1.2rem, 4vw, 2rem);
  }
  
  #targetCanvas {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
  
  .content {
    gap: 6px;
    padding: 8px 18px;
  }
}

/* MOBILE OPTIMIZATION */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn-fire,
  .btn-sec,
  .ps-tab,
  .ps-close,
  .schuetzenpass-icon {
    min-height: 48px;
    min-width: 48px;
  }
  
  /* Reduce padding on small screens */
  .hdr {
    padding: 10px 16px 0;
  }
  
  .content {
    padding: 10px 16px;
  }
  
  /* Better scroll performance */
  .ps-body {
    -webkit-overflow-scrolling: touch;
  }
}

/* VERY SMALL PHONES (max 360px) */
@media (max-width: 360px) {
  .logo {
    font-size: 1.5rem;
    letter-spacing: 0.12em;
  }
  
  .logo-tag {
    font-size: 0.5rem;
    letter-spacing: 0.3em;
  }
  
  .ps-name {
    font-size: 1.2rem;
  }
  
  .btn-fire {
    font-size: 1.8rem;
    padding: 14px 16px;
  }
}

/* SLOW NETWORK OPTIMIZATION - Reduce animations */
body.slow-network * {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0.1s !important;
}

body.slow-network {
  --accent: #7ab030;
  --accent-bright: #8ecf40;
}

/* Disable backdrop-filter on slow networks (performance) */
body.slow-network .profile-overlay {
  backdrop-filter: none;
}

/* Reduce shadow complexity on slow connections */
body.slow-network .btn-fire,
body.slow-network .profile-sheet {
  box-shadow: none !important;
}

.duo-open-btn {
  width: 100%;
  background: #1cb0f6;
  color: #18232c;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 16px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1899d6;
  text-transform: uppercase;
  transition: transform 0.1s;
}

.duo-open-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #1899d6;
}

.duo-open-btn.disabled {
  background: #37464f;
  color: rgba(255,255,255,0.3);
  box-shadow: none;
  cursor: default;
}

/* Rare Drop Chest Styling - Duolingo-Style */
.toolbox-overlay.rare-drop {
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 10001;
  opacity: 1;
  transition: opacity 0.4s;
}

.toolbox-glow.gold {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0.5; }
}

.toolbox-container.pop-in {
  animation: duo-chest-shake-open 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.toolbox-img.shake {
  animation: chest-shake 0.5s ease-in-out infinite;
}

.toolbox-img.open {
  animation: chest-open-scale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes chest-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

@keyframes chest-open-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) translateY(-20px); }
  100% { transform: scale(1.1) translateY(0); filter: drop-shadow(0 0 20px gold); }
}

@keyframes pop-in-animation {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Partikel-Effekt */
.chest-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: gold;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-fly 1s ease-out forwards;
}

@keyframes particle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ═══════════════════════════════════════════
   MODERN BUTTONS (GameOver & General)
═══════════════════════════════════════════ */
.btn {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn.primary {
  background: linear-gradient(145deg, #7ab030, #5c8b20);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(122, 176, 48, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(122, 176, 48, 0.5), 
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  filter: brightness(1.1);
}

.btn.primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 10px rgba(122, 176, 48, 0.2);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

.btn.secondary:active {
  transform: translateY(1px) scale(0.98);
  background: rgba(255, 255, 255, 0.05);
}

/* Button Icons */
.btn-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* GameOver Target Preview Improvements */
.go-target-preview {
  animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

/* Heatmap Section Styling */
#heatmapMount .metric-card {
  background: linear-gradient(165deg, rgba(30, 35, 25, 0.9), rgba(15, 20, 10, 0.95));
  border: 1px solid rgba(255, 100, 0, 0.2);
  box-shadow: 0 10px 30px rgba(255, 60, 0, 0.1);
}

#heatmapMount .metric-title {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.heatmap-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-top: 15px;
  background: #050505;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#heatmapCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ═══════════════════════════════════════════
   LEVEL UP OVERLAY
═══════════════════════════════════════════ */
.level-up-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.level-up-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.level-up-card {
  background: linear-gradient(135deg, #2a3a4a, #1a2a3a);
  border: 2px solid gold;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
  width: 90%;
}

.level-up-overlay.active .level-up-card {
  transform: scale(1);
}

.lu-title {
  color: gold;
  font-family: 'Bebas Neue', cursive;
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.lu-badge {
  font-size: 5rem;
  margin: 20px 0;
  filter: drop-shadow(0 0 20px gold);
  animation: lu-badge-bounce 2s infinite;
}

@keyframes lu-badge-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(5deg); }
}

.lu-rank {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lu-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-top: 5px;
}

.lu-btn {
  margin-top: 30px;
  background: #1cb0f6;
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #1899d6;
  transition: transform 0.1s;
  width: 100%;
}

.lu-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* ═══════════════════════════════════════════
   LEADERBOARD STYLES
═══════════════════════════════════════════ */
.lb-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  transition: background 0.2s;
}

.lb-row.me {
  background: rgba(28, 176, 246, 0.1);
  border-color: #1cb0f6;
}

.lb-rank-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  width: 25px;
  text-align: center;
}

.lb-row:nth-child(1) .lb-rank-num { color: gold; font-size: 1.5rem; }
.lb-row:nth-child(2) .lb-rank-num { color: silver; }
.lb-row:nth-child(3) .lb-rank-num { color: #cd7f32; }

.lb-avatar {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-info {
  flex: 1;
}

.lb-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.lb-sub {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lb-stats {
  text-align: right;
}

.lb-xp {
  color: #1cb0f6;
  font-weight: 800;
  font-size: 1.1rem;
}

.lb-streak {
  color: #ff9600;
  font-size: 0.8rem;
  font-weight: 600;
}

.lb-loading {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   ROOKIE ONBOARDING + HEALTHY ENGAGEMENT
═══════════════════════════════════════════ */
#rookiePlanMount {
  margin: 14px 0 18px;
}

.rookie-plan-card.profile-mode {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  margin-top: 10px;
}

.rookie-plan-card.profile-mode .rookie-plan-title {
  color: #fff;
  font-size: 0.85rem;
}

.rookie-plan-card.profile-mode .rookie-plan-bar {
  background: rgba(255, 255, 255, 0.05);
}

.rookie-plan-card.profile-mode .rookie-plan-item {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.rookie-plan-card.profile-mode .rookie-plan-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}


.rookie-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rookie-plan-title {
  color: #a9e7ff;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.rookie-plan-progress {
  color: #d2f4ff;
  font-weight: 700;
  font-size: 0.8rem;
  opacity: 0.95;
}

.rookie-plan-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin-bottom: 12px;
}

.rookie-plan-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1cb0f6, #8cc83c);
  transition: width 0.35s ease;
}

.rookie-plan-list {
  display: grid;
  gap: 8px;
}

.rookie-plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.rookie-plan-item.done {
  border-color: rgba(140, 200, 60, 0.5);
  background: rgba(140, 200, 60, 0.12);
}

.rookie-plan-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 22px;
}

.rookie-plan-item.done .rookie-plan-dot {
  background: rgba(140, 200, 60, 0.85);
  color: #182420;
}

.rookie-plan-text {
  color: rgba(240, 248, 255, 0.9);
  font-size: 0.82rem;
  line-height: 1.3;
}

.rookie-plan-hint {
  margin-top: 10px;
  color: rgba(170, 204, 218, 0.82);
  font-size: 0.76rem;
}

#rookieIntroOverlay,
#healthyBreakOverlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#rookieIntroOverlay.active,
#healthyBreakOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

.rookie-intro-card,
.healthy-break-card {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(22, 30, 38, 0.97), rgba(11, 17, 23, 0.97));
  border: 1px solid rgba(28, 176, 246, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.rookie-intro-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.rookie-intro-title,
.healthy-break-title {
  color: #ecfbff;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.rookie-intro-sub,
.healthy-break-sub {
  color: rgba(225, 240, 250, 0.86);
  line-height: 1.35;
  margin: 10px 0 12px;
  font-size: 0.95rem;
}

.rookie-intro-list {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.rookie-intro-item {
  color: rgba(203, 231, 244, 0.9);
  font-size: 0.84rem;
}

.rookie-intro-actions,
.healthy-break-actions {
  display: flex;
  gap: 10px;
}

.rookie-intro-btn,
.healthy-break-btn {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #e9f4fb;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 12px;
  cursor: pointer;
}

.rookie-intro-btn.primary,
.healthy-break-btn.primary {
  background: linear-gradient(135deg, #1cb0f6, #1899d6);
  border-color: rgba(28, 176, 246, 0.7);
  color: #0d1b22;
}

.engagement-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(9, 16, 24, 0.96);
  border: 1px solid rgba(28, 176, 246, 0.4);
  color: #e7f5ff;
  border-radius: 12px;
  padding: 10px 14px;
  z-index: 10030;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.85rem;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   KONFETTI EFFEKT
═══════════════════════════════════════════ */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 21000;
  pointer-events: none;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg) translateX(0); opacity: 1; }
  25% { transform: translateY(-50vh) rotate(180deg) translateX(30px); }
  50% { transform: translateY(0) rotate(360deg) translateX(-30px); }
  75% { transform: translateY(50vh) rotate(540deg) translateX(20px); }
  100% { transform: translateY(100vh) rotate(720deg) translateX(0); opacity: 0; }
}

/* XP Bar Animation */
.sp-xp-fill, .ps-xp-fill {
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-xp-fill::after, .ps-xp-fill::after {
      display: none;



/* Header Streak Icon */
.hdr-streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 150, 0, 0.12);
  border: 1px solid rgba(255, 150, 0, 0.3);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ff9600;
  pointer-events: none;
  user-select: none;
}

/* Removed hover effect to make it non-clickable */
/* .hdr-streak-badge:hover { ... } */

.hdr-streak-badge .fire-ico {
  font-size: 1rem;
  animation: fire-flicker 1.5s infinite alternate;
}

@keyframes fire-flicker {
  0% { filter: drop-shadow(0 0 2px #ff4500); transform: scale(1); }
  100% { filter: drop-shadow(0 0 8px #ff8c00); transform: scale(1.1); }
}


/* ═══════════════════════════════════════════
   MODERN FEEDBACK SYSTEM
═══════════════════════════════════════════ */
#screenFeedback {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.fb-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(165deg, rgba(30, 45, 20, 0.9), rgba(15, 25, 10, 0.95));
  border: 1px solid rgba(122, 176, 48, 0.3);
  border-radius: 32px;
  padding: 35px 28px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(122, 176, 48, 0.1);
  animation: fb-pop-in 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.fb-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #7ab030, transparent);
  opacity: 0.6;
}

@keyframes fb-pop-in {
  0% { transform: scale(0.9) translateY(40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.fb-title {
  color: #fff;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.fb-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-bottom: 30px;
  font-weight: 500;
}

.fb-emoji-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.fb-emoji-btn {
  flex: 1;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fb-emoji-btn:hover {
  background: rgba(122, 176, 48, 0.15);
  border-color: #7ab030;
  transform: translateY(-8px) scale(1.15);
  box-shadow: 0 15px 30px rgba(122, 176, 48, 0.3);
}

.fb-emoji-btn:active {
  transform: scale(0.9);
}

.fb-scale-row {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-top: 10px;
}

.fb-scale-row span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: rgba(122, 176, 48, 0.5);
}

.fb-actions {
  margin-top: 30px;
}

.btn-fb-skip {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 10px 20px;
  transition: color 0.2s;
}

.btn-fb-skip:hover {
  color: #fff;
}

/* Login Bonus Popup Styles */
.login-bonus-popup {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(20, 25, 15, 0.95);
  border: 2px solid rgba(140, 200, 60, 0.4);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-width: 250px;
  max-width: 90%;
}

.login-bonus-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-bonus-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
  animation: pulse 2s infinite;
}

.login-bonus-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: #d8f8a0;
  line-height: 1.4;
  max-width: 220px;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   NEUE ANIMATIONEN – Duolingo-Style (v2.7)
   ═══════════════════════════════════════════════════════════ */

/* 1. Float – für Welcome-Icon (BUGFIX: war undefiniert) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 2. Screen-Transitions */
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.screen-content {
  animation: screenFadeIn 0.3s ease forwards;
}

/* 3. Achievement Unlock Popup */
@keyframes badgeBounce {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  50% { transform: scale(1.25) rotate(5deg); opacity: 1; }
  75% { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes goldShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.achievement-unlock-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 3px solid transparent;
  border-image: linear-gradient(90deg, #ffd700, #ffec80, #ffd700, #b8860b, #ffd700) 1;
  border-image-size: 200% 100%;
  animation: badgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  padding: 24px 32px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.5);
  min-width: 280px;
  max-width: 340px;
}

.achievement-unlock-toast .au-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  animation: badgeBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.achievement-unlock-toast .au-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: #ffd700;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #ffd700, #fff8dc, #ffd700, #b8860b, #ffd700);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 2s linear infinite;
}

.achievement-unlock-toast .au-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
}

/* 4. Streak-Meilenstein-Feier */
@keyframes streakFire {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 100, 0, 0.6));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 150, 0, 0.9));
    transform: scale(1.15);
  }
}

@keyframes streakBannerSlide {
  from { opacity: 0; transform: translateY(-40px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.streak-milestone-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, #ff6b35, #ff4500, #ff6b35);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  border-radius: 30px;
  box-shadow: 0 4px 24px rgba(255, 69, 0, 0.5);
  animation: streakBannerSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  text-align: center;
}

.streak-milestone-banner .streak-fire {
  display: inline-block;
  animation: streakFire 0.6s ease-in-out infinite alternate;
  font-size: 1.6rem;
}

/* 5. XP-Bar Glow-Effekt */
@keyframes xpBarGlow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(122, 176, 48, 0.3);
  }
  50% {
    box-shadow: 0 0 12px rgba(122, 176, 48, 0.6), 0 0 24px rgba(122, 176, 48, 0.2);
  }
}

@keyframes xpBarGlowGold {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.7), 0 0 32px rgba(255, 215, 0, 0.3);
  }
}

.ps-xp-fill.glow,
.sp-xp-fill.glow {
  animation: xpBarGlow 1.5s ease-in-out infinite;
}

.ps-xp-fill.glow-gold,
.sp-xp-fill.glow-gold {
  animation: xpBarGlowGold 1.2s ease-in-out infinite;
}

/* 6. Sofort-Feedback (Haken/X) */
@keyframes checkPop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes checkFade {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.8) translateY(-10px); }
}

.feedback-pop {
  position: absolute;
  z-index: 5000;
  font-size: 2.2rem;
  animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.feedback-pop.fade-out {
  animation: checkFade 0.4s ease forwards;
}

.feedback-pop.hit {
  color: #4caf50;
}

.feedback-pop.miss {
  color: #f44336;
}

/* 7. Combo-Multiplikator */
@keyframes comboSlide {
  from { opacity: 0; transform: translateY(30px) scale(0.7); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes comboPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.combo-badge {
  position: absolute;
  top: -20px;
  right: 10px;
  z-index: 100;
  background: linear-gradient(135deg, #ff6b35, #ff4500);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(255, 69, 0, 0.4);
  animation: comboSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             comboPulse 1s ease-in-out 0.4s infinite;
}

/* 8. Button Ripple-Effekt */
.btn {
  position: relative;
  overflow: hidden;
}

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 0.5;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  width: 20px;
  height: 20px;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

.btn:active {
  transform: scale(0.96);
  transition: transform 100ms ease;
}

/* 9. Emoji-Charakter Reaktion */
@keyframes emojiJump {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-20px) scale(1.1); }
  50% { transform: translateY(-5px) scale(1.05); }
  70% { transform: translateY(-12px) scale(1.08); }
}

@keyframes emojiSad {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(3px) rotate(-3deg); }
  75% { transform: translateY(3px) rotate(3deg); }
}

.emoji-reaction {
  display: inline-block;
  font-size: 3.5rem;
  animation: emojiJump 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.emoji-reaction.sad {
  animation: emojiSad 0.6s ease-in-out 3;
}

/* 10. Partikel-Explosion (bereits definiert, aber aktiviert) */
.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-fly 0.8s ease-out forwards;
}

/* 11. Confetti-Upgrade: Mehr Formen */
.confetti-circle {
  border-radius: 50%;
}

.confetti-star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.confetti-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.confetti-strip {
  width: 4px !important;
  border-radius: 2px !important;
}


/* ════ PREMIUM DASHBOARD GLASSMORPHISM UI ════ */
.premium-dashboard {
  width: 100%;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.pd-greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.pd-greeting-text h2 {
  font-size: 1.4rem;
  margin: 0 0 4px 0;
  font-weight: 700;
  color: var(--text-main);
}

.pd-greeting-text .pd-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pd-profile-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.1);
  border: 1px solid rgba(0, 195, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
}

.pd-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.3;
}
.pd-section-title .pd-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pd-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
}

.pd-progress-ring {
  position: relative;
  text-align: center;
  margin: 20px 0;
}
.pd-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -10%);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-accent);
  text-shadow: 0 0 10px rgba(0,195,255,0.4);
}

.pd-stats-row {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 15px;
}
.pd-stats-row > div {
  text-align: center;
  flex: 1;
}
.pd-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pd-stat-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.pd-badges {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px;
}
.pd-badge-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.pd-badge-card.highlight-green {
  border-color: rgba(122, 176, 48, 0.3);
  box-shadow: 0 4px 20px rgba(122, 176, 48, 0.1);
  background: linear-gradient(180deg, rgba(122,176,48,0.05) 0%, rgba(0,0,0,0) 100%);
}
.pd-badge-card.highlight-blue {
  border-color: rgba(0, 195, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 195, 255, 0.1);
  background: linear-gradient(180deg, rgba(0,195,255,0.05) 0%, rgba(0,0,0,0) 100%);
}
.pd-badge-card.opacity-50 {
  opacity: 0.5;
}
.pd-badge-card .pd-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.pd-badge-name {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 4px;
}
.pd-badge-lvl {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pd-recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-recent-item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* ════ FLOATING "DUELL STARTEN" BUTTON ════ */
#btnOpenDuelSetup {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8999;
  background: linear-gradient(135deg, #00c3ff 0%, #7ab030 100%);
  color: #000;
  border: none;
  border-radius: 30px;
  padding: 15px 36px;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 8px 30px rgba(122, 176, 48, 0.45), 0 0 60px rgba(0,195,255,0.15);
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#btnOpenDuelSetup:active {
  transform: translateX(-50%) scale(0.95);
  box-shadow: 0 4px 15px rgba(122, 176, 48, 0.3);
}

/* ════ DUEL SETUP BOTTOM SHEET ════ */
.duel-setup-overlay {
  -webkit-tap-highlight-color: transparent;
}
.duel-setup-sheet {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.duel-setup-sheet .card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.duel-setup-sheet .card-hd {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.duel-setup-sheet .diff-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.duel-setup-sheet .dif {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.duel-setup-sheet .dif.active {
  border-color: var(--accent);
  background: rgba(122,176,48,0.1);
  box-shadow: 0 0 15px rgba(122,176,48,0.15);
}
.duel-setup-sheet .dif-ico {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 4px;
}
.duel-setup-sheet .dif-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}
.duel-setup-sheet .dif-desc {
  font-size: 0.6rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.duel-setup-sheet .info-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.duel-setup-sheet .btn-burst {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 5px;
}
.duel-setup-sheet .btn-fire {
  background: linear-gradient(135deg, #00c3ff 0%, #7ab030 100%);
  color: #000;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 1.1rem;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(122,176,48,0.35);
  transition: transform 0.15s ease;
}
.duel-setup-sheet .btn-fire:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════
   ENHANCED MOBILE RESPONSIVE (v1.0)
   ═══════════════════════════════════════════ */

/* Mobile body Klasse */
body.is-mobile {
  font-size: 16px; /* Verhindert iOS Zoom */
  -webkit-text-size-adjust: 100%;
}

/* Touch Device Optimierungen */
body.is-touch button,
body.is-touch [onclick],
body.is-touch .btn-fire,
body.is-touch .btn-primary {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(122, 176, 48, 0.2);
}

/* Pull-down Indicator */
.pull-down-indicator {
  display: none;
}

body.is-touch .pull-down-indicator {
  display: block;
  animation: pullIndicator 2s ease-in-out infinite;
}

@keyframes pullIndicator {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
  50% { transform: translateX(-50%) translateY(-5px); opacity: 0.6; }
}

/* Keyboard sichtbar - Body Klasse */
body.keyboard-visible {
  overflow: hidden !important;
}

body.keyboard-visible .profile-sheet,
body.keyboard-visible .bottom-sheet {
  transition: max-height 0.3s ease;
}

/* Verbesserte Bottom-Sheet Handles */
.profile-sheet-handle,
.sheet-handle {
  touch-action: pan-y;
  cursor: grab;
}

.profile-sheet-handle:active,
.sheet-handle:active {
  cursor: grabbing;
}

/* Mobile-optimierte Buttons */
@media (hover: none) and (pointer: coarse) {
  /* Größere Buttons */
  .btn-fire,
  .btn-primary,
  .btn-secondary {
    min-height: 48px;
    padding: 14px 20px;
    font-size: 1rem;
  }

  /* Tabs größer */
  .ps-tab {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
  }

  /* Input Felder */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  textarea {
    font-size: 16px !important; /* Verhindert iOS Zoom */
    min-height: 44px;
    padding: 12px;
  }

  /* Select Dropdowns */
  select {
    font-size: 16px !important;
    min-height: 44px;
    padding: 12px;
  }

  /* Close Button größer */
  .ps-close,
  .close-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Avatar größer */
  .ps-avatar {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }

  /* Score-Chips größer */
  .score-chip {
    min-height: 36px;
    padding: 8px 12px;
  }

  /* Bot Status Card */
  .bot-status-card {
    min-height: 80px;
    padding: 12px;
  }

  /* Discipline Options */
  .disc-option,
  .diff-option {
    min-height: 48px;
    padding: 12px;
  }
}

/* Sehr kleine Bildschirme (< 360px) */
@media (max-width: 360px) {
  .dashboard {
    padding: 8px;
  }

  .header {
    padding: 8px 12px;
  }

  .greeting {
    font-size: 1.2rem;
  }

  .score-chips {
    gap: 6px;
  }

  .ps-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .sun-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Landscape Mode auf Mobile */
@media (orientation: landscape) and (max-height: 600px) {
  .profile-sheet {
    max-height: 90vh;
  }

  .ps-body {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .ps-hero {
    flex-direction: row;
    padding: 8px;
  }

  .ps-avatar {
    width: 48px;
    height: 48px;
  }

  .bottom-sheet {
    max-height: 85vh;
  }
}

/* Safe Area für iPhone Notch */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .header {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .profile-sheet {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .bottom-sheet {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

/* Swipe-Hinweis (optional, kann entfernt werden) */
.swipe-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  animation: swipeHint 3s ease-in-out 2s;
}

@keyframes swipeHint {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  20% { opacity: 0.8; transform: translateX(-50%) translateY(0); }
  80% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Touch-Feedback für alle interaktiven Elemente */
@media (hover: none) {
  button:active,
  [onclick]:active,
  .btn-fire:active,
  .ps-tab:active,
  .sun-card:active,
  .disc-option:active,
  .diff-option:active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: opacity 0.1s, transform 0.1s;
  }
}

/* Verhindert ungewolltes Zoom auf iOS */
@supports (-webkit-touch-callout: none) {
  input:focus,
  select:focus,
  textarea:focus {
    font-size: 16px !important;
  }
}

/* ═══════════════════════════════════════════
   FRIENDS SYSTEM UI
   ═══════════════════════════════════════════ */

/* Header Friends Button */
.header-friends-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}

.header-friends-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.header-friends-btn:active {
  transform: scale(0.95);
}

/* Friends Overlay */
.friends-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.friends-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.friends-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.friends-overlay.active .friends-sheet {
  transform: translateY(0);
}

.friends-header {
  position: sticky;
  top: 0;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

.friends-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.friends-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.friends-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.friends-body {
  padding: 20px;
}

/* Friend Code Section */
.friend-code-section {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.friend-code-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.friend-code {
  font-family: 'DM Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #7ab030;
  text-align: center;
  padding: 16px;
  background: rgba(122, 176, 48, 0.1);
  border-radius: 12px;
  border: 2px dashed rgba(122, 176, 48, 0.3);
  margin-bottom: 12px;
  letter-spacing: 0.2em;
}

.friend-code-copy {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-code-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.friend-code-copy:active {
  transform: scale(0.98);
}

/* Friend Add Section */
.friend-add-section {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.friend-code-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  color: #fff;
  font-size: 1.2rem;
  font-family: 'DM Mono', monospace;
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.friend-code-input:focus {
  outline: none;
  border-color: #7ab030;
  box-shadow: 0 0 0 3px rgba(122, 176, 48, 0.2);
}

.friend-add-btn {
  width: 100%;
  background: linear-gradient(135deg, #00c3ff 0%, #7ab030 100%);
  border: none;
  border-radius: 10px;
  padding: 14px;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 176, 48, 0.4);
}

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

/* Friend Requests Section */
.friend-requests-section {
  margin-bottom: 24px;
}

.friend-requests-section h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.requests-empty {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.request-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.request-card.sent {
  opacity: 0.7;
}

.request-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.request-info {
  flex: 1;
  min-width: 0;
}

.request-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.request-time,
.request-status {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.request-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.request-btn.accept {
  background: rgba(122, 176, 48, 0.2);
  color: #7ab030;
}

.request-btn.accept:hover {
  background: rgba(122, 176, 48, 0.3);
}

.request-btn.decline {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
}

.request-btn.decline:hover {
  background: rgba(255, 59, 48, 0.3);
}

/* Friends List Section */
.friends-list-section {
  margin-top: 24px;
}

.friends-list-section h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.friends-empty {
  text-align: center;
  padding: 40px 20px;
}

.friends-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.friends-empty-text {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
}

.friends-empty-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* Friend Card */
.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.friend-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.friend-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.friend-status {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.friend-actions {
  display: flex;
  gap: 6px;
}

.friend-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-btn.challenge {
  background: rgba(122, 176, 48, 0.2);
  color: #7ab030;
}

.friend-btn.challenge:hover {
  background: rgba(122, 176, 48, 0.3);
  transform: scale(1.05);
}

.friend-btn.remove {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  padding: 8px 10px;
}

.friend-btn.remove:hover {
  background: rgba(255, 59, 48, 0.2);
}

/* Toast Notifications */
.friend-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-left: 4px solid #7ab030;
}

.friend-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.friend-toast-success {
  border-left-color: #7ab030;
}

.friend-toast-error {
  border-left-color: #ff3b30;
}

.friend-toast-info {
  border-left-color: #00c3ff;
}

/* Mobile Optimierungen */
@media (hover: none) and (pointer: coarse) {
  .friend-btn,
  .request-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .friend-add-btn {
    min-height: 48px;
  }

  .friends-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .friends-sheet {
    max-height: 95vh;
  }

  .friend-code {
    font-size: 1.5rem;
  }

  .friend-card,
  .request-card {
    padding: 10px;
  }

  .friend-avatar,
  .request-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

/* ═══════════════════════════════════════════
   ASYNC CHALLENGE SYSTEM UI
   ═══════════════════════════════════════════ */

/* Header Challenge Button */
.header-challenge-btn {
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}

.header-challenge-btn:hover {
  background: rgba(255, 59, 48, 0.3);
  transform: scale(1.05);
}

.header-challenge-btn:active {
  transform: scale(0.95);
}

/* Challenge Banner */
.challenge-banner {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.2) 0%, rgba(255, 149, 0, 0.2) 100%);
  border: 2px solid rgba(255, 59, 48, 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
}

.challenge-banner.active {
  opacity: 1;
  max-height: 100px;
  padding: 16px 20px;
}

.challenge-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-opponent {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.challenge-diff {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Challenge Overlay */
.challenges-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.challenges-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.challenges-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.challenges-overlay.active .challenges-sheet {
  transform: translateY(0);
}

.challenges-header {
  position: sticky;
  top: 0;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

.challenges-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.challenges-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.challenges-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.challenges-body {
  padding: 20px;
}

/* Challenge Create Section */
.challenge-create-section {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255, 59, 48, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.challenge-create-section h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.challenge-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0 0 16px 0;
}

.challenge-create-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff3b30 0%, #ff9500 100%);
  border: none;
  border-radius: 10px;
  padding: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.challenge-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

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

/* Challenge Sections */
.challenge-available-section,
.challenge-my-section {
  margin-bottom: 24px;
}

.challenge-available-section h4,
.challenge-my-section h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.challenges-empty {
  text-align: center;
  padding: 30px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

/* Challenge Card */
.challenge-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
  transition: all 0.2s;
}

.challenge-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.challenge-card.accepted {
  border-left: 4px solid #7ab030;
}

.challenge-card.completed {
  border-left: 4px solid #00c3ff;
  opacity: 0.7;
}

.challenge-card.expired {
  border-left: 4px solid rgba(255, 255, 255, 0.3);
  opacity: 0.5;
}

.challenge-from,
.challenge-opponent {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.challenge-details {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.challenge-time {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.challenge-status {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.challenge-status.pending {
  color: #ffc107;
}

.challenge-status.accepted {
  color: #7ab030;
}

.challenge-status.completed {
  color: #00c3ff;
}

.challenge-status.expired {
  color: rgba(255, 255, 255, 0.4);
}

.challenge-accept-btn {
  width: 100%;
  background: rgba(122, 176, 48, 0.2);
  border: 1px solid rgba(122, 176, 48, 0.3);
  border-radius: 8px;
  padding: 10px;
  color: #7ab030;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.challenge-accept-btn:hover {
  background: rgba(122, 176, 48, 0.3);
  border-color: rgba(122, 176, 48, 0.5);
}

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

/* Async Result Overlay */
.async-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.async-result-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.async-result-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.async-result-overlay.active .async-result-card {
  transform: scale(1);
}

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

.result-title {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-bottom: 30px;
}

.result-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.result-score-item {
  flex: 1;
}

.result-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.result-value {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
}

.result-value.winner {
  color: #7ab030;
  text-shadow: 0 0 20px rgba(122, 176, 48, 0.5);
}

.result-divider {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  font-weight: 700;
}

.result-close-btn {
  width: 100%;
  background: linear-gradient(135deg, #00c3ff 0%, #7ab030 100%);
  border: none;
  border-radius: 12px;
  padding: 14px;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.result-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 176, 48, 0.4);
}

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

/* Challenge Toast */
.challenge-toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-left: 4px solid #ff9500;
}

.challenge-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.challenge-toast-success {
  border-left-color: #7ab030;
}

.challenge-toast-error {
  border-left-color: #ff3b30;
}

.challenge-toast-info {
  border-left-color: #00c3ff;
}

/* Mobile Optimierungen */
@media (hover: none) and (pointer: coarse) {
  .challenge-accept-btn,
  .challenge-create-btn,
  .result-close-btn {
    min-height: 48px;
  }

  .challenges-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .challenges-sheet {
    max-height: 95vh;
  }

  .async-result-card {
    padding: 30px 20px;
  }

  .result-value {
    font-size: 1.5rem;
  }

  .result-title {
    font-size: 1.5rem;
  }
}

/* ═══════════════════════════════════════════
   UPDATES & ANKÜNDIGUNGEN UI
   ═══════════════════════════════════════════ */

/* Updates Badge */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Updates Overlay */
.updates-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 6000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.updates-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.updates-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.updates-overlay.active .updates-sheet {
  transform: translateY(0);
}

.updates-header {
  position: sticky;
  top: 0;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

.updates-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.updates-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.updates-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.updates-body {
  padding: 20px;
}

.updates-empty {
  text-align: center;
  padding: 60px 20px;
}

.updates-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.updates-empty-text {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
}

/* Update Card */
.update-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  transition: all 0.2s;
}

.update-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.update-card.priority-high {
  border-left: 4px solid #ff3b30;
  background: rgba(255, 59, 48, 0.05);
}

.update-card.priority-medium {
  border-left: 4px solid #ffc107;
  background: rgba(255, 193, 7, 0.05);
}

.update-card.priority-low {
  border-left: 4px solid #00c3ff;
  background: rgba(0, 195, 255, 0.05);
}

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

.update-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.update-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
}

.update-message {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.update-time {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* Mobile Optimierungen */
@media (hover: none) and (pointer: coarse) {
  .updates-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .updates-sheet {
    max-height: 95vh;
  }

  .update-card {
    padding: 14px;
  }

  .update-icon {
    font-size: 1.5rem;
  }

  .update-title {
    font-size: 1rem;
  }

  .update-message {
    font-size: 0.85rem;
  }
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE MEDIA QUERIES
   ═══════════════════════════════════════════ */

/* ── Kleine Screens (iPhone SE, Galaxy S series) ── */
@media (max-width: 374px) {
  /* Dashboard 2-Spalten zu 1-Spalte auf sehr kleinen Screens */
  #pdMainStatsRow {
    flex-direction: column !important;
  }

  /* Greeting Row kompakter */
  #premiumDashboard {
    padding: 12px !important;
  }

  /* Profil-Tabs: kleinere Schrift */
  .ps-tab {
    font-size: .52rem;
    padding: 8px 2px 9px;
    letter-spacing: .08em;
  }

  /* Floating Button schmaler */
  #btnOpenDuelSetup {
    padding: 13px 24px !important;
    font-size: 0.95rem !important;
  }

  /* Bottom-Sheet weniger Padding */
  #duelSetupSheet {
    padding: 16px 16px 30px 16px !important;
  }

  /* Game Mode Grid 1 Spalte */
  #gameModeSelection > div:nth-child(3) {
    grid-template-columns: 1fr !important;
  }

  /* Difficulty Buttons: 2x2 Grid statt 4er Reihe */
  .diff-row {
    flex-wrap: wrap;
  }
  .diff-row .dif {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
  }

  /* Score Eingabe kompakter */
  .score-inp {
    font-size: 1.1rem;
    padding: 10px 6px;
  }

  /* Game Over: Score-Block kompakter */
  .go-scores {
    padding: 16px 12px !important;
  }
}

/* ── Standard Mobile (bis 480px) ── */
@media (max-width: 480px) {
  /* Updates Dropdown: zentriert statt rechts-angehängt */
  #updatesDropdown {
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  /* Profil-Tabs: scrollbar wenn nötig */
  .ps-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ps-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Profil-Tabs mindestbreite für Touch */
  .ps-tab {
    min-width: 60px;
    white-space: nowrap;
  }

  /* Dashboard Badges Grid: 3 statt 4 Spalten */
  #pdBadgesGrid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Floating DUELL STARTEN Button: bessere Positionierung */
  #btnOpenDuelSetup {
    bottom: max(25px, env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - 40px);
  }

  /* SUN Grid: 2 Spalten statt 3 auf kleinen Screens */
  .sun-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Entry Screen: Inputs nebeneinander aber kleiner */
  .ec-row {
    gap: 6px;
  }

  /* Quick Pair Buttons: gleiche Breite */
  .quick-pair {
    gap: 6px;
  }

  /* Last shot box: kompakterer Text */
  .ls-txt {
    font-size: 0.8rem;
  }
}

/* ── Mittlere Screens (Tablets/große Phones) ── */
@media (min-width: 481px) and (max-width: 768px) {
  /* Dashboard etwas breiter nutzen */
  #premiumDashboard {
    max-width: 560px !important;
  }

  /* Content breiter */
  .content {
    max-width: 500px;
  }
}

/* ── Landscape Modus ── */
@media (orientation: landscape) and (max-height: 500px) {
  /* Header kompakter */
  .hdr {
    padding: 8px 20px 0;
  }

  /* Logo kleiner */
  .logo {
    font-size: 1.5rem !important;
  }

  /* Floating Button kleiner */
  #btnOpenDuelSetup {
    padding: 10px 24px !important;
    font-size: 0.9rem !important;
    bottom: 10px !important;
  }

  /* Bottom Sheet nicht zu hoch */
  #duelSetupSheet {
    max-height: 90vh !important;
  }

  /* Profil Sheet kompakter */
  .profile-sheet {
    max-height: 95vh;
  }

  /* Target Canvas kleiner */
  .target-wrap {
    max-width: 200px;
    margin: 0 auto;
  }

  /* Battle Screen: weniger Padding */
  #screenBattle .content {
    padding: 6px 18px;
    gap: 6px;
  }

  /* Game Over: kompakter */
  .go-emoji {
    font-size: 3rem;
    margin-bottom: 4px;
  }
  .go-title {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }
}

/* ── Barrierefreiheit: Reduzierte Bewegung ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .profile-sheet {
    animation: none !important;
  }

  #duelSetupSheet {
    transition: none !important;
  }

  #duelSetupSheetOverlay {
    transition: none !important;
  }

  .sl-pill {
    animation: none !important;
  }

  .go-emoji {
    animation: none !important;
  }
}

/* ── Touch-Device Optimierungen ── */
@media (hover: none) and (pointer: coarse) {
  /* Größere Touch-Targets */
  .ps-tab {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Buttons: mindestens 44px Höhe */
  .btn-sec {
    min-height: 44px;
  }

  .btn-calc {
    min-height: 44px;
  }

  /* Difficulty Buttons besser tippbar */
  .dif {
    min-height: 70px;
  }

  /* Avatar Options größer */
  .avatar-option {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Disc Tabs größer */
  .disc-tab {
    min-height: 52px;
  }

  /* Hover-Effekte deaktivieren (Touch hat kein Hover) */
  .training-mode-card:hover:not(.locked) {
    transform: none;
  }

  .profile-btn:hover {
    background: rgba(100, 150, 200, .12);
    border-color: rgba(100, 150, 200, .25);
  }
}

