:root {
  --purple: #8f2fff;
  --cyan: #00d4ff;
  --bg: #05021b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100dvh;
  background: var(--bg);
  color: white;
  overflow-x: hidden;
}

.container {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 0 24px 12px;
  transition: opacity 0.25s ease;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: -20px;
}

.logo img {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.welcome {
  text-align: center;
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.gradient-text {
  text-align: center;
  font-size: clamp(2rem, 4.8vw, 3.625rem);
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.375rem);
  color: #a9a9c3;
  margin-bottom: 35px;
}

.icon-box {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--purple), #3a0ca3);
  overflow: hidden;
}

.icon-box img {
  width: 130%;
  height: 130%;
  object-fit: cover;
}

.option-card {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 24px);
  width: 100%;
  padding: clamp(16px, 2vw, 18px);
  border-radius: 24px;
  background: rgba(15, 15, 40, 0.9);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

@supports (backdrop-filter: blur(12px)) {
  .option-card {
    background: rgba(15, 15, 40, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.option-card.owner.selected {
  box-shadow:
    0 0 12px rgba(127, 45, 255, 0.7),
    0 0 30px rgba(127, 45, 255, 0.45);
  transform: translateY(-2px);
}

.option-card.customer.selected {
  box-shadow:
    0 0 12px rgba(0, 212, 255, 0.7),
    0 0 30px rgba(0, 212, 255, 0.45);
  transform: translateY(-2px);
}

.owner {
  border: 2px solid var(--purple);
}

.customer {
  border: 2px solid var(--cyan);
}

.customer-icon {
  background: linear-gradient(180deg, var(--cyan), #005f99);
}

.text {
  flex: 1;
  min-width: 0;
}

.text h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: 8px;
}

.text p {
  color: #a9a9c3;
  line-height: 1.4;
  font-size: clamp(0.9rem, 1.6vw, 1.125rem);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
  color: #44d9ff;
  font-size: clamp(1.25rem, 2vw, 1.375rem);
}

.divider span {
  flex: 1;
  max-width: 140px;
  height: 2px;
  background: linear-gradient(90deg, #8f2fff, #00d4ff);
}

.or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
  color: #bcbcbc;
}

.or-divider span {
  flex: 1;
  max-width: 300px;
  height: 1px;
  background: #333;
}

.continue-btn {
  width: 100%;
  min-height: 68px;
  padding: 16px 24px;
  border: none;
  border-radius: 20px;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(1.1rem, 2vw, 1.375rem);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition:
    transform 0.2s ease,
    box-shadow 0.3s ease,
    opacity 0.2s ease;
  box-shadow: 0 0 25px rgba(127, 45, 255, 0.35);
}

.continue-btn:active {
  transform: translateY(-2px) scale(0.95);
  box-shadow:
    0 0 40px rgba(0, 212, 255, 0.45),
    0 0 60px rgba(143, 47, 255, 0.4);
}

.continue-btn:focus-visible {
  outline: 3px solid rgba(0, 212, 255, 0.5);
  outline-offset: 3px;
}

.footer-security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  width: 100%;
  flex-wrap: wrap;
}

.footer-security img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.footer-security p {
  font-size: clamp(0.875rem, 1.6vw, 0.875rem);
  line-height: 1.4;
  text-align: center;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #05021b;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: linear-gradient(#8f2fff, #00d4ff);
}

/* ==========================================================
   FIRST PAGE — SKELETON LOADING
========================================================== */

.skeleton-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

/* Base skeleton */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #141a33;
  border-radius: 10px;
}

/* Shimmer animation */

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.13) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after,
  .skeleton-star::after,
  .skeleton-or-text::after {
    animation: none;
  }
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Logo */

.skeleton-logo {
  width: 220px;
  max-width: 70%;
  height: 150px;
  margin: 0 auto 10px;
  border-radius: 50%;
}

/* Welcome */

.skeleton-welcome {
  width: 220px;
  height: 42px;
  margin: 0 auto 16px;
  border-radius: 10px;
}

/* Main title */

.skeleton-title {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.skeleton-title-line {
  display: block;
  width: min(430px, 80%);
  height: 48px;
  border-radius: 10px;
}

.skeleton-title-line.short {
  width: min(320px, 65%);
}

/* Main divider */

.skeleton-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 22px 0;
}

.skeleton-divider span {
  flex: 1;
  max-width: 140px;
  height: 2px;
}

.skeleton-star {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #141a33;
  position: relative;
  overflow: hidden;
}

.skeleton-star::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.13),
    transparent
  );
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

/* Subtitle */

.skeleton-subtitle {
  width: 270px;
  max-width: 75%;
  height: 22px;
  margin: 0 auto 35px;
}

/* Option cards */

.skeleton-option-card {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 24px);
  width: 100%;
  padding: clamp(16px, 2vw, 18px);
  border-radius: 24px;
  border: 2px solid #171b3d;
  background: rgba(15, 15, 40, 0.7);
}

/* Option icon */

.skeleton-option-icon {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 22px;
}

/* Option text */

.skeleton-option-content {
  flex: 1;
  min-width: 0;
}

.skeleton-option-title {
  display: block;
  width: 180px;
  max-width: 70%;
  height: 25px;
  margin-bottom: 12px;
}

.skeleton-option-text {
  display: block;
  width: 260px;
  max-width: 90%;
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-option-text.short {
  width: 190px;
}

/* OR divider */

.skeleton-or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

.skeleton-or-divider span {
  flex: 1;
  max-width: 300px;
  height: 1px;
}

.skeleton-or-text {
  width: 25px;
  height: 14px;
  border-radius: 5px;
  background: #141a33;
  position: relative;
  overflow: hidden;
}

.skeleton-or-text::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.13),
    transparent
  );
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

/* Continue button */

.skeleton-button {
  width: 100%;
  min-height: 68px;
  margin-top: 30px;
  border-radius: 20px;
}

/* Security footer */

.skeleton-security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  width: 100%;
}

.skeleton-security-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.skeleton-security-text {
  width: 250px;
  height: 14px;
}

/* ==========================================================
   SKELETON — RESPONSIVE
========================================================== */

@media (max-width: 640px) {
  .skeleton-logo {
    width: 180px;
    height: 120px;
  }

  .skeleton-welcome {
    width: 180px;
    height: 30px;
  }

  .skeleton-title-line {
    height: 34px;
  }

  .skeleton-title-line.short {
    width: 250px;
  }

  .skeleton-option-card {
    padding: 16px;
    border-radius: 20px;
  }

  .skeleton-option-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .skeleton-option-title {
    width: 150px;
    height: 22px;
  }

  .skeleton-option-text {
    width: 220px;
  }

  .skeleton-button {
    min-height: 56px;
    border-radius: 18px;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .skeleton-logo {
    width: 150px;
    height: 100px;
  }

  .skeleton-welcome {
    width: 150px;
    height: 26px;
  }

  .skeleton-title-line {
    height: 28px;
  }

  .skeleton-title-line.short {
    width: 210px;
  }

  .skeleton-subtitle {
    width: 210px;
    height: 18px;
    margin-bottom: 20px;
  }

  .skeleton-option-card {
    padding: 14px;
  }

  .skeleton-option-icon {
    width: 64px;
    height: 64px;
  }

  .skeleton-option-title {
    width: 130px;
    height: 20px;
  }

  .skeleton-option-text {
    width: 170px;
    height: 13px;
  }

  .skeleton-option-text.short {
    width: 130px;
  }

  .skeleton-button {
    min-height: 52px;
  }

  .skeleton-security-text {
    width: 200px;
    height: 12px;
  }
}

@media (max-width: 360px) {
  .skeleton-logo {
    width: 130px;
    height: 90px;
  }

  .skeleton-title-line {
    height: 24px;
  }

  .skeleton-title-line.short {
    width: 180px;
  }

  .skeleton-option-icon {
    width: 58px;
    height: 58px;
  }

  .skeleton-option-title {
    width: 110px;
  }

  .skeleton-option-text {
    width: 140px;
  }

  .skeleton-button {
    min-height: 48px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 20px 14px;
  }

  .container {
    padding: 24px 18px;
  }

  .option-card {
    padding: 16px;
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .container {
    border-radius: 24px;
    padding: 18px 14px;
    padding-top: clamp(40px, 10vh, 220px);
  }

  .logo {
    margin-bottom: -8px;
  }

  .logo img {
    width: min(180px, 70vw);
  }

  .subtitle {
    margin-bottom: 24px;
  }

  .option-card {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
  }

  .icon-box {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .text h3 {
    margin-bottom: 4px;
  }

  .or-divider {
    margin: 20px 0;
  }

  .continue-btn {
    min-height: 56px;
    border-radius: 18px;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px 10px;
  }

  .container {
    padding: 18px 14px;
    padding-top: clamp(40px, 10vh, 220px);
  }

  .welcome {
    font-size: clamp(1.5rem, 3.4vw, 1.65rem);
  }

  .gradient-text {
    font-size: clamp(1.45rem, 3.2vw, 1.6rem);
  }

  .divider {
    margin: 10px 0 14px;
  }

  .subtitle {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    margin-bottom: 20px;
  }

  .option-card {
    padding: 14px;
  }

  .icon-box {
    width: 64px;
    height: 64px;
  }

  .footer-security p {
    font-size: clamp(0.75rem, 1.6vw, 0.75rem);
  }
}

@media (max-width: 360px) {
  .container {
    padding: 16px 12px;
  }

  .logo img {
    width: 150px;
  }

  .welcome {
    font-size: clamp(1.35rem, 3vw, 1.5rem);
  }

  .gradient-text {
    font-size: clamp(1.3rem, 2.8vw, 1.45rem);
  }

  .text p {
    font-size: clamp(0.8rem, 1.7vw, 0.88rem);
  }

  .continue-btn {
    min-height: 52px;
    font-size: clamp(0.9rem, 2vw, 1rem);
  }
}
