:root {
  font-family: "Fahkwang", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background: #f5f6fb;
  --bg: #f5f6fb;
  --card: #ffffff;
  --border: #e2e8f0;
  --muted: #5b6275;
  --accent: #ff4d87;
  --accent-2: #7c5dfa;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: inherit;
}

.app-shell {
  width: min(1100px, 100%);
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  padding: 24px;
  box-shadow: 0 20px 45px rgba(10, 22, 70, 0.08);
}

.camera-view {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  box-shadow: 0 25px 60px rgba(15, 15, 30, 0.35);
}

#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1);
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
  padding: 24px;
  height: 100dvh;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.75)
  );
}

button {
  width: 100%;
  padding: 16px 20px;
  border-radius: 999px;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 25px rgba(255, 77, 135, 0.35);
  font-family: "Fahkwang", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
}

.camera-hint {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.error {
  color: #ffd2d2;
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.story-card h2 {
  font-size: 48px;
  margin-top: 0;
  text-align: center;
}

#messages {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.message {
  opacity: 0;
  transform: translateY(25px) scale(0.97);
  filter: blur(10px);
  color: #1f2a44;
  font-size: 24px;
}

.message.visible {
  animation: message-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes message-enter {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.97);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.01);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

.profile-screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.transition-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 999;
  overflow: hidden;
  pointer-events: none;
}

.transition-heart {
  position: absolute;
  bottom: -120px;
  color: #ff3d7c;
  filter: drop-shadow(0 20px 30px rgba(255, 72, 124, 0.4));
  animation-name: heart-surge;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes heart-surge {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-140vh) scale(1.4);
    opacity: 0;
  }
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-icons .dot,
.status-icons .bars {
  width: 10px;
  height: 10px;
  background: var(--muted);
  border-radius: 50%;
  display: inline-block;
}

.status-icons .bars {
  width: 20px;
  border-radius: 4px;
}

.battery {
  font-weight: 600;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.avatar-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.photo-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe6f0, #e0e7ff);
  padding: 6px;
}

.photo-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile .tagline {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.profile h2 {
  font-size: 2.2rem;
  margin: 0 0 12px;
}

.bio {
  color: var(--muted);
  margin-bottom: 20px;
}

.gift {
  font-size: 1.05rem;
}

.gift .key {
  display: inline-block;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(124, 93, 250, 0.12);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.action-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-3px);
}

.action-nope {
  color: #ff4d6d;
}

.action-star {
  color: #1c8cf4;
}

.action-like {
  color: #14c56c;
}

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

.info-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin: 0;
}

.single-value {
  font-size: 1.1rem;
  margin: 0;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #edf0f6;
}

.info-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.label {
  font-size: 0.85rem;
  color: var(--muted);
}

.value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2a44;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  background: #f1f5ff;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid #dbe3ff;
}

@media (max-width: 800px) {

  .overlay-panel {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .card {
    padding: 24px;
  }

  .photo-ring {
    width: 160px;
    height: 160px;
  }

  .profile-actions {
    gap: 10px;
  }

  .action-btn {
    width: 58px;
    height: 58px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  button {
    font-size: 1rem;
  }
}

#final-section{
  padding: 24px;
}

#story-section{
  box-shadow: none;
}