/* === BondMi PWA Dating Styles === */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f2e;
  --bg-card: rgba(20, 20, 60, 0.55);
  --bg-card-hover: rgba(30, 30, 80, 0.7);
  --border-glass: rgba(120, 120, 255, 0.15);
  --border-glass-hover: rgba(150, 150, 255, 0.3);

  --text-primary: #e8e8ff;
  --text-secondary: #9d9dcc;
  --text-muted: #6b6b99;

  --accent-blue: #4d7cff;
  --accent-pink: #ff4d8d;
  --accent-pink-glow: rgba(255, 77, 141, 0.4);
  --accent-gold: #ffd700;
  --accent-green: #00e676;
  --accent-purple: #b44dff;
  --accent-gradient: linear-gradient(135deg, #b44dff, #ff4d8d);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at 20% 15%, rgba(180, 77, 255, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 85%, rgba(255, 77, 141, 0.12) 0%, transparent 40%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(10, 10, 26, 0.7);
  border-left: 1px solid var(--border-glass);
  border-right: 1px solid var(--border-glass);
}

/* Header */
.app-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(15, 15, 46, 0.95);
  position: relative;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.7rem;
  background: rgba(255, 77, 141, 0.2);
  color: var(--accent-pink);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 77, 141, 0.4);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glass-hover);
}

/* Main Content Area */
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 80px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.has-install-banner .app-content {
  padding-bottom: 120px;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

/* Tab Screens */
.tab-screen {
  display: none;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-screen.active {
  display: flex;
}

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

/* === Questionnaire Card (Анкета) === */
.questionnaire-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(180, 77, 255, 0.25);
  background: linear-gradient(180deg, rgba(25, 20, 65, 0.7) 0%, rgba(15, 12, 45, 0.8) 100%);
}

.q-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.partner-avatar-wrap {
  position: relative;
  width: clamp(56px, 16vw, 68px);
  height: clamp(56px, 16vw, 68px);
  flex-shrink: 0;
}

.partner-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 77, 255, 0.4), rgba(255, 77, 141, 0.4));
  border: 2px solid rgba(255, 77, 141, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  box-shadow: 0 0 20px var(--accent-pink-glow);
}

.partner-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--accent-green);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
}

.q-partner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.q-title-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.q-name {
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  display: block;
  word-break: break-word;
}

#partner-name,
#modal-partner-name,
#profile-display-name {
  unicode-bidi: plaintext;
}

#partner-age-wrap,
#modal-partner-age-wrap {
  font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.q-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag-badge {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* Tier Banner */
.q-tier-banner {
  background: rgba(180, 77, 255, 0.15);
  border: 1px solid rgba(180, 77, 255, 0.4);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.q-tier-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.q-tier-val {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
}

/* 3-column Key Metrics */
.q-metrics-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.q-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.q-metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.q-metric-icon {
  font-size: 1.4rem;
}

.q-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.q-metric-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.q-metric-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

/* Astrological Vibe Box */
.q-vibe-box {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.q-vibe-icon {
  font-size: 1.1rem;
}

.q-vibe-text {
  font-size: 0.82rem;
  color: #ffe680;
  line-height: 1.35;
}

/* Zero-PII Note */
.q-notice-box {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 12px;
  line-height: 1.4;
  border-top: 1px dashed var(--border-glass);
  margin-top: 2px;
}

/* Action Buttons in Match View */
.match-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.action-btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 15px 20px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(180, 77, 255, 0.4);
  transition: all 0.2s ease;
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 77, 141, 0.5);
}

.action-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-glass-hover);
}

.action-btn-search {
  background: rgba(180, 77, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(180, 77, 255, 0.35);
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-search:hover:not(:disabled) {
  background: rgba(180, 77, 255, 0.25);
  border-color: rgba(180, 77, 255, 0.6);
}

.action-btn-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cooldown Box */
.search-cooldown-box {
  background: rgba(255, 77, 141, 0.1);
  border: 1px solid rgba(255, 77, 141, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.cooldown-text {
  font-size: 0.85rem;
  color: #ff99bb;
  font-weight: 600;
}

.cooldown-upgrade-btn {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

/* === Chats Tab (Список диалогов) === */
.chats-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.chats-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.chats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-card {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-1px);
}

.chat-card-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.partner-avatar-small {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 77, 255, 0.3), rgba(255, 77, 141, 0.3));
  border: 1.5px solid rgba(255, 77, 141, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.chat-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.chat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-card-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.chat-card-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-card-middle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-badge-mini {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}

.chat-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.chat-card-preview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.chat-unread-dot {
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.chat-muted-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* === Profile Tab === */
.profile-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-user-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
}

.profile-avatar-big {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 77, 255, 0.3), rgba(255, 77, 141, 0.3));
  border: 2px solid var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-user-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.profile-code-badge {
  font-size: 0.78rem;
  background: rgba(180, 77, 255, 0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(180, 77, 255, 0.4);
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-family: monospace;
  display: inline-block;
}

.profile-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.city-search-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.city-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.city-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(180, 77, 255, 0.3);
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #14112e;
  border: 1px solid rgba(180, 77, 255, 0.45);
  border-radius: 14px;
  z-index: 500;
  max-height: 190px;
  overflow-y: auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
  display: none;
}

.city-suggestion-item, .city-item {
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.city-suggestion-item:last-child, .city-item:last-child {
  border-bottom: none;
}

.city-suggestion-item:hover, .city-item:hover {
  background: rgba(180, 77, 255, 0.25);
}

.profile-select {
  width: 100%;
  background: rgba(15, 15, 46, 0.9);
  border: 1px solid var(--border-glass);
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.status-badge-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 350px) {
  .status-badge-box {
    flex-direction: column;
    align-items: stretch;
  }
  .status-badge-box .cooldown-upgrade-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* === Fullscreen Views (Chat & Synastry) === */
.fullscreen-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.fullscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(15, 15, 46, 0.95);
  backdrop-filter: blur(10px);
  gap: 12px;
}

#synastry-header-title {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.fullscreen-header .header-back-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.fullscreen-header .icon-btn {
  flex-shrink: 0;
}

.header-back-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary, #ffffff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.header-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.header-back-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.25);
}

.header-back-btn svg {
  display: block;
  stroke: #ffffff;
}

.chat-partner-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-bubble.incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 4px;
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(180, 77, 255, 0.25);
}

/* Icebreaker Welcome Card in Empty Chat */
.chat-icebreaker-card {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-icebreaker-avatar {
  font-size: 2.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(180, 77, 255, 0.4));
}

.chat-icebreaker-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.chat-icebreaker-sub {
  font-size: 0.84rem;
  color: var(--accent-pink);
  margin-bottom: 8px;
}

.chat-icebreaker-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 290px;
  margin: 0 0 16px;
}

.chat-icebreaker-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.icebreaker-chip {
  background: rgba(180, 77, 255, 0.12);
  border: 1px solid rgba(180, 77, 255, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

[dir="rtl"] .icebreaker-chip {
  text-align: right;
}

.icebreaker-chip:hover,
.icebreaker-chip:active {
  background: rgba(180, 77, 255, 0.28);
  border-color: var(--accent-pink);
  transform: translateY(-1px);
}

.message-time {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 4px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(15, 15, 46, 0.6);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-pink);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.15); opacity: 1; }
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-glass);
  background: rgba(15, 15, 46, 0.95);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.chat-input:focus {
  border-color: var(--accent-pink);
}

.send-btn {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border: none;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(180, 77, 255, 0.3);
  transition: all 0.2s;
}

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

/* Synastry Iframe */
.synastry-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #0a0a1a;
}

/* === Browser Onboarding Overlay === */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: #0a0a1a;
  background-image: 
    radial-gradient(ellipse at 20% 15%, rgba(180, 77, 255, 0.22) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 85%, rgba(255, 77, 141, 0.22) 0%, transparent 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.onboarding-card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 14, 38, 0.98);
  border: 1px solid rgba(180, 77, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  max-height: 94vh;
  overflow-y: auto;
}

.onboarding-card .city-suggestions {
  max-height: 125px;
}

.onboarding-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.step-dot.active {
  background: var(--accent-pink);
  box-shadow: 0 0 10px var(--accent-pink-glow);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover, .lang-btn.active {
  background: rgba(180, 77, 255, 0.25);
  border-color: var(--accent-purple);
}

/* === Bottom Navigation Bar === */
.app-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) 16px;
  border-top: 1px solid var(--border-glass);
  background: rgba(15, 15, 46, 0.98);
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
  background: transparent;
  border: none;
  padding: 4px 12px;
}

.nav-item.active {
  color: var(--accent-pink);
  font-weight: 700;
}

.nav-icon {
  font-size: 1.35rem;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.primary-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(180, 77, 255, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 77, 141, 0.45);
}

.micode-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}

.micode-box {
  width: 52px;
  height: 60px;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--border-glass);
  border-radius: 12px;
  color: #fff;
  outline: none;
}

.micode-box:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(180, 77, 255, 0.5);
}

.micode-box.error {
  border-color: var(--accent-pink) !important;
  box-shadow: 0 0 14px rgba(255, 77, 141, 0.55) !important;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* === Cosmic Filter Bar === */
.cosmic-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(180, 77, 255, 0.1);
  border: 1px solid rgba(180, 77, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cosmic-filter-bar:hover {
  background: rgba(180, 77, 255, 0.16);
  border-color: rgba(180, 77, 255, 0.5);
}

.cosmic-filter-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cosmic-filter-sparkle {
  font-size: 1.1rem;
}

.cosmic-filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cosmic-filter-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Cosmic Toggle Switch */
.cosmic-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cosmic-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cosmic-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-glass);
  transition: .3s;
  border-radius: 24px;
}

.cosmic-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cosmic-toggle-switch input:checked + .cosmic-toggle-slider {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border-color: rgba(255, 77, 141, 0.6);
  box-shadow: 0 0 10px rgba(255, 77, 141, 0.4);
}

.cosmic-toggle-switch input:checked + .cosmic-toggle-slider:before {
  transform: translateX(20px);
}

/* === Chat Header Profile Button & Interaction === */
#view-chat .fullscreen-header {
  padding: 10px 10px;
  gap: 6px;
}


.chat-partner-heading {
  min-width: 0;
  flex: 1;
}

#chat-header-name {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-partner-heading:hover #chat-header-name {
  color: var(--accent-pink);
  text-decoration: underline;
}

.chat-header-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chat-header-action-btn:hover {
  background: rgba(180, 77, 255, 0.2);
  border-color: rgba(180, 77, 255, 0.5);
}

#view-chat .fullscreen-header .icon-btn {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* === Modal Partner Card (From Chat) === */
.partner-modal-card {
  max-width: 380px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.partner-modal-body {
  padding: 16px;
}

.partner-modal-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.partner-modal-top .q-name {
  display: block;
}

/* === Seamless Calculator Modal & Button === */
.link-btn-seamless {
  background: none;
  border: none;
  color: var(--accent-pink);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: opacity 0.2s ease;
}

.link-btn-seamless:hover {
  opacity: 0.85;
}

.calc-modal-card {
  max-width: 520px;
  width: 95%;
  height: 85vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(180, 77, 255, 0.4);
}

.calc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 15, 46, 0.95);
  border-bottom: 1px solid var(--border-glass);
}

.calc-modal-iframe {
  width: 100%;
  flex: 1;
  border: none;
  background: #0a0a1a;
}

/* === Free Version: Auto-Match Status Card & Premium Perks Teaser === */
.auto-match-status-card {
  background: rgba(30, 27, 75, 0.45);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.auto-match-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-match-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

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

.auto-match-status-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e2e8f0;
}

.auto-match-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 46, 0.5);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auto-match-timer-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.auto-match-timer-val {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
}

.auto-match-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* Premium Perks Teaser */
.premium-perks-teaser {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(30, 27, 75, 0.5));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(10px);
}

.premium-teaser-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-teaser-crown {
  font-size: 1.1rem;
}

.premium-teaser-title {
  font-size: 0.9rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-perks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-perks-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #cbd5e1;
}

.premium-perks-list li strong {
  color: #fff;
}

.perk-icon {
  font-size: 0.9rem;
  line-height: 1.1;
  flex-shrink: 0;
}

.premium-teaser-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 4px;
}

.premium-teaser-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.premium-unlimited-badge {
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Inactivity Notice Box in Profile */
.profile-activity-box {
  background: rgba(30, 27, 75, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.activity-notice-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-notice-icon {
  font-size: 0.95rem;
}

.activity-notice-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
}

.activity-notice-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================
   v24 MODERNIZATION: TOASTS, MODALS, SKELETONS, AVATARS
   ========================================================== */

/* Glassmorphic Toast Notifications */
.pwa-toast-container {
  position: fixed;
  top: max(20px, calc(env(safe-area-inset-top, 20px) + 12px));
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 440px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.pwa-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: #14112e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  color: #fff;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s, transform 0.25s;
  cursor: pointer;
}

.pwa-toast.pwa-toast-hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.pwa-toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pwa-toast-msg {
  flex: 1;
  line-height: 1.4;
  font-weight: 500;
}

.pwa-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pwa-toast-close:hover {
  color: #fff;
}

.pwa-toast-success {
  background: #101f28;
  border: 1px solid rgba(16, 185, 129, 0.6);
  border-left: 5px solid #10b981;
}

.pwa-toast-error {
  background: #25131f;
  border: 1px solid rgba(239, 68, 68, 0.6);
  border-left: 5px solid #ef4444;
}

.pwa-toast-warning {
  background: #261e13;
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-left: 5px solid #f59e0b;
}

.pwa-toast-info {
  background: #141b30;
  border: 1px solid rgba(77, 124, 255, 0.6);
  border-left: 5px solid #4d7cff;
}

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

/* === Universal Modals & Overlays === */
.modal-backdrop,
.pwa-modal-overlay,
.pwa-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(8, 7, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.modal-backdrop.fade-out,
.pwa-modal-overlay.fade-out,
.pwa-dialog-backdrop.fade-out {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 14, 38, 0.98);
  border: 1px solid rgba(180, 77, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Seamless Calculator Modal */
.calc-modal-card {
  width: 100%;
  max-width: 480px;
  height: 88vh;
  max-height: 800px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
}

.calc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 15, 46, 0.95);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.calc-modal-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #0a0a1a;
}

/* Custom Dialogs & Confirmation */
.pwa-dialog-card {
  max-width: 360px;
  text-align: center;
  padding: 24px 20px;
}

.pwa-dialog-body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 14px 0 20px 0;
}

.pwa-dialog-actions {
  display: flex;
  gap: 10px;
}

.pwa-dialog-actions button {
  flex: 1;
}

/* Custom Report / Block Modal */
.pwa-report-card {
  max-width: 400px;
}

.pwa-report-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.pwa-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.pwa-radio-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
}

.pwa-radio-label input[type="radio"] {
  accent-color: var(--accent-pink);
}

/* Avatar Selector Grid in Profile */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.avatar-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 0;
  font-size: 1.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.avatar-option.active {
  background: rgba(180, 77, 255, 0.25);
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(180, 77, 255, 0.4);
}

/* Skeleton Loaders & Shimmer */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Message Checkmark Status */
.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}

.msg-time {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
}

.msg-status-check {
  font-size: 0.72rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
}

.msg-status-check.read {
  color: #38bdf8; /* Sky blue double check */
}

/* RTL Helpers */
[dir="rtl"] .header-back-btn svg {
  transform: rotate(180deg);
}

[dir="rtl"] .chat-input-bar .send-btn {
  transform: scaleX(-1);
}

/* ================= PREMIUM PLANS MODAL ================= */
.premium-plans-card {
  background: rgba(18, 14, 33, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 24px;
  padding: 28px 22px 24px;
  width: 92%;
  max-width: 400px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-height: 650px) {
  .premium-plans-card {
    padding: 18px 18px 18px;
    max-height: 94vh;
  }
  .premium-crown-icon {
    font-size: 2rem;
    margin-bottom: 2px;
  }
  .premium-features-list {
    margin-bottom: 12px;
    gap: 8px;
    padding: 10px 14px;
  }
  .premium-header {
    margin-bottom: 10px;
  }
  .premium-price-box {
    margin-bottom: 12px;
  }
}

.premium-header {
  margin-bottom: 18px;
}

.premium-crown-icon {
  font-size: 2.4rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
  animation: floatCrown 3s ease-in-out infinite;
}

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

.premium-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #fff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.35;
}

.premium-features-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 14px 16px;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #f1f5f9;
}

.premium-feature-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 900;
  flex-shrink: 0;
}

.premium-price-box {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.premium-price-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}

.premium-price-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.premium-buy-action-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  border-radius: 16px;
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.premium-buy-action-btn:active {
  transform: scale(0.97);
}

.premium-alt-payment {
  margin-top: 10px;
}

.premium-alt-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.85;
}

.premium-alt-link:hover {
  opacity: 1;
}

.premium-footer-notice {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 14px 0 0;
  line-height: 1.35;
}

/* ================= INSTALL PWA PROMPT BANNER ================= */
.install-prompt-banner {
  position: fixed;
  bottom: 74px;
  left: 14px;
  right: 14px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(22, 18, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 77, 141, 0.35);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 990;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.install-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.84rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-banner-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.install-action-btn {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.install-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px;
  cursor: pointer;
}

@media (max-width: 380px) {
  .install-prompt-banner {
    left: 8px;
    right: 8px;
    padding: 8px 10px;
    gap: 8px;
    bottom: 70px;
  }
  .install-banner-icon {
    font-size: 1.2rem;
  }
  .install-banner-text strong {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .install-banner-text span {
    display: none; /* Conserve space on ultra-narrow screens */
  }
  .install-action-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
    border-radius: 10px;
  }
}

/* === Mobile Landscape Support (Height <= 500px) === */
@media (orientation: landscape) and (max-height: 500px) {
  .app-header {
    height: 42px;
    padding: 0 14px;
  }
  .header-logo {
    font-size: 1.1rem;
  }
  .app-nav {
    height: 48px;
    padding: 2px 10px;
  }
  .nav-item {
    font-size: 0.68rem;
    gap: 2px;
  }
  .nav-icon {
    font-size: 1.1rem;
  }
  .app-content {
    padding: 10px 14px 60px 14px;
  }
  .chat-icebreaker-card {
    padding: 8px 14px;
    margin: 4px auto 8px auto;
    gap: 6px;
    max-width: 90%;
  }
  .chat-icebreaker-avatar {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
  .chat-icebreaker-title {
    font-size: 0.95rem;
  }
  .chat-icebreaker-sub {
    font-size: 0.75rem;
  }
  .chat-icebreaker-desc {
    display: none; /* Conserve vertical space in landscape */
  }
  .chat-icebreaker-chips {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .icebreaker-chip {
    padding: 5px 10px;
    font-size: 0.72rem;
    width: auto;
  }
  .chat-header {
    padding: 6px 14px;
  }
  .partner-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
  .chat-input-bar {
    padding: 6px 12px;
  }
}


