/* =============================================
   THE BRIDGE - Progressive Web App Styles
   A calming, relationship-focused design
   ============================================= */

/* CSS Variables - Our calming color palette */
:root {
  --sage: #9CB5A4;
  --sage-light: #C5D5CA;
  --sage-dark: #7A9982;
  --warm-cream: #FDF8F3;
  --soft-peach: #F5E6DC;
  --dusty-rose: #D4A5A5;
  --warm-gray: #8B8589;
  --charcoal: #3D3D3D;
  --white: #FFFFFF;
  --lavender: #E6E0F0;
  --soft-blue: #B8D4E3;

  --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-medium: 0 6px 24px rgba(0,0,0,0.08);
  --radius-small: 12px;
  --radius-medium: 16px;
  --radius-large: 24px;

  --nav-height: 80px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--warm-cream) 0%, var(--sage-light) 100%);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  height: 100%;
  position: relative;
  background: linear-gradient(180deg, var(--warm-cream) 0%, var(--sage-light) 100%);
  overflow: hidden;
}

/* Screen Management */
.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading Screen */
#loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--warm-cream) 0%, var(--sage-light) 100%);
}

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

.loading-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}

.loading-text {
  font-size: 32px;
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sage-light);
  border-top-color: var(--sage);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

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

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

/* Welcome Screen */
.welcome-content {
  padding: 80px 24px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-emoji {
  font-size: 64px;
  margin-bottom: 24px;
}

.welcome-title {
  font-size: 42px;
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--warm-gray);
  font-weight: 300;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 40px;
}

.quote-box {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--soft-peach) 100%);
  border-radius: var(--radius-large);
  padding: 28px 24px;
  margin-bottom: 40px;
}

.quote-text {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.7;
  font-style: italic;
}

.quote-author {
  font-size: 13px;
  color: var(--warm-gray);
  margin-top: 12px;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--sage);
  color: var(--white);
  margin-top: 16px;
}

.btn-primary:hover {
  background: var(--sage-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--sage-light);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--sage);
  border: 2px solid var(--sage);
  margin-top: 12px;
}

.btn-secondary:hover {
  background: var(--sage-light);
}

.btn-text {
  background: transparent;
  color: var(--sage);
  padding: 12px;
  margin-top: 8px;
}

.btn-small {
  padding: 12px 20px;
  font-size: 14px;
  width: auto;
  margin-top: 0;
}

.back-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--sage);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  margin-bottom: 24px;
}

/* Auth Screens */
.auth-content {
  padding: 60px 24px;
}

.page-title {
  font-size: 28px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--warm-gray);
  margin-bottom: 32px;
}

.auth-form {
  margin-top: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--sage-light);
  border-radius: var(--radius-small);
  background: var(--white);
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: var(--sage);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--warm-gray);
}

.auth-footer a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 500;
}

/* Quiz Screen */
.quiz-content {
  padding: 60px 24px;
}

.progress-container {
  margin-bottom: 40px;
}

.progress-step {
  font-size: 14px;
  color: var(--sage);
  margin-bottom: 8px;
  text-align: center;
}

.progress-bar {
  height: 4px;
  background: var(--sage-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 25%;
}

.quiz-question {
  font-size: 24px;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.4;
  text-align: center;
  margin-bottom: 32px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-option {
  background: var(--white);
  border: none;
  border-radius: var(--radius-medium);
  padding: 20px 24px;
  font-size: 16px;
  font-family: inherit;
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.quiz-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Result Screen */
.result-content {
  padding: 60px 24px;
  text-align: center;
}

.result-emoji {
  font-size: 80px;
  margin-bottom: 24px;
}

.result-label {
  font-size: 24px;
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.result-type {
  font-size: 36px;
  font-weight: 500;
  color: var(--sage);
  margin-bottom: 32px;
}

.result-text {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
}

.result-text:last-child {
  margin-bottom: 0;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-large);
  padding: 24px;
  margin: 0 20px 16px;
  box-shadow: var(--shadow-soft);
}

.card.peach { background: var(--soft-peach); }
.card.blue { background: var(--soft-blue); }
.card.lavender { background: var(--lavender); }

.card.gradient-sage {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--white);
}

.card.gradient-soft {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--soft-blue) 100%);
}

/* Dashboard */
.dashboard-content {
  padding-bottom: calc(var(--nav-height) + 20px);
}

.header {
  padding: 60px 24px 24px;
  text-align: center;
}

.logo {
  font-size: 28px;
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: 2px;
}

.greeting {
  font-size: 14px;
  color: var(--warm-gray);
  margin-top: 4px;
}

/* Connection Card */
.connection-card {
  text-align: center;
  cursor: pointer;
}

.connection-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.connection-value {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 8px;
}

.connection-time {
  font-size: 13px;
  opacity: 0.8;
}

/* Section Labels */
.section-label {
  font-size: 14px;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* Priorities */
.priorities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.priority-item {
  padding: 14px 16px;
  border-radius: var(--radius-small);
  display: flex;
  align-items: center;
  gap: 12px;
}

.priority-item.blue { background: var(--soft-blue); }
.priority-item.peach { background: var(--soft-peach); }
.priority-item.lavender { background: var(--lavender); }

.priority-text {
  font-size: 14px;
  color: var(--charcoal);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 16px;
}

.action-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-large);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  font-family: inherit;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.action-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.action-label {
  font-size: 14px;
  color: var(--charcoal);
}

/* Nudge Card */
.nudge-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
}

.nudge-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.nudge-content {
  flex: 1;
}

.nudge-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.nudge-text {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.5;
}

/* Navigation Bar */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  padding: 12px 20px 28px;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--sage-light);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  padding: 8px;
  font-family: inherit;
}

.nav-item.active {
  opacity: 1;
}

.nav-icon {
  font-size: 24px;
}

.nav-label {
  font-size: 10px;
  color: var(--charcoal);
  font-weight: 500;
}

/* Page Content (with nav padding) */
.page-content {
  padding: 60px 24px calc(var(--nav-height) + 20px);
}

/* Input Toggle */
.input-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.toggle-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: var(--sage);
  color: var(--white);
}

.toggle-btn:not(.active) {
  background: var(--sage-light);
  color: var(--charcoal);
}

/* Text Input */
.text-input {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--sage-light);
  border-radius: var(--radius-small);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
}

.text-input:focus {
  border-color: var(--sage);
}

.text-input.small {
  min-height: 100px;
}

/* Privacy Note */
.privacy-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.privacy-text {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.5;
}

/* Brief Section */
.brief-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brief-icon {
  font-size: 20px;
}

.brief-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
}

.brief-content {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.8;
}

/* Translator */
.translator-label {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.translated-box {
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-small);
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.7;
  margin: 12px 0;
}

.translate-actions {
  display: flex;
  gap: 12px;
}

.translate-actions .btn {
  flex: 1;
}

.feedback-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.feedback-label {
  font-size: 13px;
  color: var(--warm-gray);
}

.feedback-btn {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s;
}

.feedback-btn:hover {
  transform: scale(1.2);
}

/* Pulse Check */
.pulse-label {
  font-size: 12px;
  color: var(--dusty-rose);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.pulse-text {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 16px;
}

.pulse-actions {
  display: flex;
  gap: 12px;
}

.pulse-actions .btn {
  flex: 1;
}

.mood-question {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.mood-options {
  display: flex;
  justify-content: space-around;
}

.mood-btn {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.mood-btn:hover,
.mood-btn.active {
  background: var(--sage-light);
  transform: scale(1.1);
}

/* Timeline */
.timeline-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.timeline-dot.green { background: var(--sage); }
.timeline-dot.rose { background: var(--dusty-rose); }
.timeline-dot.blue { background: var(--soft-blue); }

.timeline-info {
  flex: 1;
}

.timeline-text {
  font-size: 13px;
  color: var(--charcoal);
}

.timeline-time {
  font-size: 12px;
  color: var(--warm-gray);
  margin-top: 2px;
}

/* Report */
.report-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.report-subtitle {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 12px;
}

/* Partner Screen */
.partner-content {
  padding: 60px 24px;
}

.partner-code-section {
  text-align: center;
}

.code-label {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 12px;
}

.code-display {
  font-size: 28px;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.code-input {
  text-align: center;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 20px;
  color: var(--warm-gray);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sage-light);
}

.divider span {
  padding: 0 16px;
  font-size: 14px;
}

.partner-status {
  margin-top: 24px;
  padding: 0 20px;
  text-align: center;
  color: var(--sage);
}

/* Settings */
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--sage-light);
  cursor: pointer;
}

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

.settings-value {
  color: var(--warm-gray);
}

.settings-arrow {
  color: var(--sage);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.toast.show {
  opacity: 1;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-large);
  padding: 24px;
  width: 100%;
  max-width: 360px;
}

.modal-content h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
  margin-top: 0;
}

.priority-type-select {
  display: flex;
  gap: 8px;
}

.type-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
  border: 1px solid var(--sage-light);
  background: var(--white);
  border-radius: var(--radius-small);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.type-btn.active {
  background: var(--sage);
  color: var(--white);
  border-color: var(--sage);
}

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

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .nav-bar {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
}

/* =============================================
   ENHANCED ANIMATIONS & MICRO-INTERACTIONS
   ============================================= */

/* Smooth page transitions */
.screen {
  animation: none;
}

.screen.active {
  animation: screenEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:active {
  transform: scale(0.98);
}

/* Button press effect */
.btn {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

/* Priority item interactions */
.priority-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.priority-item:hover {
  transform: translateX(4px);
}

.priority-item:active {
  transform: scale(0.98);
}

/* Quiz option animations */
.quiz-option {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.quiz-option:active {
  transform: scale(0.97);
  background: var(--sage-light);
}

.quiz-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--sage);
  border-radius: 4px 0 0 4px;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.quiz-option:hover::before {
  transform: scaleY(1);
}

/* Nav bar item effects */
.nav-item {
  transition: all 0.25s ease;
}

.nav-item:active {
  transform: scale(0.9);
}

.nav-item.active .nav-icon {
  animation: navBounce 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Action card hover */
.action-card {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.action-card:active {
  transform: translateY(-2px) scale(0.98);
}

.action-card .action-icon {
  transition: transform 0.3s ease;
}

.action-card:hover .action-icon {
  transform: scale(1.1);
}

/* Mood button animations */
.mood-btn {
  transition: all 0.2s ease;
}

.mood-btn:hover {
  transform: scale(1.15);
}

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

.mood-btn.active {
  animation: moodPop 0.3s ease;
}

@keyframes moodPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.1); }
}

/* Loading spinner enhanced */
.loading-spinner {
  animation: spin 1s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.loading-emoji {
  animation: float 3s ease-in-out infinite;
}

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

/* Toast slide animation */
.toast {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%) translateY(20px);
}

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

/* Form input focus effects */
.form-group input,
.text-input {
  transition: all 0.3s ease;
}

.form-group input:focus,
.text-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(156, 181, 164, 0.2);
}

/* Connection card pulse when not connected */
.connection-card:not(.connected) {
  animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: 0 4px 30px rgba(156, 181, 164, 0.3); }
}

/* Modal animations */
.modal {
  animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
  animation: modalSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Translation result animation */
#translation-result {
  animation: resultReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress bar animation */
.progress-fill {
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Quote box subtle animation */
.quote-box {
  animation: quoteFadeIn 1s ease 0.5s both;
}

@keyframes quoteFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feedback buttons */
.feedback-btn {
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  transform: scale(1.3);
}

.feedback-btn:active {
  transform: scale(1.1);
}

/* Toggle button animation */
.toggle-btn {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.toggle-btn.active {
  animation: togglePop 0.3s ease;
}

@keyframes togglePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Timeline dot pulse */
.timeline-dot {
  animation: dotPulse 2s ease-in-out infinite;
}

.timeline-dot.green { animation-delay: 0s; }
.timeline-dot.rose { animation-delay: 0.3s; }
.timeline-dot.blue { animation-delay: 0.6s; }

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

/* Nudge card attention */
.nudge-card {
  transition: all 0.3s ease;
}

.nudge-card:hover {
  transform: translateX(4px);
}

/* Connection code display */
.code-display {
  transition: all 0.3s ease;
}

.code-display:hover {
  transform: scale(1.02);
  color: var(--sage-dark);
}

/* Result persona reveal */
.result-emoji {
  animation: personaReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes personaReveal {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  60% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.result-type {
  animation: typeReveal 0.5s ease 0.2s both;
}

@keyframes typeReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Haptic feedback simulation (visual) */
@media (hover: none) {
  .btn:active,
  .card:active,
  .quiz-option:active {
    transform: scale(0.97);
  }
}

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