:root {
  --sc-blue-500: #007bff;
  --sc-blue-700: #1558b0;
  --sc-ink: #202938;
  --sc-muted: #687385;
  --sc-canvas: #f5f7fa;
  --sc-surface: #ffffff;
  --sc-border: #e1e7ef;
  --sc-coral: #f26b7a;
  --sc-success: #1ead78;
  --sc-danger: #c63d4d;
  --sc-radius-sm: 12px;
  --sc-radius-md: 16px;
  --sc-radius-lg: 24px;
  --sc-shadow-1: 0 4px 16px rgba(32, 41, 56, .08);
  --sc-shadow-2: 0 10px 28px rgba(32, 41, 56, .12);
  --sc-font-ui: "DM Sans", "Roboto", Arial, sans-serif;
}

/* Foundation: a calm, high-contrast surface system shared by every module. */
html { scroll-behavior: smooth; }
body, button, input, select, textarea { font-family: var(--sc-font-ui); }
body { color: var(--sc-ink); background: var(--sc-canvas); }
a { color: var(--sc-blue-700); }
a:hover { color: var(--sc-blue-500); }
:focus-visible { outline: 3px solid rgba(0, 123, 255, .42); outline-offset: 3px; }
.form-control, .custom-select {
  min-height: 44px;
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius-sm);
  color: var(--sc-ink);
  background: var(--sc-surface);
  box-shadow: none;
}
.form-control:focus, .custom-select:focus {
  border-color: var(--sc-blue-500) !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .16) !important;
}
.btn {
  min-height: 40px;
  border-radius: var(--sc-radius-sm);
  font-family: var(--sc-font-ui);
  font-weight: 700;
  letter-spacing: 0;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary, .publication-compose-launcher__button, .registration-submit {
  border-color: var(--sc-blue-700) !important;
  background: var(--sc-blue-700) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(0, 123, 255, .18);
}
.btn-primary:hover, .btn-primary:focus, .publication-compose-launcher__button:hover, .registration-submit:hover {
  border-color: var(--sc-blue-700) !important;
  background: var(--sc-blue-700) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(21, 88, 176, .23);
}
.btn-outline-primary {
  border-color: var(--sc-blue-500) !important;
  color: var(--sc-blue-700) !important;
  background: var(--sc-surface);
}
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #fff !important; background: var(--sc-blue-500) !important; }
.modal-content, .popover {
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius-md);
  box-shadow: var(--sc-shadow-2);
}
.popover { font-family: var(--sc-font-ui); color: var(--sc-ink); }

/* Public, registration, login and profile forms. */
.registration-page, .access-page {
  background-color: var(--sc-ink);
  background-image: linear-gradient(115deg, rgba(21, 88, 176, .72), rgba(32, 41, 56, .67)), url('../img/background_sendcrushes_3.jpeg');
}
.registration-card, .access-card {
  background: rgba(255, 255, 255, .97);
  border-color: rgba(255, 255, 255, .66);
  border-radius: var(--sc-radius-lg);
  box-shadow: 0 18px 50px rgba(11, 27, 48, .26);
  color: var(--sc-ink);
}
.registration-kicker, .registration-login--mobile, .registration-legal a { color: var(--sc-blue-700); }
.registration-card .form-control { border-color: var(--sc-border) !important; border-radius: var(--sc-radius-sm); }
.registration-card .form-control:focus { border-color: var(--sc-blue-500) !important; box-shadow: 0 0 0 3px rgba(0,123,255,.16); }
.registration-success__icon { color: var(--sc-success); background: rgba(30, 173, 120, .12); }
.help-block, .registration-error, .access-error { color: var(--sc-danger) !important; }

/* Navigation and authenticated shell. */
.app-shell, #page-content-wrapper { background: var(--sc-canvas); }
.app-shell #sidebar-wrapper, .mobile-sidebar, .navbar { background: var(--sc-surface); }
.app-shell #sidebar-wrapper { border-right-color: var(--sc-border); }
.list-group-item { border-color: var(--sc-border); color: var(--sc-ink); }
.list-group-item:hover, .list-group-item:focus { color: var(--sc-blue-700); background: #eef6ff; }
.navbar, .mobile-header { border-color: var(--sc-border) !important; box-shadow: 0 2px 12px rgba(32,41,56,.05); }
.quick-search input, #quick-search-input { border-radius: 999px; border-color: var(--sc-border); }
.quick-search-suggestions, #quick-search-suggestions { border-color: var(--sc-border); box-shadow: var(--sc-shadow-2); }
.mobile-header-actions__button:hover, .mobile-header-actions__button:focus-visible { background: #edf6ff; outline-color: var(--sc-blue-500); }

/* Discovery and social surfaces: photo is primary; context is compact and legible. */
.crushes-gallery, .community-members, .crush-singles-section, .panel-grid-areas--crush-gallery {
  color: var(--sc-ink);
}
.crushes-gallery {
  border-color: var(--sc-border);
  border-radius: var(--sc-radius-md);
  background: var(--sc-surface);
  box-shadow: var(--sc-shadow-1);
}
.crush-gallery-heading__title, .crush-singles-section__header h2, .community-members__title {
  font-family: var(--sc-font-ui);
  color: var(--sc-ink);
  letter-spacing: -.02em;
}
.community-member-card, .crush-single-card {
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow-1);
  background: var(--sc-surface);
}
.community-member-card:hover, .crush-single-card:hover { box-shadow: var(--sc-shadow-2); }
.community-member-card__badge, .crush-single-card__badge, .livingroom-profile__status {
  background: #eaf4ff;
  color: var(--sc-blue-700);
}
.community-discovery__eyebrow, .crush-single-discovery__eyebrow { color: var(--sc-blue-700); }
.community-discovery__filter, .crush-single-discovery__filter {
  border-color: var(--sc-blue-500);
  color: var(--sc-blue-700);
  background: var(--sc-surface);
}
.community-discovery__filter--active, .crush-single-discovery__filter--active { background: var(--sc-blue-500); border-color: var(--sc-blue-500); color: #fff; }
.super-cupids-gallery__more { background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--sc-blue-500) !important; }

/* Trust/status language. */
.is-crush, .crush-status, .connection-status--crush, .badge-crush { color: var(--sc-coral); }
.is-confirmed, .connection-status--confirmed, .badge-success { color: var(--sc-success); }
.badge, .status-badge { border-radius: 999px; font-weight: 700; letter-spacing: .01em; }

/* Living Room: identity and actions are a composed profile surface. */
.livingroom-page { color: var(--sc-ink); }
.livingroom-profile, .livingroom-section__video, .livingroom-section__bio {
  border-color: var(--sc-border);
  box-shadow: var(--sc-shadow-1);
  background: var(--sc-surface);
}
.livingroom-profile__cover { background: linear-gradient(120deg, var(--sc-blue-700), var(--sc-blue-500) 52%, #b9d7f7); }
.livingroom-profile__identity, .livingroom-profile__identity .h5 { color: var(--sc-ink); }
.livingroom-section__label { color: var(--sc-ink); }
.livingroom-profile__actions button { align-items: center; justify-content: center; text-align: center; }

/* Publishing maintains an editorial but approachable feed. */
.publication-compose-launcher, .publication-feed__card, .publication-compose-modal__content {
  border-color: var(--sc-border);
  background: var(--sc-surface);
  box-shadow: var(--sc-shadow-1);
}
.publication-feed__card { border-radius: var(--sc-radius-md); }
.publication-feed__empty { color: var(--sc-muted); }
.publication-media-action { border-color: var(--sc-border); color: var(--sc-blue-700); background: #f6faff; }
.publication-media-action:hover, .publication-media-action:focus { border-color: var(--sc-blue-500); background: #eaf4ff; }
.post-card__author a, .font-name-user { color: var(--sc-ink) !important; }

/* ChatCrush is a calm operational surface, with blue for the user's active intent. */
.chatcrush, .chatcrush__sidebar, .chatcrush__main { background: var(--sc-canvas); }
.chatcrush__sidebar { border-right-color: var(--sc-border); }
.chatcrush__sidebar-header, .chatcrush__search { background: var(--sc-surface); }
.chatcrush__brand, .chatcrush__conversation strong, .chatcrush__empty-state h1 { color: var(--sc-ink); }
.chatcrush__search { border-color: var(--sc-border); }
.chatcrush__search input { color: var(--sc-ink); }
.chatcrush__conversation { border-bottom-color: var(--sc-border); }
.chatcrush__conversation:hover, .chatcrush__conversation.is-active { background: #edf6ff; }
.chatcrush__conversation.is-active { border-left-color: var(--sc-blue-500); }
.chatcrush__unread-count { background: var(--sc-blue-500); color: #fff; }
.chatcrush__empty-state { border-bottom-color: var(--sc-blue-500); }
.chatcrush__empty-icon { background: #eaf4ff; color: var(--sc-blue-700); }
.chatcrush-message--outgoing .chatcrush-message__bubble { background: var(--sc-blue-500); color: #fff; }
.chatcrush-message--incoming .chatcrush-message__bubble { background: var(--sc-surface); border: 1px solid var(--sc-border); color: var(--sc-ink); }
.chatcrush__composer, .chatcrush__composer input { border-color: var(--sc-border); background: var(--sc-surface); }

/* Keep controls comfortable on touch devices without altering desktop density. */
@media (max-width: 767.98px) {
  .btn, .form-control, .custom-select, .publication-media-action, .chatcrush__icon-button { min-height: 44px; }
  .registration-card__body, .access-card { padding: 1.35rem; }
  .crushes-gallery { box-shadow: none; }
  .modal-dialog { margin: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
