:root {
  --bg-start: #0e63d8;
  --bg-end: #0a4fb0;
  --modal-bg: #ffffff;
  --header-bg: #f2f4f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.home-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 1;
}

.screen {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  background: #f0f2f5;
  overflow: hidden;
}

.fb-desktop-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #f0f2f5;
  filter: blur(5px);
  opacity: 0.72;
  pointer-events: none;
  transform: scale(1.03);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.fb-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.fb-topbar {
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid #dddfe2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.fb-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.fb-topbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 24px;
}

.fb-search {
  background: #f0f2f5;
  border-radius: 20px;
  padding: 10px 16px;
  color: #65676b;
  font-size: 14px;
  min-width: 200px;
  max-width: 240px;
}

.fb-topbar-center {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.fb-nav-icon {
  width: 112px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #65676b;
  font-size: 22px;
}

.fb-nav-icon.active {
  color: #1877f2;
  border-bottom: 3px solid #1877f2;
  border-radius: 0;
}

.fb-topbar-right {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.fb-topbar-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e4e6eb;
}

.fb-desktop-layout {
  display: grid;
  grid-template-columns: 280px minmax(420px, 680px) 300px;
  gap: 24px;
  justify-content: center;
  padding: 16px 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.fb-sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fb-side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #050505;
  font-size: 15px;
  font-weight: 600;
}

.fb-side-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e4e6eb;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.fb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bcc0c4, #e4e6eb);
  flex-shrink: 0;
}

.fb-avatar.sm {
  width: 40px;
  height: 40px;
}

.fb-avatar.xs {
  width: 32px;
  height: 32px;
}

.fb-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fb-stories {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fb-story {
  width: 112px;
  height: 200px;
  border-radius: 8px;
  background: linear-gradient(180deg, #dddfe2, #bcc0c4);
  flex-shrink: 0;
}

.fb-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fb-composer-input {
  flex: 1;
  background: #f0f2f5;
  border-radius: 20px;
  padding: 10px 16px;
  color: #65676b;
  font-size: 15px;
}

.fb-post {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fb-post-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.fb-post-head strong {
  display: block;
  font-size: 15px;
  color: #050505;
}

.fb-post-head small {
  color: #65676b;
  font-size: 13px;
}

.fb-post-text {
  font-size: 15px;
  color: #050505;
  margin-bottom: 10px;
}

.fb-post-image {
  height: 280px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dfe3e8, #c8ccd1);
}

.fb-sidebar-right h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #65676b;
  font-weight: 600;
}

.fb-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #050505;
  margin-bottom: 4px;
}

.fb-sponsored {
  margin-top: 20px;
}

.fb-ad {
  height: 120px;
  border-radius: 8px;
  background: #e4e6eb;
  margin-bottom: 10px;
}

.warning-text {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 4.2vw, 54px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.modal {
  width: min(62vmin, 560px);
  min-height: min(62vmin, 560px);
  height: auto;
  display: flex;
  flex-direction: column;
  background: var(--modal-bg);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  position: relative;
  z-index: 3;
  animation: slow-bounce 4.8s ease-in-out infinite;
}

body.security-mode .home-page {
  display: none;
}

.modal-top-square {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: #ffffff;
  border-radius: 0;
  z-index: 100;
  padding: clamp(20px, 4vmin, 40px);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

.modal-top-square.is-active {
  display: flex;
  cursor: none;
}

.mouse-blocker {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  cursor: none;
  background: transparent;
}

.modal-top-square.is-active .mouse-blocker {
  display: block;
  pointer-events: auto;
}

.escape-datetime {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 220;
  padding: 24px 32px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 12px;
  text-align: center;
  color: #ffffff;
  pointer-events: none;
}

.escape-datetime.is-visible {
  display: block;
}

.escape-datetime-date {
  margin: 0 0 10px;
  font-size: clamp(16px, 2.5vmin, 22px);
  font-weight: 600;
  text-transform: capitalize;
}

.escape-datetime-time {
  margin: 0;
  font-size: clamp(28px, 4vmin, 40px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.security-reduced .modal-top-square {
  inset: 8%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

body.security-mode,
body.security-mode * {
  cursor: none !important;
  user-select: none;
}

body.security-mode button,
body.security-mode a {
  pointer-events: none;
}

.security-page {
  width: min(92vw, 760px);
  padding-bottom: clamp(20px, 4vmin, 40px);
  pointer-events: none;
}

.access-modal {
  width: 100%;
  margin-bottom: clamp(14px, 2.5vmin, 20px);
  padding: clamp(16px, 3vmin, 24px);
  background: rgba(0, 0, 0, 0.88);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.access-modal p {
  margin: 0 0 clamp(10px, 2vmin, 16px);
  color: #ffffff;
  font-size: clamp(14px, 2.2vmin, 20px);
  line-height: 1.5;
  text-align: left;
}

.access-modal p:last-child {
  margin-bottom: 0;
}

.black-modal-blue-box {
  background: #0e63d8;
  border-radius: 8px;
  padding: clamp(14px, 2.5vmin, 20px);
  text-align: center;
  margin-bottom: clamp(14px, 2.5vmin, 20px);
}

.black-modal-blue-box p {
  margin: 0 0 clamp(8px, 1.5vmin, 12px);
  color: #ffffff;
  font-size: clamp(14px, 2.2vmin, 18px);
  font-weight: 700;
  text-align: center;
}

.black-modal-defender {
  margin-bottom: 0 !important;
  font-weight: 600;
}

.scan-modal {
  margin-top: clamp(18px, 3vmin, 28px);
  padding: clamp(16px, 3vmin, 24px);
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.scan-modal-title {
  margin: 0 0 clamp(8px, 1.5vmin, 12px);
  font-size: clamp(16px, 2.4vmin, 22px);
  font-weight: 800;
  color: #111827;
}

.scan-modal-error {
  margin: 0 0 clamp(10px, 2vmin, 14px);
  font-size: clamp(14px, 2vmin, 18px);
  font-weight: 700;
  color: #b91c1c;
}

.scan-modal-text,
.scan-modal-support {
  margin: 0 0 clamp(10px, 2vmin, 14px);
  font-size: clamp(13px, 1.9vmin, 16px);
  line-height: 1.5;
  color: #374151;
}

.scan-modal-support {
  font-weight: 700;
  color: #111827;
}

.scan-modal-actions {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vmin, 12px);
  margin-top: clamp(14px, 2.5vmin, 20px);
}

.scan-btn {
  width: 100%;
  min-height: clamp(42px, 5.5vmin, 50px);
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: clamp(13px, 1.8vmin, 16px);
  font-weight: 700;
  cursor: pointer;
}

.scan-btn-now {
  background: #0e63d8;
  color: #ffffff;
}

.scan-btn-later {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

body.security-mode {
  background: #ffffff;
}

.modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(12px, 3vmin, 20px);
  gap: clamp(10px, 2vmin, 16px);
}

.fb-submodal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: clamp(5px, 1vmin, 8px) clamp(12px, 2vmin, 16px);
  background: #1877F2;
}

.fb-logo svg {
  width: clamp(24px, 3.5vmin, 30px);
  height: clamp(24px, 3.5vmin, 30px);
  display: block;
}

.fb-close {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: clamp(20px, 2.8vmin, 24px);
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: clamp(22px, 3.2vmin, 28px);
  height: clamp(22px, 3.2vmin, 28px);
}

.fb-submodal-separator {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.modal-top {
  text-align: center;
}

.warning-icon {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(8px, 1.8vmin, 12px);
}

.warning-icon svg {
  width: clamp(44px, 7vmin, 58px);
  height: clamp(44px, 7vmin, 58px);
}

.modal-title {
  margin: 0;
  text-align: center;
  font-size: clamp(15px, 2.2vmin, 20px);
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
}

.modal-message {
  margin: clamp(10px, 2vmin, 18px) 0 0;
  text-align: center;
  font-size: clamp(12px, 1.7vmin, 15px);
  line-height: 1.45;
  color: #374151;
}

.sub-modal {
  margin-top: clamp(12px, 2.5vmin, 20px);
  padding: clamp(10px, 2vmin, 16px);
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: clamp(8px, 1.8vmin, 12px);
  text-align: left;
}

.sub-modal-icon {
  flex-shrink: 0;
}

.sub-modal-icon svg {
  width: clamp(22px, 3.2vmin, 28px);
  height: clamp(22px, 3.2vmin, 28px);
  display: block;
}

.sub-modal-details p {
  margin: 0 0 clamp(6px, 1.2vmin, 10px);
  font-size: clamp(11px, 1.5vmin, 14px);
  line-height: 1.4;
  color: #1f2937;
}

.sub-modal-details p:last-child {
  margin-bottom: 0;
}

.modal-bottom {
  margin-top: auto;
}

.modal-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8vmin, 12px);
}

.modal-btn {
  width: 100%;
  min-height: clamp(42px, 5.5vmin, 52px);
  padding: clamp(8px, 1.5vmin, 12px) clamp(10px, 2vmin, 16px);
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: clamp(13px, 1.8vmin, 16px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.modal-btn-allow {
  background: #0f9d58;
  color: #ffffff;
}

.modal-btn-deny {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

.modal-btn:active {
  transform: translateY(1px);
}

.ticker {
  position: relative;
  flex-shrink: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: 58px;
  background: linear-gradient(180deg, #3a3a3a, #181818);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  z-index: 3;
}

.support-card {
  display: none;
  position: fixed;
  right: 12px;
  left: auto;
  bottom: calc(58px + 12px);
  z-index: 201;
  width: 220px;
  padding: 14px 16px 10px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  pointer-events: none;
}

.modal-top-square.is-active .support-card {
  display: block;
}

.support-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.support-card-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.support-card-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.support-card-brand {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.support-card-subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.3;
}

.support-card-phone {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.2;
}

.support-card-label {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.3;
}

.support-card-arrow {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1;
}

.ticker-text {
  margin: 0;
  line-height: 58px;
  color: #f3f3f3;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
  padding-left: 100%;
  animation: ticker-scroll 11s linear infinite;
}

@keyframes slow-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(6px);
  }
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-130%);
  }
}
