/* ============================================
       APPLE VISION PRO / iOS CONTROL CENTER GLASS
       ============================================ */

:root {
  /* Background & ambient */
  --bg0: #0b0b0d;
  --bg-warm1: #2a1f15;
  --bg-warm2: #1a1510;
  --bg-warm3: #0f0d0a;

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.10);
  --glass2: rgba(255, 255, 255, 0.14);
  --glass3: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-bright: rgba(255, 255, 255, 0.28);
  --glass-glow: rgba(255, 255, 255, 0.06);

  /* Typography */
  --text: rgba(255, 255, 255, 0.92);
  --text-sub: rgba(255, 255, 255, 0.70);
  --muted: rgba(255, 255, 255, 0.50);

  /* Accent */
  --accent: rgba(200, 160, 100, 0.9);
  --accent-glow: rgba(200, 160, 100, 0.25);

  /* Card & stack */
  --card-next: rgba(255, 255, 255, 0.08);

  /* Shadows */
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.15);

  /* Radii */
  --radius: 24px;
  --radius-panel: 28px;
  --radius-card: 20px;
  --radius-icon: 16px;
}

* {
  box-sizing: border-box;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ========== FIXED VIEWPORT ========== */
html,
body {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

body {
  background: var(--bg0);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 12vh;
}

/* Warm ambient gradient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 25% 20%, rgba(180, 130, 80, 0.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 75% 70%, rgba(160, 100, 60, 0.14), transparent 45%),
    radial-gradient(ellipse 90% 70% at 50% 90%, rgba(100, 70, 50, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 15%, rgba(140, 90, 50, 0.10), transparent 40%),
    linear-gradient(160deg, var(--bg-warm1) 0%, var(--bg-warm2) 40%, var(--bg-warm3) 70%, var(--bg0) 100%);
}

/* Vignette overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

/* ========== SCREEN VISIBILITY ========== */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6vh;
}

.screen.active {
  display: flex;
}

/* PWA standalone mode - push content down for safe area */
@media all and (display-mode: standalone) {
  .screen {
    padding-top: calc(8vh + env(safe-area-inset-top, 24px) + 60px);
  }
}

@media all and (display-mode: fullscreen) {
  .screen {
    padding-top: calc(8vh + env(safe-area-inset-top, 24px) + 60px);
  }
}

/* ========== BACK BUTTON ========== */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-sub);
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.back-btn.visible {
  display: flex;
}

.back-btn:hover {
  background: var(--glass3);
  border-color: var(--glass-border-bright);
  color: var(--text);
  transform: scale(1.08);
}

/* PWA mode - push back button down for safe area */
@media all and (display-mode: standalone) {
  .back-btn {
    top: calc(20px + env(safe-area-inset-top, 24px) + 20px);
  }
}

@media all and (display-mode: fullscreen) {
  .back-btn {
    top: calc(20px + env(safe-area-inset-top, 24px) + 20px);
  }
}

/* JS-based PWA detection for Safari/Chrome iOS compatibility */
.pwa-standalone .back-btn {
  top: calc(env(safe-area-inset-top, 44px) + 10px);
}

.pwa-standalone .screen {
  padding-top: calc(env(safe-area-inset-top, 44px) + 20px);
}

/* =============================================
       PAGE 1: DUCOOYIN & ADKAAR SELECTION
       ============================================= */

.wrap {
  position: relative;
  width: min(480px, 90vw);
  text-align: center;
  padding: 36px 28px 32px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
}

.wrap h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wrap .sub {
  margin: 0 0 28px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 400;
}

.choices {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 4px 0 0;
}

.choice-card {
  position: relative;
  flex: 0 1 auto;
  width: 200px;
  min-height: 200px;
  background: var(--glass2);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 28px 18px 24px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  overflow: hidden;
}

.choice-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  pointer-events: none;
}

.choice-card:hover {
  transform: translateY(-3px);
  background: var(--glass3);
  border-color: var(--glass-border-bright);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.30),
    0 2px 8px rgba(0, 0, 0, 0.20);
}

.choice-card:active {
  transform: translateY(-1px);
}

.choice-card .icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-icon);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--glass3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.10);
}

.choice-card .label {
  position: relative;
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 6px;
  text-align: center;
  color: var(--text);
}

.choice-card .hint {
  position: relative;
  margin: 0 0 16px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  flex-grow: 1;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--glass3);
  border: 1px solid var(--glass-border-bright);
  border-radius: 12px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-top: auto;
}

.cta-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================
       PAGE 2: INTERESTS SELECTION
       ============================================= */

.section {
  max-width: 520px;
  width: 100%;
  padding: 0 24px;
}

/* PWA mode - push section down so back button doesn't overlap */
@media all and (display-mode: standalone) {
  .section {
    margin-top: 60px;
  }
}

@media all and (display-mode: fullscreen) {
  .section {
    margin-top: 60px;
  }
}

/* JS-based PWA detection for Safari/Chrome iOS */
.pwa-standalone .section {
  margin-top: 10px;
}

.section h3 {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.interests {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 16px;
  background: var(--glass2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.chip:hover {
  background: var(--glass2);
  border-color: var(--glass-border-bright);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.chip:active {
  transform: scale(0.97);
}

.chip.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text);
  box-shadow:
    0 0 20px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.chip span,
.chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.chip-icon svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  color: var(--text-sub);
}

/* =============================================
       PAGE 4: ADKAAR SELECTION LIST
       ============================================= */

.adkaar-panel {
  width: min(480px, 90vw);
  padding: 18px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.panel-kicker {
  margin: 2px 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: none;
}

.list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin: 12px 0;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--glass2), var(--glass));
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  text-align: left;
}

.list-item:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-bright);
  background: linear-gradient(180deg, var(--glass3), var(--glass2));
}

.list-item:active {
  transform: translateY(0) scale(0.99);
}

.list-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--glass2);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.list-icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-sub);
}

.list-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text);
}

.list-sub {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.4;
}

/* =============================================
       PAGE 3: FLASHCARDS
       ============================================= */

.deck {
  position: relative;
  width: min(340px, 88vw);
  height: 450px;
  margin-top: 40px;
}

/* PWA mode - push deck down so back button doesn't overlap */
@media all and (display-mode: standalone) {
  .deck {
    margin-top: 80px;
  }
}

@media all and (display-mode: fullscreen) {
  .deck {
    margin-top: 80px;
  }
}

/* JS-based PWA detection for Safari/Chrome iOS */
.pwa-standalone .deck {
  margin-top: 0;
}

.stack-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card-next);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  pointer-events: none;
}

.stack-card.left-1 {
  transform: translateX(-8px);
  opacity: 0.6;
  z-index: 4;
}

.stack-card.left-2 {
  transform: translateX(-16px);
  opacity: 0.35;
  z-index: 3;
}

.stack-card.left-3 {
  transform: translateX(-24px);
  opacity: 0.15;
  z-index: 2;
}

.stack-card.right-1 {
  transform: translateX(8px);
  opacity: 0.6;
  z-index: 4;
}

.stack-card.right-2 {
  transform: translateX(16px);
  opacity: 0.35;
  z-index: 3;
}

.stack-card.right-3 {
  transform: translateX(24px);
  opacity: 0.15;
  z-index: 2;
}

.stack-card.hidden {
  opacity: 0 !important;
}

.stack-card.rising {
  transform: translateX(0) !important;
  opacity: 1 !important;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.flash-card.entering {
  animation: cardEnter 0.25s ease-out forwards;
}

@keyframes cardEnter {
  0% {
    transform: translateY(15px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.flash-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--glass2);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  color: var(--text);
  cursor: grab;
  user-select: none;
  z-index: 10;
  transform-origin: center bottom;
  will-change: transform;
  overflow: hidden;
}

.flash-card:active {
  cursor: grabbing;
}

.flash-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}

.card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 32px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-content::-webkit-scrollbar {
  display: none;
}

.category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-sub);
  margin-bottom: 20px;
  padding: 5px 12px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  flex-shrink: 0;
}

.heading {
  width: 100%;
  padding: 16px 14px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
  direction: rtl;
  font-family: 'Scheherazade New', 'Traditional Arabic', 'Amiri', serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.description {
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-sub);
  text-align: center;
}

.somali-text {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.source-text {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  display: inline-block;
}

.nav-bar {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 15;
}

.arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-sub);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.arrow:hover {
  background: var(--glass3);
  border-color: var(--glass-border-bright);
  color: var(--text);
  transform: scale(1.08);
}

.arrow:active {
  transform: scale(0.95);
}

.swipe-hint {
  text-align: center;
  flex: 1;
}

.hint-text {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

.progress {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}

.swipe-indicator {
  position: absolute;
  top: 24px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.swipe-indicator.left {
  left: 20px;
  border: 3px solid #ff6b6b;
  color: #ff6b6b;
}

.swipe-indicator.right {
  right: 20px;
  border: 3px solid #51cf66;
  color: #51cf66;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  body {
    padding-top: 4vh;
  }

  .screen {
    padding-top: 4vh;
  }

  .wrap {
    padding: 28px 20px 24px;
    border-radius: 24px;
  }

  .wrap h1 {
    font-size: 22px;
  }

  .wrap .sub {
    margin-bottom: 22px;
    font-size: 13px;
  }

  .choices {
    gap: 10px;
  }

  .choice-card {
    width: 150px;
    min-height: 180px;
    padding: 20px 14px 18px;
    border-radius: 16px;
  }

  .choice-card .icon {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .choice-card .label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .choice-card .hint {
    font-size: 12px;
  }

  .section {
    padding: 0 24px;
  }

  .section h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .interests {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .chip {
    font-size: 13px;
    padding: 12px 16px;
    gap: 8px;
  }

  .chip-icon svg {
    width: 16px;
    height: 16px;
  }

  .deck {
    width: 75vw;
    height: 480px;
    margin-top: 0;
  }

  .heading {
    font-size: 18px;
  }

  .description {
    font-size: 13px;
  }

  .category {
    font-size: 9px;
    padding: 4px 10px;
  }

  .card-content {
    padding: 18px 16px;
    bottom: 80px;
    justify-content: flex-start;
  }

  .nav-bar {
    bottom: 16px;
  }

  .arrow {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .stack-card.left-1 {
    transform: translateX(-6px);
  }

  .stack-card.left-2 {
    transform: translateX(-12px);
  }

  .stack-card.left-3 {
    transform: translateX(-18px);
  }

  .stack-card.right-1 {
    transform: translateX(6px);
  }

  .stack-card.right-2 {
    transform: translateX(12px);
  }

  .stack-card.right-3 {
    transform: translateX(18px);
  }
}

@media (min-width: 600px) {
  .section h3 {
    font-size: 22px;
  }

  .chip {
    padding: 12px 20px;
    font-size: 15px;
  }

  .deck {
    width: 380px;
    height: 500px;
  }

  .heading {
    font-size: 28px;
  }

  .arrow {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* =============================================
       COMPLETION CARD STYLES
       ============================================= */

.flash-card.completion-card {
  background: linear-gradient(145deg,
      rgba(80, 200, 120, 0.25) 0%,
      rgba(60, 160, 100, 0.18) 30%,
      var(--glass2) 70%);
  border-color: rgba(80, 200, 120, 0.4);
}

.flash-card.completion-card::before {
  background: linear-gradient(180deg,
      rgba(80, 200, 120, 0.15) 0%,
      transparent 60%);
}

.flash-card.completion-card .heading {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.completion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(80, 200, 120, 0.4), rgba(60, 160, 100, 0.25));
  border: 2px solid rgba(80, 200, 120, 0.5);
  font-size: 40px;
  color: #50c878;
  box-shadow:
    0 0 30px rgba(80, 200, 120, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow:
      0 0 30px rgba(80, 200, 120, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 0 50px rgba(80, 200, 120, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }
}

.completion-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
  max-height: 100%;
}

.completion-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.completion-message {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-sub);
  margin: 0;
  width: 90%;
  max-width: 280px;
}

.completion-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  margin-top: 8px;
  background: linear-gradient(145deg, rgba(80, 200, 120, 0.35), rgba(60, 160, 100, 0.2));
  border: 1px solid rgba(80, 200, 120, 0.5);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow:
    0 4px 16px rgba(80, 200, 120, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.completion-btn:hover {
  background: linear-gradient(145deg, rgba(80, 200, 120, 0.5), rgba(60, 160, 100, 0.3));
  transform: translateY(-2px);
  box-shadow:
    0 6px 24px rgba(80, 200, 120, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.completion-btn:active {
  transform: translateY(0);
}

/* Responsive adjustments for completion card */
@media (max-width: 640px) {
  .completion-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }

  .completion-title {
    font-size: 20px;
  }

  .completion-message {
    font-size: 13px;
    max-width: 220px;
  }

  .completion-btn {
    padding: 12px 24px;
    font-size: 13px;
  }
}

/* =============================================
       CREDIT FOOTER & SOCIAL ICONS
       ============================================= */

.credit-footer {
  position: fixed;
  bottom: 40px;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 100;
}

/* Ensure visibility in standalone PWA mode */
@media all and (display-mode: standalone) {
  .credit-footer {
    bottom: calc(80px + env(safe-area-inset-bottom, 24px));
  }
}

/* Fullscreen mode support */
@media all and (display-mode: fullscreen) {
  .credit-footer {
    bottom: calc(80px + env(safe-area-inset-bottom, 24px));
  }
}

.credit-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.credit-text a {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.credit-text a:hover {
  color: var(--text);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.social-icon:hover {
  background: var(--glass2);
  border-color: var(--glass-border-bright);
  color: var(--text);
  transform: translateY(-2px);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

/* Responsive adjustments for credit footer */
@media (max-width: 640px) {
  .credit-footer {
    bottom: 16px;
    gap: 12px;
    /* Increased from 8px */
  }

  .credit-text {
    font-size: 11px;
  }

  .social-icons {
    gap: 10px;
  }

  .social-icon {
    width: 32px;
    height: 32px;
  }

  .social-icon svg {
    width: 16px;
    height: 16px;
  }
}