/* ========================================
   Pick Me Test - SNS Comment Simulator
   Primary: #DB2777 (Magenta Pink)
   Dark mode first, Glassmorphism 2.0
   ======================================== */

/* ===== CSS Variables (Dark mode default) ===== */
:root {
  --primary: #DB2777;
  --primary-light: #EC4899;
  --primary-dark: #9D174D;
  --primary-glow: rgba(219, 39, 119, 0.3);
  --primary-glow-strong: rgba(219, 39, 119, 0.5);
  --primary-dim: rgba(219, 39, 119, 0.15);
  --bg: #0a0a14;
  --bg2: #0f0f1e;
  --surface: #1a1a30;
  --surface2: #252545;
  --surface-hover: #2d2d50;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.15);
  --border-active: rgba(219, 39, 119, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 20px;
  --shadow: rgba(0, 0, 0, 0.4);
  --tier-secure: #22c55e;
  --tier-chill: #3b82f6;
  --tier-mild: #eab308;
  --tier-certified: #f97316;
  --tier-ultimate: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
}

/* ===== Light Mode ===== */
[data-theme="light"] {
  --bg: #fff5f8;
  --bg2: #ffeaf0;
  --surface: rgba(255, 255, 255, 0.8);
  --surface2: rgba(255, 255, 255, 0.9);
  --surface-hover: rgba(219, 39, 119, 0.08);
  --text: #1a1a2e;
  --text-muted: #4a4a6a;
  --text-dim: #8888a0;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.12);
  --border-active: rgba(219, 39, 119, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow: rgba(219, 39, 119, 0.08);
  --primary-glow: rgba(219, 39, 119, 0.15);
  --primary-glow-strong: rgba(219, 39, 119, 0.25);
  --primary-dim: rgba(219, 39, 119, 0.08);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(219, 39, 119, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(157, 23, 77, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(219, 39, 119, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(157, 23, 77, 0.05) 0%, transparent 50%);
}

/* ===== Reduced Motion ===== */
@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;
  }
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  z-index: 10001;
  text-decoration: none;
  font-weight: 600;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

/* ===== App Loader ===== */
#app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.4s ease;
}

#app-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-icon {
  font-size: 3rem;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: scale(1.08);
  border-color: var(--primary-glow);
}

.theme-icon {
  line-height: 1;
}

/* ===== Language Selector ===== */
.lang-selector {
  position: fixed;
  top: 16px;
  right: 70px;
  z-index: 100;
}

.lang-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px var(--shadow);
  padding: 6px;
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 101;
}

.lang-dropdown.active {
  display: block;
  animation: fadeSlideDown 0.2s ease;
}

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

.lang-option {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.lang-option:hover {
  background: var(--primary-dim);
}

/* ===== Layout ===== */
main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 80px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.app-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary), #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.app-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 6px;
}

.container {
  width: 100%;
  max-width: 480px;
}

/* ===== Glassmorphism Card ===== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: 0 8px 32px var(--shadow);
  transition: all var(--transition);
}

/* ===== Start Screen ===== */
.start-content {
  text-align: center;
}

/* Phone mockup */
.phone-mockup {
  width: 140px;
  height: 200px;
  margin: 0 auto 28px;
  border: 3px solid var(--border2);
  border-radius: 24px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow), 0 0 40px var(--primary-glow);
}

.phone-notch {
  width: 60px;
  height: 8px;
  background: var(--bg);
  border-radius: 0 0 8px 8px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.phone-screen {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mock-post {
  font-size: 3rem;
  animation: mockFloat 2.5s ease-in-out infinite;
}

@keyframes mockFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mock-reactions {
  display: flex;
  gap: 16px;
  font-size: 1.4rem;
}

.mock-reactions span {
  animation: mockPop 2s ease-in-out infinite;
}

.mock-reactions span:nth-child(2) { animation-delay: 0.3s; }
.mock-reactions span:nth-child(3) { animation-delay: 0.6s; }

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

.start-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-start {
  width: 100%;
  max-width: 280px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow-strong);
  font-size: 1.1rem;
}

.btn-start::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-start:hover::before {
  left: 100%;
}

.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--primary-glow-strong);
}

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.progress-text {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* ===== Pick Me Meter (during feed) ===== */
.pickme-meter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.meter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.meter-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
  width: 0;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
}

.meter-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-light);
  text-shadow: 0 0 12px var(--primary-glow);
  min-width: 48px;
  text-align: right;
  transition: all 0.3s ease;
}

.meter-value.bump {
  animation: valueBump 0.4s ease;
}

@keyframes valueBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ===== SNS Post Card ===== */
.sns-post-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px var(--shadow);
}

.sns-post-card.slide-in {
  animation: postSlideIn 0.4s ease;
}

.sns-post-card.slide-out {
  animation: postSlideOut 0.35s ease forwards;
}

@keyframes postSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes postSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-60px); }
}

/* Post header */
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dim);
  border-radius: 50%;
  flex-shrink: 0;
}

.post-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-username {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.post-platform {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-platform.insta {
  color: #E1306C;
}

.post-platform.twitter {
  color: #1d9bf0;
}

.post-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Post image area */
.post-image {
  width: 100%;
  min-height: 160px;
  max-height: 200px;
  background: linear-gradient(135deg, var(--surface2), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.post-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 50%, var(--primary-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

/* Post caption */
.post-caption {
  padding: 14px 16px 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

/* Post stats */
.post-stats {
  padding: 4px 16px 10px;
}

.post-likes {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

/* Like heart overlay */
.like-heart-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5rem;
  pointer-events: none;
  display: none;
  z-index: 10;
  filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.6));
}

.like-heart-overlay.liked {
  display: block;
  animation: heartPop 0.8s ease forwards;
}

@keyframes heartPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* ===== Action Bar ===== */
.action-bar {
  display: flex;
  border-top: 1px solid var(--border);
}

.action-btn {
  flex: 1;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  padding: 8px;
  position: relative;
}

.action-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.action-btn:hover {
  background: var(--primary-dim);
  color: var(--primary-light);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.action-selected {
  background: var(--primary-dim);
  color: var(--primary-light);
}

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

.action-text {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== Comment Section ===== */
.comment-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-section.expanded {
  max-height: 400px;
}

.comment-options {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-option {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.comment-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--text-dim);
  border-radius: 3px 0 0 3px;
  transition: all var(--transition);
}

.comment-option:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateX(4px);
}

.comment-option:hover::before {
  background: var(--primary);
  width: 4px;
}

/* Selected comment states */
.comment-option.selected {
  pointer-events: none;
}

.comment-option.selected.sincere {
  border-color: var(--tier-secure);
  background: rgba(34, 197, 94, 0.15);
}

.comment-option.selected.sincere::before {
  background: var(--tier-secure);
  width: 4px;
}

.comment-option.selected.subtle {
  border-color: var(--tier-mild);
  background: rgba(234, 179, 8, 0.15);
}

.comment-option.selected.subtle::before {
  background: var(--tier-mild);
  width: 4px;
}

.comment-option.selected.pickme {
  border-color: var(--tier-ultimate);
  background: rgba(239, 68, 68, 0.15);
}

.comment-option.selected.pickme::before {
  background: var(--tier-ultimate);
  width: 4px;
}

.comment-option.faded {
  opacity: 0.3;
  pointer-events: none;
}

/* ===== Reaction Feedback ===== */
.reaction-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 20;
  animation: reactionFloat 1.2s ease-out forwards;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.reaction-feedback.sincere { color: var(--tier-secure); }
.reaction-feedback.neutral { color: var(--tier-chill); }
.reaction-feedback.subtle { color: var(--tier-mild); }
.reaction-feedback.pickme { color: var(--tier-ultimate); }

@keyframes reactionFloat {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  30% { opacity: 1; transform: translate(-50%, -70%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(0.8); }
}

/* ===== Result Screen ===== */
.result-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: resultFadeIn 0.6s ease;
}

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

.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(236, 72, 153, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 80% 50%, rgba(244, 114, 182, 0.4), transparent);
  animation: sparkleFloat 6s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

@keyframes sparkleFloat {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-20px) rotate(5deg); }
}

.result-card > * {
  position: relative;
  z-index: 1;
}

/* Tier Badge */
.result-tier-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.result-card.tier-secure .result-tier-badge {
  background: rgba(34, 197, 94, 0.2);
  color: var(--tier-secure);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.result-card.tier-chill .result-tier-badge {
  background: rgba(59, 130, 246, 0.15);
  color: var(--tier-chill);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.result-card.tier-mild .result-tier-badge {
  background: rgba(234, 179, 8, 0.15);
  color: var(--tier-mild);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.result-card.tier-certified .result-tier-badge {
  background: rgba(249, 115, 22, 0.15);
  color: var(--tier-certified);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.result-card.tier-ultimate .result-tier-badge {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(219, 39, 119, 0.2));
  color: var(--tier-ultimate);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

/* Result meter */
.result-meter-container {
  margin: 20px auto 24px;
  max-width: 400px;
}

.result-meter-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.result-meter {
  width: 100%;
  height: 16px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.result-meter-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.result-card.tier-secure .result-meter-fill {
  background: linear-gradient(90deg, #16a34a, var(--tier-secure));
}

.result-card.tier-chill .result-meter-fill {
  background: linear-gradient(90deg, #2563eb, var(--tier-chill));
}

.result-card.tier-mild .result-meter-fill {
  background: linear-gradient(90deg, #ca8a04, var(--tier-mild));
}

.result-card.tier-certified .result-meter-fill {
  background: linear-gradient(90deg, #ea580c, var(--tier-certified));
}

.result-card.tier-ultimate .result-meter-fill {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--tier-ultimate));
}

.result-score {
  font-size: 2.8rem;
  font-weight: 900;
  margin-top: 16px;
  letter-spacing: -0.02em;
}

.result-card.tier-secure .result-score { color: var(--tier-secure); }
.result-card.tier-chill .result-score { color: var(--tier-chill); }
.result-card.tier-mild .result-score { color: var(--tier-mild); }
.result-card.tier-certified .result-score { color: var(--tier-certified); }
.result-card.tier-ultimate .result-score {
  background: linear-gradient(135deg, var(--primary-light), var(--tier-ultimate));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tier name & desc */
.result-tier-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 16px;
  margin-bottom: 8px;
}

.result-tier-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Pattern Analysis ===== */
.pattern-analysis {
  margin: 24px 0;
  text-align: left;
}

.pattern-analysis > h3 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Pattern summary */
.pattern-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.pattern-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pattern-item.comment { border-color: rgba(59, 130, 246, 0.3); }
.pattern-item.like { border-color: rgba(239, 68, 68, 0.3); }
.pattern-item.ignore { border-color: rgba(34, 197, 94, 0.3); }

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

.pattern-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pattern-count {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

/* Comment styles breakdown */
.comment-styles {
  margin-bottom: 16px;
}

.comment-styles h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-align: center;
}

.style-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.style-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 70px;
  text-align: right;
}

.style-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.style-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.style-fill.sincere { background: var(--tier-secure); }
.style-fill.subtle { background: var(--tier-mild); }
.style-fill.pickme { background: var(--tier-ultimate); }

.style-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  min-width: 20px;
}

/* Post log */
.post-log {
  margin-top: 8px;
}

.post-log h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-align: center;
}

.log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.log-post {
  color: var(--text);
  flex: 1;
}

.log-action {
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

.log-action.sincere { color: var(--tier-secure); }
.log-action.neutral { color: var(--tier-chill); }
.log-action.subtle { color: var(--tier-mild); }
.log-action.pickme { color: var(--tier-ultimate); }

/* ===== Share Section ===== */
.share-section {
  margin: 28px 0 20px;
}

.share-section h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-share {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-twitter {
  background: #1d9bf0;
  color: #fff;
  border: none;
}

.btn-twitter:hover {
  background: #1a8cd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(29, 155, 240, 0.3);
}

.btn-copy {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}

.btn-copy:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  transform: translateY(-2px);
}

.btn-copy.copied {
  border-color: var(--tier-secure);
  color: var(--tier-secure);
  background: rgba(34, 197, 94, 0.1);
}

/* ===== Retake Button ===== */
.btn-retake {
  width: 100%;
  max-width: 280px;
  margin-top: 8px;
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  padding: 14px 32px;
}

.btn-retake:hover {
  background: var(--primary-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* ===== Tier Card Borders ===== */
.result-card.tier-secure { border-color: rgba(34, 197, 94, 0.3); }
.result-card.tier-chill { border-color: rgba(59, 130, 246, 0.3); }
.result-card.tier-mild { border-color: rgba(234, 179, 8, 0.3); }
.result-card.tier-certified { border-color: rgba(249, 115, 22, 0.3); box-shadow: 0 0 30px rgba(249, 115, 22, 0.15); }
.result-card.tier-ultimate {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.15), 0 0 60px rgba(219, 39, 119, 0.08);
  animation: resultFadeIn 0.6s ease, ultimateGlow 3s ease-in-out infinite;
}

@keyframes ultimateGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.15), 0 0 60px rgba(219, 39, 119, 0.08); }
  50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.25), 0 0 80px rgba(219, 39, 119, 0.12); }
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 30px 16px 40px;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: inline-block;
}

footer a:hover {
  color: var(--primary-light);
  background: var(--primary-dim);
}

/* Related Tests */
.related-tests { width: 100%; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.related-tests h3 { font-size: 16px; color: var(--text-dim, #a0a0b8); margin-bottom: 12px; text-align: center; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; text-decoration: none; color: var(--text, #fff); transition: transform 0.2s, border-color 0.2s; }
.related-card:hover { transform: translateY(-2px); border-color: var(--card-color, var(--primary)); }
.related-emoji { font-size: 28px; }
.related-name { font-size: 12px; font-weight: 600; text-align: center; color: var(--text-dim, #a0a0b8); }
[data-theme="light"] .related-card { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .related-card:hover { background: rgba(0,0,0,0.06); }
.percentile-stat { text-align: center; margin: 16px 0 0; font-size: 13px; color: var(--text-dim, #a0a0b8); }
.percentile-stat strong { color: var(--primary-light, var(--primary)); font-size: 15px; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  main {
    padding: 70px 12px 32px;
  }

  .app-title {
    font-size: 1.5rem;
  }

  .card {
    padding: 24px 18px;
  }

  .phone-mockup {
    width: 110px;
    height: 160px;
  }

  .mock-post {
    font-size: 2.2rem;
  }

  .post-caption {
    font-size: 0.85rem;
  }

  .comment-option {
    font-size: 0.82rem;
    padding: 10px 14px;
    min-height: 44px;
  }

  .result-score {
    font-size: 2.4rem;
  }

  .result-tier-name {
    font-size: 1.35rem;
  }

  .share-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-share {
    width: 100%;
    max-width: 240px;
  }

  .lang-selector {
    right: 62px;
  }

  .lang-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  #currentLang {
    display: none;
  }

  .pattern-summary {
    gap: 6px;
  }

  .pattern-item {
    padding: 10px 6px;
  }

  .style-label {
    min-width: 55px;
    font-size: 0.72rem;
  }
}

@media (max-width: 360px) {
  .app-title {
    font-size: 1.3rem;
  }

  .phone-mockup {
    width: 90px;
    height: 130px;
  }

  .mock-post {
    font-size: 1.8rem;
  }
}

@media (min-width: 768px) {
  main {
    padding-top: 100px;
  }

  .app-title {
    font-size: 2.2rem;
  }

  .app-subtitle {
    font-size: 1.15rem;
  }

  .card {
    padding: 40px 36px;
  }

  .phone-mockup {
    width: 160px;
    height: 220px;
  }

  .mock-post {
    font-size: 3.5rem;
  }

  .comment-option:hover {
    transform: translateX(6px);
  }
}

/* ===== ENGAGEMENT: Result Carousel ===== */
.result-carousel {
    position: relative;
    overflow: hidden;
    height: 52px;
    margin: 16px auto;
    max-width: 340px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.carousel-track {
    display: flex;
    flex-direction: column;
    animation: carouselScroll 12s ease-in-out infinite;
}
.carousel-item {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 0 16px;
}
@keyframes carouselScroll {
    0%, 20% { transform: translateY(0); }
    25%, 45% { transform: translateY(-52px); }
    50%, 70% { transform: translateY(-104px); }
    75%, 95% { transform: translateY(-156px); }
    100% { transform: translateY(0); }
}

/* ===== ENGAGEMENT: Social Proof Badge ===== */
.social-proof-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(219, 39, 119, 0.12);
    border: 1px solid rgba(219, 39, 119, 0.25);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin: 8px auto 12px;
}

/* ===== ENGAGEMENT: Pulse CTA ===== */
.btn-pulse {
    animation: btnPulse 2s ease-in-out infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(219, 39, 119, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(219, 39, 119, 0); }
}

/* ===== About / Collapsible Section ===== */
.about-section {
    max-width: 480px;
    margin: 24px auto;
    padding: 0 16px;
}
.about-section details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.about-section summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.about-section summary::after {
    content: "+";
    font-size: 18px;
    color: var(--primary);
    transition: transform 0.2s;
}
.about-section details[open] summary::after {
    content: "\2212";
}
.about-section summary::-webkit-details-marker { display: none; }
.about-content {
    padding: 0 18px 18px;
}
.about-content h2 {
    font-size: 16px;
    color: var(--primary);
    margin: 16px 0 8px;
}
.about-content p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
}
