/* Sunburst Redesign - Vanilla JS version of React component */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: fixed;
}

/* ===== WELCOME SCREEN ===== */
#welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 25%, #be185d 100%);
  background-image: 
    linear-gradient(135deg, rgba(76, 29, 149, 0.85) 0%, rgba(107, 33, 168, 0.85) 25%, rgba(190, 24, 93, 0.85) 100%),
    url('/day_background.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  color: white;
  transition: background-image 0.5s ease;
}

/* Night mode background */
body.night-mode #welcome-screen {
  background-image: 
    linear-gradient(135deg, rgba(30, 27, 75, 0.4) 0%, rgba(15, 23, 42, 0.4) 100%),
    url('/images/night_background.png');
}

/* Animated stars background */
.stars-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

#welcome-screen .content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.welcome-header {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.welcome-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, #fef08a 0%, #fbcfe8 50%, #e9d5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.welcome-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.character-selection {
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.character-selection h2 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.character-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.character-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.875rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.character-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.character-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.character-card:hover::before {
  opacity: 1;
}

.character-card.selected {
  border: 2px solid;
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.character-card.sunny.selected {
  border-color: #fef08a;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(234, 179, 8, 0.4));
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.5), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.character-card.cloudy.selected {
  border-color: #93c5fd;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(99, 102, 241, 0.4));
  box-shadow: 0 0 30px rgba(93, 130, 246, 0.5), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.character-emoji {
  font-size: 3.5rem;
  flex-shrink: 0;
}

.character-info {
  flex: 1;
}

.character-info h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkmark {
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: bold;
}

.character-card.selected .checkmark {
  display: flex;
}

.sunny.selected .checkmark {
  background: #fef08a;
  color: #7c2d12;
}

.cloudy.selected .checkmark {
  background: #93c5fd;
  color: #1e3a8a;
}

.character-info p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.character-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.sunny .tag {
  background: rgba(234, 179, 8, 0.3);
  color: #fef08a;
}

.cloudy .tag {
  background: rgba(147, 197, 253, 0.3);
  color: #93c5fd;
}

.start-button {
  width: 100%;
  padding: 1.25rem;
  border-radius: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(90deg, #fbbf24, #f472b6, #c084fc);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.start-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.start-button:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(244, 114, 182, 0.3);
}

.start-button:not(:disabled):active {
  transform: scale(0.95);
}

.free-messages {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.welcome-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ===== CHAT SCREEN ===== */
#chat-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  background-image:
    linear-gradient(180deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.4)),
    url('/day_background.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  visibility: hidden;
}

#chat-screen.active {
  visibility: visible;
}

/* Night mode chat background */
body.night-mode #chat-screen {
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.3), rgba(7, 12, 20, 0.3)),
    url('/images/night_background.png');
}

.chat-header {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-back-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-companion-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-companion-name {
  color: white;
  font-weight: bold;
  font-size: 1rem;
}

.chat-companion-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.chat-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

/* Floating companion character in corner */
#floating-companion {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 5rem;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.2));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Welcome screen companion character */
.welcome-companion {
  position: fixed;
  top: 60%;
  left: 50%;
  bottom: auto;
  pointer-events: none;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.welcome-companion-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: welcome-float 5s ease-in-out infinite;
}

@keyframes welcome-float {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  50% { transform: translateY(-25px) rotate(3deg); }
}

/* Companion character image (portrait style) */
.companion-image {
  position: fixed;
  width: 140px;
  height: 140px;
  object-fit: contain;
  z-index: 5;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: companion-float 4s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.9;
}

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

/* AI option buttons */
.ai-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.ai-option-btn {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  border: none;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: center;
}

.ai-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.ai-option-btn:active {
  transform: translateY(0px);
}

.message {
  display: flex;
  gap: 0.5rem;
  animation: slideIn 0.3s ease;
  align-items: flex-end;
  width: 100%;
  flex-wrap: nowrap;
}

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

.message.user {
  justify-content: flex-end;
  flex-direction: row-reverse;
  align-items: flex-end;
  width: 100%;
}

.message.ai {
  justify-content: flex-start;
}

.messages-container.hide-user-messages .message.user {
  display: none;
}

.message-emoji {
  font-size: 1.875rem;
  flex-shrink: 0;
}

.message.user .message-emoji {
  display: none;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 75%;
  flex: 0 1 auto;
  min-width: 0;
}

.message-bubble.typing {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem;
}

.message.user .message-bubble {
  background: rgba(168, 85, 247, 0.3);
  color: white;
  border-bottom-right-radius: 0.25rem;
  border: 1px solid rgba(168, 85, 247, 0.5);
  backdrop-filter: blur(5px);
}

.message.ai.sunny .message-bubble {
  background: rgba(251, 146, 60, 0.3);
  color: white;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid rgba(251, 146, 60, 0.5);
  backdrop-filter: blur(5px);
}

.message.ai.cloudy .message-bubble {
  background: rgba(96, 165, 250, 0.3);
  color: white;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid rgba(96, 165, 250, 0.5);
  backdrop-filter: blur(5px);
}

.message-bubble.typing span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  animation: bounce 1.4s infinite;
}

.message-bubble.typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.message-bubble.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-0.5rem);
  }
}

.message-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.25rem;
  padding: 0 0.5rem;
}

.input-area {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  padding: 1rem;
}

.out-of-credits-msg {
  background: linear-gradient(90deg, #fbbf24, #f472b6);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 1rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.out-of-credits-msg:hover {
  transform: scale(1.05);
}

.input-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  max-height: 6rem;
  resize: none;
  font-family: inherit;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.message-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.send-btn {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: none;
  color: white;
  padding: 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
}

.send-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  opacity: 0.5;
}

.send-btn:not(:disabled):hover {
  transform: scale(1.1);
}

.send-btn:not(:disabled):active {
  transform: scale(0.95);
}

.voice-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
}

.voice-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.voice-btn.recording {
  background: rgba(239, 68, 68, 0.5);
  border-color: rgba(239, 68, 68, 0.8);
  animation: pulse 1s infinite;
  font-size: 1.5rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes float-down {
  0% {
    top: -50px;
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    top: calc(100vh - 80px);
    opacity: 0;
  }
}

/* ===== SETTINGS SCREEN ===== */
#settings-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  overflow-y: auto;
  padding: 1.5rem 1.5rem 5rem 1.5rem;
  z-index: 1000;
  visibility: hidden;
}

#settings-screen.active {
  visibility: visible;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.settings-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.settings-header h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.settings-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.menu-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.menu-item.credits .menu-icon {
  background: linear-gradient(135deg, #fbbf24, #f472b6);
}

.menu-item.new-chat .menu-icon {
  background: linear-gradient(135deg, #60a5fa, #a855f7);
}

.menu-item.preferences .menu-icon {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}

.menu-text {
  flex: 1;
}

.menu-text p:first-child {
  color: white;
  font-weight: 600;
}

.menu-text p:last-child {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===== PREFERENCES SCREEN ===== */
#preferences-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.5rem 5rem 1.5rem;
  z-index: 1000;
  visibility: hidden;
}

#preferences-screen.active {
  visibility: visible;
}

.preferences-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.preferences-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.preferences-header h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.preferences-content {
  width: 100%;
  padding: 0 1rem;
}

.preference-section {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.preference-section h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.preference-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.preference-item label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  flex: 1;
}

.preference-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: #ec4899;
}

.preference-item select {
  width: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.preference-item select option {
  background: #1f2937;
  color: white;
}

.preference-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.preference-btn:hover {
  opacity: 0.9;
}

.preference-btn.danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.preference-item span {
  font-size: 1rem;
}
#pricing-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1e293b 0%, #7c3aed 50%, #be185d 100%);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1rem 5rem 1rem;
  z-index: 2000;
  visibility: hidden;
}

#pricing-screen.active {
  visibility: visible;
}

#about-screen,
#timezone-screen,
#journal-screen,
#story-screen,
#profile-viewer-screen,
#payment-email-screen,
#auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 100%);
  background-image: linear-gradient(135deg, rgba(76, 29, 149, 0.95) 0%, rgba(107, 33, 168, 0.95) 100%), url('/day_background.jpg');
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
}

#about-screen.active,
#timezone-screen.active,
#journal-screen.active,
#story-screen.active,
#profile-viewer-screen.active,
#payment-email-screen.active,
#auth-screen.active {
  visibility: visible;
}

.pricing-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pricing-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.pricing-header h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.pricing-plans {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-card {
  border-radius: 1.875rem;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card.unlimited {
  background: linear-gradient(135deg, #fbbf24, #f472b6);
  border-color: #fef08a;
}

.pricing-card.standard,
.pricing-card.starter {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.best-value-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.5rem;
  background: white;
  color: #ec4899;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-weight: bold;
  font-size: 0.75rem;
}

.pricing-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-card.unlimited .pricing-name,
.pricing-card.unlimited .pricing-amount,
.pricing-card.unlimited .pricing-desc {
  color: rgba(255, 255, 255, 0.9);
}

.pricing-card.standard .pricing-name,
.pricing-card.standard .pricing-amount,
.pricing-card.standard .pricing-desc,
.pricing-card.starter .pricing-name,
.pricing-card.starter .pricing-amount,
.pricing-card.starter .pricing-desc {
  color: rgba(255, 255, 255, 0.9);
}

.pricing-amount {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 400;
}

.pricing-desc {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.pricing-card.standard .pricing-desc {
  color: #4ade80;
}

.pricing-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 1rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pricing-card.unlimited .pricing-btn {
  background: white;
  color: #ec4899;
}

.pricing-card.standard .pricing-btn {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
}

.pricing-card.starter .pricing-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.pricing-btn:hover {
  transform: scale(1.05);
}

.pricing-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
  margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  #welcome-screen {
    padding: 0.75rem 1rem;
  }

  .welcome-header {
    margin-bottom: 1rem;
  }

  .welcome-header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }

  .welcome-header p {
    font-size: 0.875rem;
  }

  .character-selection h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .character-cards {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .character-card {
    padding: 0.875rem;
  }

  .character-info h3 {
    font-size: 1rem;
  }

  .character-info p {
    font-size: 0.75rem;
  }

  .chat-header {
    padding: 0.75rem;
  }

  .message {
    max-width: 100%;
  }

  .message-bubble {
    max-width: 100%;
  }

  #settings-screen,
  #pricing-screen {
    padding-bottom: 3rem;
  }

  /* Mobile-sized companion sprites */
  .welcome-companion-image {
    width: 100px;
    height: 100px;
  }

  .companion-image {
    width: 80px;
    height: 80px;
    bottom: 3rem;
    right: 0.75rem;
  }
}

/* Tablet/iPad responsive (768px+) */
@media (min-width: 768px) {
  .welcome-header {
    margin-bottom: 3rem;
  }

  .welcome-header h1 {
    font-size: 3.5rem;
  }

  .welcome-header p {
    font-size: 1.125rem;
  }

  .character-selection {
    gap: 2rem;
  }

  .character-selection h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .character-cards {
    gap: 1.5rem;
  }

  .character-card {
    padding: 1.5rem;
  }

  .character-info h3 {
    font-size: 1.25rem;
  }

  .character-info p {
    font-size: 1rem;
  }

  /* Tablet-sized companion sprites */
  .welcome-companion-image {
    width: 160px;
    height: 160px;
  }

  .companion-image {
    width: 120px;
    height: 120px;
    bottom: 4rem;
    right: 1rem;
  }
}
