/* ========================================
   Sebatdon Calculator - Style
   Primary: #ca8a04 (gold)
   Dark mode first, Glassmorphism 2.0
   ======================================== */

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

:root {
  --bg: #060612;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(202, 138, 4, 0.4);
  --text: #f0f0f0;
  --text-secondary: rgba(240, 240, 240, 0.6);
  --text-muted: rgba(240, 240, 240, 0.4);
  --primary: #ca8a04;
  --primary-light: #eab308;
  --primary-dark: #92600a;
  --primary-glow: rgba(202, 138, 4, 0.2);
  --accent-red: #dc2626;
  --accent-red-light: #ef4444;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #faf9f6;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(202, 138, 4, 0.5);
  --text: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.6);
  --text-muted: rgba(26, 26, 46, 0.4);
  --primary-glow: rgba(202, 138, 4, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-blur: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  scroll-behavior: smooth;
}

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

/* App Loader */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.loader-content {
  text-align: center;
}

.loader-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

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

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

.loader-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.app-loader.hidden {
  display: none;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  z-index: 10001;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

/* Container */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 1rem;
  position: relative;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  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));
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

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

/* Language Selector */
.language-selector {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
}

.lang-btn {
  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));
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

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

.lang-menu {
  position: absolute;
  top: 52px;
  left: 0;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}

.lang-menu.hidden {
  display: none;
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.85rem;
  text-align: left;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

.lang-option:hover,
.lang-option.active {
  background: var(--primary-glow);
  color: var(--primary-light);
}

/* Ad Banners */
.ad-banner,
.ad-banner-bottom {
  text-align: center;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.ad-text {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* App Header */
.app-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.header-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: headerBounce 2s ease-in-out infinite;
}

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

.app-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Glass Card */
.glass-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: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* Intro Section */
.intro-card {
  text-align: center;
}

.intro-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.intro-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.intro-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.intro-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-item span:last-child {
  font-size: 0.9rem;
  color: var(--text);
  text-align: left;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 6px 28px rgba(202, 138, 4, 0.4);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-start {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* Form Elements */
.form-card h2,
.list-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ca8a04' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Relation Grid */
.relation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.relation-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.relation-btn .rel-emoji {
  font-size: 1.4rem;
}

.relation-btn .rel-label {
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

.relation-btn:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.relation-btn.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary-light);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Amount Selection */
.amount-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.amount-btn {
  flex: 1;
  min-width: 80px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.amount-btn:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.amount-btn.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary-light);
}

.custom-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-amount .form-input {
  flex: 1;
}

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

/* Toggle Switch */
.kids-toggle {
  margin-top: 0.5rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--text);
  border-radius: 50%;
  transition: all var(--transition);
}

.toggle-input:checked + .toggle-switch {
  background: var(--primary);
}

.toggle-input:checked + .toggle-switch::after {
  left: 25px;
  background: #000;
}

/* Kids Count Group */
.kids-count-group {
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.kids-count-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

.kids-count-group label:first-child {
  margin-top: 0;
}

/* Recipients List */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.list-count {
  background: var(--primary);
  color: #000;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  min-width: 24px;
  text-align: center;
}

.recipients-list {
  min-height: 60px;
  margin-bottom: 1rem;
}

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1.5rem 0;
}

.recipient-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  animation: slideIn 0.3s ease-out;
}

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

.recipient-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}

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

.recipient-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-relation {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recipient-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-light);
  white-space: nowrap;
}

.recipient-delete {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.recipient-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* List Total */
.list-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--primary-glow);
  border: 1px solid var(--primary-dark);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-weight: 600;
}

.total-amount {
  font-size: 1.2rem;
  color: var(--primary-light);
  font-weight: 800;
}

/* Result Section */
.result-card {
  text-align: center;
}

.result-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  padding: 1rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-icon {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 800;
}

.stat-expense .stat-value {
  color: var(--accent-red-light);
}

.stat-income .stat-value {
  color: var(--success);
}

.stat-net .stat-value {
  color: var(--primary-light);
}

/* Comparison Box */
.comparison-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.comparison-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.comparison-bar-container {
  margin-bottom: 0.75rem;
}

.comparison-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.comp-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.comp-bar-wrap {
  flex: 1;
  height: 24px;
  background: var(--bg-input);
  border-radius: 12px;
  overflow: hidden;
}

.comp-bar {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease-out;
  min-width: 4px;
}

.comp-bar-user {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.comp-bar-avg {
  background: linear-gradient(90deg, var(--text-muted), var(--text-secondary));
}

.comp-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.comparison-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

/* Fun Facts */
.fun-facts-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.fun-facts-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.fun-fact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.fun-fact-item:last-child {
  border-bottom: none;
}

.fun-fact-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.fun-fact-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Breakdown Chart */
.breakdown-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.breakdown-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.breakdown-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 80px;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--bg-input);
  border-radius: 10px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s ease-out;
  min-width: 4px;
}

.breakdown-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Share Section */
.share-section {
  margin-bottom: 1.25rem;
}

.share-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-share {
  flex: 1;
  min-width: 100px;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition);
  width: auto;
}

.btn-share svg {
  flex-shrink: 0;
}

.btn-twitter:hover {
  background: rgba(29, 155, 240, 0.1);
  border-color: #1d9bf0;
  color: #1d9bf0;
}

.btn-facebook:hover {
  background: rgba(24, 119, 242, 0.1);
  border-color: #1877f2;
  color: #1877f2;
}

.btn-copy:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* Footer */
.game-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.back-link:hover {
  color: var(--primary-light);
}

/* Utility */
.hidden {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease-out;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 400px) {
  .relation-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: left;
  }

  .stat-icon {
    margin-bottom: 0;
  }

  .stat-label {
    margin-bottom: 0;
  }

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

@media (min-width: 401px) and (max-width: 520px) {
  .relation-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Festive accent decoration */
.intro-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-red), var(--primary), var(--accent-red));
  border-radius: var(--radius) var(--radius) 0 0;
}

.intro-card {
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-red), var(--primary));
  border-radius: var(--radius) var(--radius) 0 0;
}

.result-card {
  position: relative;
  overflow: hidden;
}
