/* Global Design Tokens & Reset */
:root {
  --bg-gradient: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 60%, #020617 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-glow: rgba(168, 85, 247, 0.35);
  
  --primary-purple: #9333ea;
  --primary-indigo: #6366f1;
  --accent-gold: #fbbf24;
  --accent-amber: #f59e0b;
  --accent-pink: #ec4899;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --glass-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(16px);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-glow: 0 0 25px rgba(147, 51, 234, 0.4);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding: 0.5rem 1rem 1.5rem;
}

/* Background Ambient Glows */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.glow-orb-1 {
  top: -10%;
  left: 20%;
  width: 450px;
  height: 450px;
  background: var(--primary-purple);
}

.glow-orb-2 {
  bottom: 10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: var(--accent-gold);
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}

/* Container & Header */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.top-bar {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}



.title-group {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-utility-btns {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  z-index: 10;
}

.utility-btns {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  z-index: 10;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.title-logo {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Primary Ask Button underneath logo */
.primary-ask-btn {
  background: linear-gradient(135deg, var(--primary-purple) 0%, #7c3aed 50%, var(--primary-indigo) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  outline: none;
  margin-top: 0.5rem;
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.primary-ask-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 35px rgba(168, 85, 247, 0.7), 0 0 20px rgba(251, 191, 36, 0.4);
  border-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #6366f1 100%);
}

.primary-ask-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
}

.primary-ask-btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
  background: linear-gradient(135deg, #4c1d95 0%, #3730a3 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  animation: btnPulse 1.2s ease-in-out infinite alternate;
}

@keyframes btnPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.03); filter: brightness(1.2) drop-shadow(0 0 15px rgba(168, 85, 247, 0.6)); }
}

.btn-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.btn-text {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.title-logo-img {
  max-width: 100%;
  width: clamp(260px, 45vw, 420px);
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 6px 20px rgba(147, 51, 234, 0.45));
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  outline: none;
}

/* Prompt Chips */
.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.chip-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
  border-color: rgba(251, 191, 36, 0.3);
  transform: translateY(-1px);
}

/* 4x4 Grid Container - Scaled up by 25% */
.grid-wrapper {
  position: relative;
  width: 100%;
  max-width: 415px;
  padding: 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ThoughtDump Grid Overlay (Visible when all cats are in the box) */
.grid-thoughtdump-overlay {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) scale(1);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.grid-thoughtdump-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.8);
}

/* Mouse Overlay */
.grid-mouse-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.grid-mouse-track.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

#mouse {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center;
  will-change: transform;
  pointer-events: auto;
  cursor: pointer;
}

.grid-thoughtdump-img {
  width: clamp(180px, 55%, 260px);
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-thoughtdump-overlay:hover {
  opacity: 0.95;
  transform: translateX(-50%) scale(1.05);
}

.grid-thoughtdump-overlay:hover .grid-thoughtdump-img {
  box-shadow: 0 12px 35px rgba(168, 85, 247, 0.8), 0 0 25px rgba(251, 191, 36, 0.7);
  border-color: rgba(251, 191, 36, 0.5);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* Cat Card Styling */
.cat-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  will-change: transform;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px var(--card-glow);
}

.cat-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-md) - 1px);
  pointer-events: none;
  transition: transform 0.4s ease;
}

.cat-card:hover .cat-img {
  transform: scale(1.06);
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  pointer-events: none;
  border-radius: calc(var(--radius-md) - 1px);
}

.card-number-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Shuffling State Effects */
.cat-grid.shuffling .cat-card {
  pointer-events: none;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  border-color: var(--accent-gold);
}

/* Modal Window (<dialog>) */
.answer-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(147, 51, 234, 0.3);
  overflow: hidden;
  margin: auto;
}

.answer-modal::backdrop {
  background-color: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  animation: fadeInBackdrop 0.3s ease-out;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: linear-gradient(160deg, #1e1b4b 0%, #0f172a 70%, #090d16 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  position: relative;
  color: var(--text-main);
  animation: popInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-cat-avatar {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-gold), var(--primary-purple));
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.4);
}

.modal-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #0f172a;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.modal-cat-img:hover {
  transform: scale(1.05);
}

.answer-badge {
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
  outline: none;
}

.answer-badge:hover {
  transform: scale(1.08) translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.answer-badge:active {
  transform: scale(0.95);
}

.answer-badge.yes {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.answer-badge.no {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.answer-badge.maybe {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.oracle-verdict-title {
  font-size: 1rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.cat-commentary {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: #f1f5f9;
}

.modal-close-x {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-x:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: scale(1.1);
}

/* History Modal Window */
.history-modal-content {
  padding: 1.75rem 1.5rem 1.5rem;
  width: 100%;
}

.history-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.75rem;
  padding-right: 2.25rem;
  margin-top: 0.25rem;
}

.history-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-history-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.clear-history-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  width: 100%;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.history-cat-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-gold), var(--primary-purple));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.history-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.history-q {
  color: var(--text-main);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.history-a {
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.history-a.yes { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.history-a.no { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.history-a.maybe { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.empty-history {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}

/* Cat Box fixed at bottom left of screen - Decreased 25% to 315px */
.cat-box-wrapper {
  position: fixed;
  bottom: -12px;
  left: 24px;
  width: 315px;
  height: auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.65));
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

.cat-box-wrapper.in-box {
  cursor: pointer;
}

.cat-box-wrapper.in-box:hover {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 16px 35px rgba(168, 85, 247, 0.55));
}

.cat-box-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.peeking-cat-mask {
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  bottom: 65%; /* Adjusted lower to match the box opening */
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.peeking-cat-img {
  position: absolute;
  bottom: -2%; /* Anchored just slightly below the mask bottom for a clean edge */
  left: 50%;
  width: 45%;
  transform: translateX(-50%) translateY(100%);
  pointer-events: none;
  will-change: transform;
}

/* Bounce / wiggle animation when a cat hops in/out of the box */
.cat-box-wrapper.box-bounce {
  animation: boxPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes boxPop {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.16) rotate(-5deg); }
  70% { transform: scale(0.95) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Flying clones for WAAPI animation */
.flying-cat-card {
  position: fixed;
  pointer-events: none;
  z-index: 9500;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(251, 191, 36, 0.5);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Continuous Walking Cat along the bottom from Right to the Cat Box */
.walking-cat-container {
  position: fixed;
  bottom: 24px;
  width: 105px;
  height: auto;
  z-index: 990;
  pointer-events: auto;
  cursor: pointer;
  animation: walkToCatBox 12s linear infinite;
}

.walking-cat-img {
  width: 100%;
  height: auto;
  display: block;
  transform: scaleX(1); /* Face forward (left) towards Cat Box */
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

@keyframes walkToCatBox {
  0% {
    left: calc(100vw + 20px);
    opacity: 1;
  }
  80% {
    left: 180px; /* Arrives in front of Cat Box */
    opacity: 1;
    transform: scale(1);
  }
  88% {
    left: 110px; /* Enters Cat Box */
    opacity: 0;
    transform: scale(0.3) translateY(24px);
  }
  89% {
    left: calc(100vw + 20px);
    opacity: 0;
  }
  100% {
    left: calc(100vw + 20px);
    opacity: 0;
  }
}

/* Footer Section */
.app-footer {
  margin: 0.25rem auto 6.5rem;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.25 ease;
}

.app-footer:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.copyright-text {
  color: var(--text-muted);
  font-weight: 400;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}

.footer-link-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.footer-link-btn:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.footer-ios-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-gold);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.footer-ios-btn:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  transform: translateY(-1px);
}

/* About Us Modal Styling */
.about-modal-content {
  padding: 1.85rem 1.75rem 1.75rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.about-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.about-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  line-height: 1.6;
  font-size: 1.05rem;
  color: var(--text-main);
  text-align: center;
}

.about-text {
  color: #e2e8f0;
}

.about-text strong {
  color: var(--accent-gold);
  font-weight: 700;
}

.about-app-promo {
  margin: 0.35rem 0;
  display: flex;
  justify-content: center;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.55rem 1.35rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.app-store-badge:hover {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
}

.app-store-badge .apple-icon {
  flex-shrink: 0;
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.badge-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.82;
  font-weight: 500;
}

.badge-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Outfit', sans-serif;
}

.about-contact {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.about-email-link {
  color: #818cf8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.about-email-link:hover {
  color: #a5b4fc;
  text-shadow: 0 0 8px rgba(129, 140, 248, 0.6);
}

.about-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 0.5rem;
  opacity: 0.8;
}

/* App Toast Notification */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(147, 51, 234, 0.3);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Responsive Rules */
@media (max-width: 600px) {
  body {
    padding: 1rem 0.5rem;
  }
  
  .cat-grid {
    gap: 0.5rem;
  }
  
  .card-number-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    bottom: 4px;
    right: 4px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .cat-box-wrapper {
    width: 195px;
    bottom: -6px;
    left: 12px;
  }

  .app-footer {
    margin: 0.25rem auto 5.5rem;
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
  }
}
