/* =========================================================
   Profile Screen — Liquid Glass Design System
   ========================================================= */

#profile-screen {
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px calc(var(--safe-bottom, 0px) + 90px) 16px;
  gap: 18px;
  background: var(--app-bg);
  -webkit-overflow-scrolling: touch;
}

/* Ensure flex children never squish or clip inside scrollable profile screen */
#profile-screen > * {
  flex-shrink: 0;
  width: 100%;
}

/* ---------------------------------------------------------
   1. Liquid Glass Profile Hero Card
   --------------------------------------------------------- */
.profile-hero-card {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  background: var(--glass-card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Clean Avatar */
.profile-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.profile-avatar-halo {
  display: none;
}

.profile-hero-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-card);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
  display: block;
}

.profile-status-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45);
}

.profile-status-badge.badge-status-sleep {
  background: rgba(107, 114, 128, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* User Details */
.profile-hero-details {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-hero-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.profile-meta-handle, .profile-handle-pill {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.profile-meta-handle.has-id, .profile-handle-pill.has-id {
  color: var(--text-secondary);
}

.profile-meta-dot {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.6;
}

.profile-meta-id, .profile-id-pill {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: inherit;
  background: transparent;
  border: none;
  padding: 0;
}

.profile-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 0;
}

/* ---------------------------------------------------------
   2. Clean Flush Engagement Metrics Row
   --------------------------------------------------------- */
.profile-metrics-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 12px 0 2px 0;
  box-shadow: none;
}

.metric-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: default;
}

.metric-item:active {
  transform: scale(0.96);
}

.metric-icon-wrap {
  display: none;
}

.metric-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

/* ---------------------------------------------------------
   3. Bio Text Box
   --------------------------------------------------------- */
.profile-bio-box {
  position: relative;
  z-index: 1;
  width: 100%;
}

.profile-bio-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
  padding: 8px 0 0 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: 0;
  font-style: normal;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------------------------------------------------
   4. Edit Section & Liquid Glass Forms
   --------------------------------------------------------- */
.profile-section-header, .profile-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 8px 0 2px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

/* ---------------------------------------------------------
   4. Edit Section & iOS Inset Grouped Form
   --------------------------------------------------------- */
.profile-section-header, .profile-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 0 6px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

/* iOS Grouped Form Container */
.ios-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.ios-section-header {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--text-muted, #8e8e93);
  margin: 14px 14px 6px 14px;
}

.ios-section-header:first-of-type {
  margin-top: 6px;
}

.ios-section-footer {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-muted, #8e8e93);
  margin: 6px 14px 10px 14px;
}

/* iOS Inset Card */
.ios-inset-group {
  position: relative;
  background: var(--surface-card, rgba(28, 28, 30, 0.75));
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 16px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .ios-inset-group {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* iOS Table Rows */
.ios-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  background: transparent;
  transition: background 0.15s ease;
}

/* iOS Hairline Separator */
.ios-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 0;
  height: 0.5px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

[data-theme="light"] .ios-row:not(:last-child)::after {
  background: rgba(60, 60, 67, 0.12);
}

.ios-row-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  flex: 0 0 auto;
  min-width: 70px;
  margin: 0;
  cursor: pointer;
  letter-spacing: -0.2px;
}

.ios-row-field {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

/* iOS Inputs */
.ios-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, sans-serif;
  text-align: right;
  width: 100%;
  outline: none;
  padding: 13px 0;
  letter-spacing: -0.2px;
}

.ios-input::placeholder {
  color: var(--text-muted, rgba(235, 235, 245, 0.3));
}

.ios-input-number {
  max-width: 90px;
}

/* iOS City Row & Location Pill */
.ios-city-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.ios-city-field .ios-input {
  text-align: right;
  flex: 1;
  min-width: 0;
}

.ios-pill-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-subtle, rgba(var(--accent-rgb, 0, 122, 255), 0.14));
  color: var(--accent, #007aff);
  border: 1px solid var(--accent-glow, rgba(var(--accent-rgb, 0, 122, 255), 0.3));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ios-pill-btn:active {
  transform: scale(0.95);
  opacity: 0.85;
}

/* iOS Segmented Control */
.ios-row-segmented {
  padding: 8px 10px;
}

.ios-segmented-control {
  display: flex;
  background: rgba(118, 118, 128, 0.22);
  border-radius: 10px;
  padding: 2.5px;
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .ios-segmented-control {
  background: rgba(118, 118, 128, 0.14);
}

.ios-segmented-control .chip-btn {
  flex: 1;
  min-height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  padding: 0 4px;
}

.ios-segmented-control .chip-btn:active {
  transform: scale(0.97);
}

.ios-segmented-control .chip-btn.selected {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow, rgba(0, 0, 0, 0.25));
}

/* iOS Bio Textarea & Counter */
.ios-row-textarea {
  padding: 14px 16px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ios-textarea {
  width: 100%;
  min-height: 88px;
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  padding: 0;
  box-sizing: border-box;
}

.ios-textarea::placeholder {
  color: var(--text-muted, rgba(235, 235, 245, 0.3));
}

.ios-char-counter {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #8e8e93);
  font-variant-numeric: tabular-nums;
  padding-bottom: 4px;
}

/* iOS Action Buttons */
.ios-actions-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
  padding: 0 2px;
}

.ios-btn-primary, .btn-primary {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: none;
  outline: none;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s ease;
}

.ios-btn-primary:active, .btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.ios-btn-secondary, .btn-secondary {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: var(--surface-glass, rgba(120, 120, 128, 0.16));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
}

[data-theme="light"] .ios-btn-secondary, [data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.ios-btn-secondary:active, .btn-secondary:active {
  transform: scale(0.98);
  background: var(--surface-hover, rgba(120, 120, 128, 0.24));
}

/* Fallbacks for older style classes */
.edit-card {
  border-radius: 16px;
}
.form-input {
  border-radius: 12px;
}

/* =========================================================
   Detailed Profile Modal — iOS Bottom Sheet (viliket/pure-web-bottom-sheet)
   ========================================================= */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: none;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.profile-modal.active {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: rgba(24, 28, 36, 0.96);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 0 16px calc(var(--safe-bottom, 0px) + 24px) 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.65);
  transform: translate3d(0, 100%, 0);
  will-change: transform;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}

.modal-sheet::-webkit-scrollbar {
  display: none;
}

.sheet-handle-wrap {
  width: 100%;
  padding: 12px 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sheet-handle-wrap:active,
.modal-sheet.dragging .sheet-handle-wrap {
  cursor: grabbing;
}

.sheet-handle-wrap:active .sheet-handle,
.modal-sheet.dragging .sheet-handle {
  background: rgba(255, 255, 255, 0.65);
  transform: scaleX(1.15);
}

.gallery-container {
  width: 100%;
  max-width: 100%;
  height: 340px;
  border-radius: 20px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  background: #12151b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.gallery-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.profile-info-block {
  padding: 0 4px;
}

.profile-full-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: #ffffff;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

@keyframes inputFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
    border-color: var(--accent);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.25);
    border-color: var(--accent);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
}

.form-input-focus-pulse {
  animation: inputFocusPulse 1.8s ease-out;
  border-color: var(--accent) !important;
}

/* =========================================================
   Profile Premium Card — Apple Cupertino Minimalist Style
   ========================================================= */
.my-premium-star {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.profile-premium-card {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card, 16px);
  background: var(--surface-card, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px 14px;
  box-sizing: border-box;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-premium-card:active {
  transform: scale(0.985);
}

[data-theme="light"] .profile-premium-card {
  background: var(--surface-card, rgba(255, 255, 255, 0.85));
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.premium-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.premium-card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .premium-card-icon-wrap {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.premium-star-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

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

.premium-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.premium-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.premium-card-subtitle {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.btn-premium-cta {
  flex-shrink: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 9999px;
  border: none;
  background: var(--accent, #007aff);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow, rgba(0, 122, 255, 0.25));
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn-premium-cta:active {
  transform: scale(0.96);
  opacity: 0.88;
}

.btn-premium-cta img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Active Premium Profile Card Modifier */
.profile-premium-card.is-active {
  border-color: rgba(0, 122, 255, 0.35);
  background: rgba(0, 122, 255, 0.05);
}

[data-theme="light"] .profile-premium-card.is-active {
  border-color: rgba(0, 122, 255, 0.25);
  background: rgba(0, 122, 255, 0.03);
}

/* =========================================================
   Premium Bottom Sheet Modal (#premium-modal) — Apple In-App Purchase Style
   ========================================================= */
.premium-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.premium-modal.active {
  display: flex;
}

.premium-modal .modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-modal.active .modal-backdrop {
  opacity: 1;
}

.premium-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.5);
  padding: 10px 18px calc(var(--safe-bottom, 0px) + 24px) 18px;
  box-sizing: border-box;
  transform: translate3d(0, 100%, 0);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="light"] .premium-sheet {
  background: rgba(246, 246, 246, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.12);
}

.premium-modal.active .premium-sheet {
  transform: translate3d(0, 0, 0);
}

.premium-modal-header {
  text-align: center;
  padding: 2px 12px 0 12px;
}

.premium-modal-star-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .premium-modal-star-wrap {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.premium-modal-star-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.premium-modal-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  margin: 0 0 5px 0;
}

.premium-modal-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 auto;
  line-height: 1.38;
  max-width: 320px;
}

/* Plans Grid — Apple Cupertino Selection Rows/Cards */
.premium-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.premium-plan-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 13px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="light"] .premium-plan-card {
  background: rgba(0, 0, 0, 0.03);
  border: 1.5px solid rgba(0, 0, 0, 0.07);
}

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

.premium-plan-card.selected {
  border-color: var(--accent, #007aff);
  background: rgba(0, 122, 255, 0.08);
  box-shadow: 0 0 0 1px var(--accent, #007aff);
}

[data-theme="light"] .premium-plan-card.selected {
  background: rgba(0, 122, 255, 0.06);
}

.plan-badge-top {
  position: absolute;
  top: -8px;
  right: 10px;
  background: var(--accent, #007aff);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

.plan-badge-top.badge-discount {
  background: rgba(52, 199, 89, 0.16);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
  box-shadow: none;
}

[data-theme="light"] .plan-badge-top.badge-discount {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
  border-color: rgba(52, 199, 89, 0.25);
}

.plan-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  position: relative;
  flex-shrink: 0;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

[data-theme="light"] .plan-radio-circle {
  border-color: rgba(0, 0, 0, 0.25);
}

.premium-plan-card.selected .plan-radio-circle {
  border-color: var(--accent, #007aff);
  background: var(--accent, #007aff);
}

.premium-plan-card.selected .plan-radio-circle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
}

.plan-info {
  display: flex;
  flex-direction: column;
}

.plan-days {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.plan-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.25;
}

.plan-price-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.plan-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.plan-star {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.premium-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.btn-premium-pay {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: none;
  background: var(--accent, #007aff);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow, rgba(0, 122, 255, 0.3));
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-premium-pay:active {
  transform: scale(0.98);
  opacity: 0.88;
}

.btn-premium-pay img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.premium-modal-note {
  font-size: 11.5px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
  opacity: 0.75;
}

