/* Global Styles and Variables */
:root {
  --of-blue: #00aff0;
  --of-blue-hover: #008fcd;
  --of-blue-light: #e6f7ff;
  --text-primary: #242529;
  --text-secondary: #8a96a3;
  --bg-primary: #ffffff;
  --bg-secondary: #f6f7f8;
  --border-light: #e6e7eb;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-family);
  background-color: #0f0f10; /* Dark premium desktop backdrop */
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Scrollbar styling for smooth scroll experience */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Mobile Frame Container */
.mobile-container {
  width: 100%;
  max-width: 480px; /* Standard mobile width boundary on desktop */
  height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

@media (max-width: 480px) {
  .mobile-container {
    height: 100dvh; /* Dynamic viewport height for modern mobile browsers */
    max-width: 100%;
    box-shadow: none;
  }
}

/* Sticky App Header Navigation */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
}

/* Class added when content is scrolled down */
.app-header.scrolled {
  background: var(--bg-primary);
  color: var(--text-primary);
  position: sticky;
  top: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  height: 56px;
}

.header-title-container {
  flex-grow: 1;
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-name {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.header-stats {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 1px;
}

.app-header.scrolled .header-stats {
  color: var(--text-secondary);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.app-header.scrolled .icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 60px; /* Height of the sticky footer */
  scroll-behavior: smooth;
}

/* Cover Banner */
.cover-banner {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  background-color: #2c3e50;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Profile Info Section */
.profile-info-section {
  padding: 0 16px 16px 16px;
  position: relative;
}

.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 60px; /* Matches negative margin of avatar for clean alignment */
  margin-bottom: 12px;
}

.avatar-container {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  overflow: hidden;
  position: relative;
  margin-top: -48px; /* Lift avatar into the cover image area */
  background-color: #fff;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.action-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--of-blue);
}

.action-circle-btn:hover {
  background-color: var(--bg-secondary);
  border-color: #ccc;
  transform: scale(1.05);
}

.action-circle-btn.active {
  background-color: var(--of-blue-light);
  border-color: var(--of-blue);
}

.action-circle-btn.active svg path {
  fill: var(--of-blue);
}

/* User Identity Info */
.user-details {
  margin-bottom: 12px;
}

.display-name {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.username {
  font-weight: 400;
}

.separator {
  font-size: 8px;
}

.online-status {
  font-weight: 400;
}

/* Bio */
.profile-bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.profile-bio p {
  margin-bottom: 8px;
}

.profile-bio a {
  color: var(--of-blue);
  text-decoration: none;
  font-weight: 500;
}

.profile-bio a:hover {
  text-decoration: underline;
}

.profile-bio a.secondary-link {
  color: #55c1ef; /* Slightly lighter/faded blue */
}

.profile-bio .page-label {
  color: var(--text-secondary);
}

.more-info-link {
  display: inline-block;
  color: var(--of-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.more-info-link:hover {
  opacity: 0.8;
}

/* Extended Bio collapsible details */
.extended-bio {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease;
  font-size: 13.5px;
  color: #4f5b66;
}

.extended-bio.expanded {
  max-height: 200px;
  margin-top: 10px;
}

.bio-divider {
  border: 0;
  height: 1px;
  background: var(--border-light);
  margin-bottom: 10px;
}

/* Subscription Section */
.subscription-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-primary);
}

.subscription-box {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.sub-header-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.sub-offer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.sub-offer-details {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* Promo Banner inside Sub box */
.promo-banner-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f7f9fa;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.promo-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.promo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Subscribe Button Styling */
.subscribe-btn {
  background-color: var(--of-blue);
  color: #ffffff;
  border: none;
  border-radius: 28px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  width: 100%;
}

.subscribe-btn:hover {
  background-color: var(--of-blue-hover);
}

.subscribe-btn:active {
  transform: scale(0.99);
}

.subscribe-btn.subscribed {
  background-color: #2ecc71; /* Green for success */
}

.sub-text-left {
  letter-spacing: 0.5px;
}

.sub-text-right {
  font-weight: 500;
}

.regular-price-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* Feed Navigation Tabs */
.feed-tabs {
  display: flex;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-primary);
  position: sticky;
  top: 56px; /* Sits right under sticky header */
  z-index: 8;
}

.tab-btn {
  flex: 1;
  padding: 15px 0;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
}

.tab-count {
  font-weight: 700;
  margin-right: 2px;
}

/* Feed Container and Posts */
.feed-container {
  background-color: var(--bg-secondary);
  min-height: 300px;
  position: relative;
}

/* Loader Spinner animation */
.feed-loader {
  display: none; /* Controlled by JS */
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  width: 100%;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 175, 240, 0.1);
  border-radius: 50%;
  border-top-color: var(--of-blue);
  animation: spin 0.8s linear infinite;
}

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

/* Individual Post Card styling */
.feed-post {
  background-color: var(--bg-primary);
  padding: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.post-author-info {
  flex-grow: 1;
}

.post-author-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inline-badge {
  display: inline-flex;
}

.post-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.post-menu-btn {
  color: var(--text-secondary);
  border-radius: 50%;
}

.post-body p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Premium Blurred Content container */
.locked-media-container {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: #2c3e50;
}

.locked-media-blur {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(25px) brightness(0.7);
  transform: scale(1.05); /* Avoid white edges from blur filter */
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.lock-icon-bg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.unlock-btn-inline {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s, background-color 0.2s;
}

.unlock-btn-inline:hover {
  background-color: #f0f0f2;
  transform: scale(1.03);
}

/* Post Action Button rows */
.post-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.post-actions-row {
  display: flex;
  gap: 20px;
}

.post-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.post-action-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.post-action-btn svg {
  transition: transform 0.15s ease, stroke 0.15s, fill 0.15s;
}

.post-action-btn:active svg {
  transform: scale(0.85);
}

.post-action-btn.liked {
  color: #ff4d4f;
}

.post-action-btn.liked svg {
  fill: #ff4d4f;
  stroke: #ff4d4f;
}

.tip-btn {
  margin-left: auto; /* Push tip button to the right */
  color: var(--of-blue);
  background-color: var(--of-blue-light);
  border-radius: 16px;
  padding: 4px 12px;
}

.tip-btn:hover {
  background-color: #d1f0ff;
  color: var(--of-blue-hover);
}

/* Media Tab Grid Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
}

.media-grid-item {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background-color: #2c3e50;
  cursor: pointer;
}

.media-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.media-grid-item.locked .media-grid-img {
  filter: blur(15px) brightness(0.7);
  transform: scale(1.05);
}

.media-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-grid-item:hover .media-grid-img {
  filter: blur(10px) brightness(0.6);
}

/* Sticky App Footer Bottom Navigation */
.app-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  z-index: 10;
}

.footer-nav {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}

.footer-nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 20%;
  transition: color 0.2s;
  position: relative;
}

.footer-nav-item:hover,
.footer-nav-item.active {
  color: var(--of-blue);
}

/* Badges for Notifications / Messages */
.icon-with-badge {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -5px;
  background-color: var(--of-blue);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  border: 2px solid var(--bg-primary);
}

/* Rounded Square "AI" Tab Icon matching screenshot */
.profile-ai-tab {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-icon-container {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid var(--of-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--of-blue-light);
  color: var(--of-blue);
  transition: all 0.2s ease;
}

.footer-nav-item.active .ai-icon-container,
.profile-ai-tab:hover .ai-icon-container {
  background-color: var(--of-blue);
  color: #ffffff;
}

.ai-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Modal Backdrop Styles */
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.visible {
  display: block;
  opacity: 1;
}

/* Modal Cards Shell */
.modal-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
  max-height: 85%;
  flex-direction: column;
}

.modal-card.visible {
  display: flex;
  transform: translateY(0);
}

/* 1. Benefits Modal Specifics */
.benefits-modal {
  padding: 16px;
}

.modal-benefits-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.benefits-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.benefits-user-info {
  display: flex;
  flex-direction: column;
}

.benefits-display-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.benefits-username {
  font-size: 13px;
  color: var(--text-secondary);
}

.benefits-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.benefits-list {
  list-style: none;
  margin-bottom: 24px;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
}

.benefit-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.cta-add-card-btn {
  background-color: var(--bg-primary);
  color: var(--of-blue);
  border: 1px solid var(--of-blue);
  border-radius: 28px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.cta-add-card-btn:hover {
  background-color: var(--of-blue-light);
}

.benefits-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 12px;
}

.modal-text-btn {
  background: none;
  border: none;
  color: var(--of-blue);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  transition: opacity 0.2s;
}

.modal-text-btn:hover {
  opacity: 0.8;
}

.close-modal-btn {
  color: var(--of-blue);
}

/* 2. Card Modal / Add Card Specifics */
.card-modal {
  height: 85%;
  overflow: hidden;
}

.card-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.card-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.billing-details-section {
  display: flex;
  flex-direction: column;
}

.billing-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.billing-info-text {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Floating Input Forms */
.form-group {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  background-color: transparent;
  transition: border-color 0.2s;
}

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

/* Float label logic */
.form-group label {
  position: absolute;
  left: 14px;
  top: 13px;
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
  padding: 0 4px;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 10px;
  font-size: 11px;
  color: var(--of-blue);
  font-weight: 500;
}

/* Grid Layout Rows */
.form-row {
  display: flex;
  gap: 12px;
}

.form-row.two-cols > .form-group {
  flex: 1;
}

/* Selection and dropdown styles */
.select-wrapper {
  margin-bottom: 20px;
}

.select-wrapper label {
  position: absolute;
  top: -8px;
  left: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  padding: 0 4px;
  z-index: 2;
}

.select-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 11px 14px;
  background-color: transparent;
}

.country-flag {
  margin-right: 8px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
}

.select-container select {
  width: 100%;
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 14px;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 20px;
}

.select-arrow {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-secondary);
}

/* Card Number Input extra button */
.card-number-group {
  position: relative;
}

.card-number-group input {
  padding-right: 44px;
}

.scan-card-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--of-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.longer-number-link {
  font-size: 12px;
  color: var(--of-blue);
  text-decoration: none;
  font-weight: 600;
  margin-top: -12px;
  margin-bottom: 20px;
  display: inline-block;
}

.longer-number-link:hover {
  text-decoration: underline;
}

/* Customs Checkbox styling */
.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
  margin-bottom: 24px;
}

.custom-checkbox {
  position: relative;
  cursor: pointer;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: transparent;
  border: 2px solid var(--border-light);
  border-radius: 50%; /* Circle check */
  transition: all 0.2s;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--of-blue);
  border-color: var(--of-blue);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Card logos layout */
.card-logos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  background-color: #f7f9fa;
  padding: 12px;
  border-radius: 4px;
}

.card-logo-img {
  height: 18px;
  object-fit: contain;
  opacity: 0.85;
}

/* Legal text block */
.legal-compliance-text {
  font-size: 10.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  text-align: center;
  margin-bottom: 16px;
}

/* Modal Action Footer buttons */
.card-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-primary);
  z-index: 10;
}

.card-modal-footer .submit-btn {
  color: var(--of-blue);
}

/* 3. OTP Modal Specifics */
.otp-modal {
  max-height: 50%; /* OTP modal is shorter */
}

.otp-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.otp-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.otp-modal-body {
  padding: 24px 32px;
}

.otp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  margin: 0 auto;
}

.otp-label {
  font-size: 13px;
  color: #0033a0; /* Royal bank blue */
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.otp-input-wrapper {
  display: flex;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.otp-input-box {
  width: 100%;
  height: 48px;
  border: 1.5px solid #85b7e9;
  border-radius: 4px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  outline: none;
  background-color: #ffffff;
  letter-spacing: 6px;
}

.otp-input-box:focus {
  border-color: #0033a0;
  background-color: #f7faff;
}

.otp-continue-btn {
  background-color: #0033a0; /* Dark blue matching bank card check */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  width: 100%;
  margin-top: 24px;
  letter-spacing: 0.8px;
  transition: background-color 0.2s;
}

.otp-continue-btn:hover {
  background-color: #002270;
}

.otp-continue-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.otp-resend-wrapper {
  margin-top: 18px;
  text-align: center;
}

.otp-resend-link {
  font-size: 13px;
  color: #0033a0;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.otp-resend-link:hover {
  text-decoration: underline;
}

.otp-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-primary);
}

/* Bank Loading Overlay (Redesigned to match OTP/Screenshot) */
.bank-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: flex-end; /* Align to bottom like modals */
  z-index: 9999;
}

.bank-loading-modal {
  position: relative !important;
  transform: translateY(0) !important;
  display: flex !important;
  width: 100%;
  max-width: 480px; /* Match mobile container width */
}

.bank-verification-container {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0 10px;
}

.bank-title {
  font-size: 20px;
  font-weight: 700;
  color: #242529;
  margin-bottom: 12px;
}

.bank-subtitle {
  font-size: 14px;
  color: #4f5b66;
  line-height: 1.5;
  margin-bottom: 30px;
}

.bank-loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0 40px;
}

.bank-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0033a0; /* Royal bank blue */
  border-radius: 50%;
  animation: spin_bank 1s linear infinite;
  margin-bottom: 15px;
}

.bank-connecting-text {
  font-size: 14px;
  font-weight: 600;
  color: #0033a0;
  letter-spacing: 0.5px;
}

.bank-info-footer {
  margin-top: 20px;
  border-top: 1px solid #e6e7eb;
  padding-top: 15px;
}

.bank-id-label {
  font-size: 11px;
  font-weight: 700;
  color: #8a96a3;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bank-id-value {
  font-size: 13px;
  color: #242529;
  font-weight: 600;
}

@keyframes spin_bank {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
