:root {
  --main-bg: #081c28;
  --main-bg-2: #0f2f42;
  --surface: #16394d;
  --surface-2: #1d4963;
  --surface-3: #103146;
  --surface-4: #0b2738;
  --body-text: rgba(255, 255, 255, 0.96);
  --muted-text: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --blue: #00c2ff;
  --green: #00e6b8;
  --yellow: #ffd93d;
  --orange: #ff8a00;
  --pink: #ff6b8b;
  --button-text: #062432;
  --danger: #ff97ab;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.22);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: #0a2634;
  color: var(--body-text);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

#main {
  min-height: 100svh;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

#app {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

#app.inited {
  opacity: 1;
  visibility: visible;
}

#app.inited + #loading-spinner {
  display: none !important;
}

#loading-spinner {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 40, 0.82);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

#loading-spinner .spinner-border {
  color: var(--yellow) !important;
}

header {
  padding: 18px 0 10px;
  background: transparent;
}

header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header .container h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(100%, 460px);
  padding: 0 20px;
  pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
p,
li,
label {
  color: var(--body-text);
}

h1 {
  font-size: clamp(1.3rem, 1.05rem + 1.15vw, 1.95rem);
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.45rem, 1.15rem + 1vw, 1.95rem);
  line-height: 1.18;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.55rem);
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 0.45rem;
}

h4 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 800;
  margin: 0 0 0.65rem;
}

.container {
  margin: 1rem auto;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
}

.logo {
  height: 40px;
}

.logo img,
.logo svg {
  max-width: 100%;
  height: 40px;
}

svg .st0 {
  fill: rgba(255, 255, 255, 0.96) !important;
}

.section {
  flex: 1 1 auto;
  padding: 8px 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--surface-4);
  color: var(--yellow);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--line);
  margin: 0 auto 16px;
}

.hero-intro,
.section-copy,
.small,
.sponsor {
  color: var(--muted-text);
}

.hero-intro {
  text-align: left;
  margin: 0;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.7;
}

#photo-container {
  position: relative;
  width: 100%;
  height: 320px;
  margin: 1.75rem auto 1rem;
}

#photo-container .photo:nth-child(1) {
  top: 18px;
  left: -8px;
  transform: rotate(-13deg);
  z-index: 1;
}

#photo-container .photo:nth-child(2) {
  top: 34px;
  right: -6px;
  transform: rotate(13deg);
  z-index: 2;
}

#photo-container .photo:nth-child(3) {
  top: 88px;
  left: 24%;
  transform: rotate(7deg);
  z-index: 3;
}

#photo-container .photo:nth-child(4) {
  top: -12px;
  left: 40%;
  transform: rotate(-4deg);
  z-index: 4;
}

.photo {
  position: absolute;
  width: 150px;
  height: 196px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.photo:hover {
  transform: scale(1.08) rotate(0deg) !important;
  z-index: 10 !important;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
}

.hero-card,
.panel,
.status-card,
.sponsor-content,
.video-shell,
.modal-content {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(135deg, #19c4ec 0%, #12afd8 52%, #0aa7d6 100%);
  color: #052b39;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  position: relative;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-card::before {
  width: 180px;
  height: 180px;
  right: -48px;
  top: -56px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-card::after {
  width: 110px;
  height: 110px;
  left: -24px;
  bottom: -38px;
  background: rgba(255, 217, 61, 0.18);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card .eyebrow {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(0, 0, 0, 0.08);
  color: #063140;
}

.hero-card .hero-intro {
  color: rgba(5, 43, 57, 0.82);
}

.hero-water-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.splash-shape,
.splash-shape-sm,
.bubble,
.petal,
.drop,
.ring,
.thai-line,
.water-gun {
  position: absolute;
  pointer-events: none;
}

.splash-shape,
.splash-shape-sm {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 46% 54% 51% 49% / 40% 51% 49% 60%;
}

.splash-shape::before,
.splash-shape::after,
.splash-shape-sm::before,
.splash-shape-sm::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.splash-shape::before {
  width: 44%;
  height: 44%;
  left: -7%;
  top: 18%;
}

.splash-shape::after {
  width: 34%;
  height: 34%;
  right: -5%;
  top: -10%;
}

.splash-shape-sm::before {
  width: 32%;
  height: 32%;
  right: -8%;
  bottom: 8%;
}

.splash-shape-sm::after {
  width: 20%;
  height: 20%;
  left: 10%;
  top: -9%;
}

.bubble {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: bubbleFloat 8s ease-in-out infinite;
}

.petal {
  width: 18px;
  height: 28px;
  background: rgba(255, 107, 139, 0.62);
  border-radius: 60% 40% 64% 36% / 62% 50% 50% 38%;
  transform: rotate(24deg);
  animation: drift 7.2s ease-in-out infinite;
}

.petal.orange {
  background: rgba(255, 138, 0, 0.5);
  animation-delay: 1.2s;
}

.drop {
  width: 14px;
  height: 20px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 50% 50% 44% 56% / 62% 58% 42% 38%;
  animation: bob 4.5s ease-in-out infinite;
}

.drop.small {
  width: 10px;
  height: 14px;
  animation-delay: 0.8s;
}

.ring {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: ripple 3.5s ease-in-out infinite;
}

.thai-line {
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 8px;
  opacity: 0.75;
  background:
    radial-gradient(circle at 12px 4px, rgba(255, 217, 61, 0.95) 0 3px, transparent 3.5px),
    radial-gradient(circle at 36px 4px, rgba(255, 217, 61, 0.95) 0 3px, transparent 3.5px),
    linear-gradient(90deg, transparent 0 6px, rgba(255, 217, 61, 0.86) 6px 18px, transparent 18px 24px, rgba(255, 217, 61, 0.86) 24px 36px, transparent 36px 42px);
  background-size: 48px 8px;
  background-repeat: repeat-x;
}

.water-gun {
  width: 98px;
  height: 48px;
  transform: rotate(-13deg);
}

.water-gun span {
  position: absolute;
  display: block;
}

.water-gun .gun-body {
  width: 54px;
  height: 18px;
  left: 18px;
  top: 16px;
  background: var(--orange);
  border-radius: 12px;
}

.water-gun .gun-nozzle {
  width: 28px;
  height: 8px;
  right: 0;
  top: 21px;
  background: var(--blue);
  border-radius: 999px;
}

.water-gun .gun-handle {
  width: 14px;
  height: 22px;
  left: 32px;
  top: 23px;
  background: var(--yellow);
  border-radius: 8px;
  transform: skew(-8deg);
}

.water-gun .gun-tank {
  width: 20px;
  height: 18px;
  left: 6px;
  top: 8px;
  background: var(--pink);
  border-radius: 8px;
}

.water-gun .gun-trigger {
  width: 8px;
  height: 10px;
  left: 44px;
  top: 29px;
  border: 2px solid rgba(0, 0, 0, 0.45);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.water-gun .gun-stream {
  width: 36px;
  height: 6px;
  right: -28px;
  top: 22px;
  background: rgba(0, 194, 255, 0.76);
  border-radius: 999px;
  box-shadow: 10px 0 0 rgba(0, 194, 255, 0.46), 20px 0 0 rgba(0, 194, 255, 0.22);
}

.hero-splash-a {
  width: 150px;
  height: 110px;
  right: 28px;
  top: 22px;
}

.hero-splash-b {
  width: 92px;
  height: 68px;
  left: 22px;
  bottom: 52px;
}

.hero-bubble-a {
  width: 20px;
  height: 20px;
  right: 150px;
  top: 52px;
}

.hero-bubble-b {
  width: 14px;
  height: 14px;
  right: 124px;
  top: 86px;
  animation-delay: 1s;
}

.hero-bubble-c {
  width: 12px;
  height: 12px;
  left: 138px;
  bottom: 68px;
  animation-delay: 2.1s;
}

.hero-petal-a {
  right: 104px;
  top: 24px;
}

.hero-petal-b {
  left: 126px;
  bottom: 84px;
}

.hero-drop-a {
  right: 84px;
  top: 98px;
}

.hero-drop-b {
  right: 54px;
  top: 122px;
}

.hero-ring {
  width: 96px;
  height: 96px;
  right: 22px;
  top: 48px;
}

.hero-gun {
  left: 22px;
  bottom: 26px;
}

.panel,
.status-card,
.sponsor-content {
  background: #173b50;
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
}

.panel {
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.status-card {
  padding: 1.25rem;
  text-align: center;
  position: relative;
}

.waiting-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.waiting-card-main {
  background: #7969ff;
  color: #ffffff;
  border-color: rgba(171, 184, 255, 0.2);
  box-shadow: 0 24px 44px rgba(13, 20, 64, 0.32);
}

.waiting-card-sub {
  background: #7969ff;
  color: #ffffff;
  border-color: rgba(171, 184, 255, 0.18);
  box-shadow: 0 18px 34px rgba(13, 20, 64, 0.24);
}

.waiting-card-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.waiting-card > *:not(.waiting-card-layer) {
  position: relative;
  z-index: 1;
}

.waiting-splash-main {
  width: 164px;
  height: 88px;
  right: -28px;
  top: -12px;
  background: rgba(255, 255, 255, 0.18);
}

.waiting-splash-sub {
  width: 104px;
  height: 68px;
  left: -16px;
  bottom: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.waiting-ring {
  width: 82px;
  height: 82px;
  right: 20px;
  top: 28px;
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.26;
}

.waiting-bubble-a {
  width: 16px;
  height: 16px;
  right: 88px;
  top: 36px;
}

.waiting-bubble-b {
  width: 10px;
  height: 10px;
  right: 118px;
  top: 62px;
  animation-delay: 1s;
}

.waiting-petal-a {
  right: 72px;
  top: 70px;
}

.waiting-petal-b {
  right: 98px;
  top: 52px;
}

.waiting-gun {
  right: -20px;
  top: 72px;
  opacity: 0.5;
  transform: scale(0.64) rotate(-8deg);
}

.waiting-sub-main {
  width: 112px;
  height: 60px;
  right: -16px;
  top: -6px;
  background: rgba(255, 255, 255, 0.15);
}

.waiting-sub-bubble {
  width: 14px;
  height: 14px;
  right: 72px;
  top: 16px;
}

.waiting-sub-line {
  left: 16px;
  right: 16px;
  width: auto;
  bottom: 10px;
  opacity: 0.3;
}

.waiting-card .text-monospace,
.waiting-card p {
  color: rgba(255, 255, 255, 0.93);
}

.waiting-copy p {
  margin: 0 0 0.85rem;
}

.waiting-copy p:last-child {
  margin-bottom: 0;
}

.status-card .spinner-border,
.spinner-border.text-primary {
  color: var(--green) !important;
}

.sponsor {
  text-align: left;
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
}

.sponsor-content {
  padding: 1rem 1.1rem;
}

.file-input {
  cursor: pointer;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  background: #0f2d3d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.file-input::before {
  content: "";
  position: absolute;
  inset: auto -40px -56px auto;
  width: 180px;
  height: 110px;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.16) 0%, rgba(0, 194, 255, 0) 70%);
  pointer-events: none;
}

.file-input::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  height: 8px;
  opacity: 0.5;
  background:
    radial-gradient(circle at 12px 4px, rgba(255, 217, 61, 0.9) 0 3px, transparent 3.5px),
    radial-gradient(circle at 36px 4px, rgba(255, 217, 61, 0.9) 0 3px, transparent 3.5px),
    linear-gradient(90deg, transparent 0 6px, rgba(255, 217, 61, 0.82) 6px 18px, transparent 18px 24px, rgba(255, 217, 61, 0.82) 24px 36px, transparent 36px 42px);
  background-size: 48px 8px;
  background-repeat: repeat-x;
  pointer-events: none;
}

.file-input:hover,
.file-input.dragging {
  border-color: rgba(0, 194, 255, 0.62);
  background: #123549;
  transform: translateY(-1px);
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--yellow) 0%, #fff1a8 100%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.preview-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.delete-image {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #ffffff;
  font-size: 1.7rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
}

.video-shell {
  margin-top: 0;
  background: #000000;
  position: relative;
}

.video-shell video {
  display: block;
  width: 100%;
}

.result-header {
  text-align: left;
  position: relative;
  padding-left: 18px;
}

.result-block + .result-block {
  margin-top: 1rem;
}

.result-block-header,
.result-block-followup {
  background: rgba(23, 59, 80, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.result-block-header {
  padding: 1rem 1.1rem 1rem 1.2rem;
}

.result-block-media {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.result-classic-splash {
  background: #00d7ae;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.2);
  padding: 1rem;
}

.result-classic-splash .result-actions {
  justify-content: space-between;
}

.result-classic-splash .btn-primary {
  --bs-btn-bg: rgba(255, 255, 255, 0.92);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #ffffff;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.92);
  --bs-btn-active-border-color: transparent;
  --bs-btn-color: #083a33;
  --bs-btn-hover-color: #083a33;
  --bs-btn-active-color: #083a33;
  background-image: none;
  box-shadow: 0 10px 20px rgba(4, 58, 51, 0.14);
}

.result-classic-splash .video-shell {
  border-color: rgba(4, 58, 51, 0.18);
  box-shadow: 0 18px 30px rgba(4, 58, 51, 0.18);
}

.result-block-followup {
  padding: 1rem;
}

.result-tip {
  color: var(--muted-text);
  line-height: 1.65;
  font-size: 0.98rem;
}

.result-block-followup .row {
  --bs-gutter-x: 0.75rem;
}

.result-block-followup .btn {
  min-height: 52px;
}

.result-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--yellow) 0%, var(--green) 100%);
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.result-actions .btn {
  margin: 0 !important;
}

form {
  margin-bottom: 1rem;
}

.form-label,
.form-check-label {
  font-size: 1rem;
}

.btn {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-width: 0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

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

.btn-primary {
  --bs-btn-bg: var(--yellow);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #ffe15d;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: #ffd93d;
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-bg: rgba(255, 217, 61, 0.5);
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-color: var(--button-text);
  --bs-btn-hover-color: var(--button-text);
  --bs-btn-active-color: var(--button-text);
  background-image: linear-gradient(135deg, var(--yellow) 0%, #ffe980 100%);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-image: linear-gradient(135deg, #ffe15d 0%, #fff1a8 100%);
}

.btn-primary:active {
  background-image: linear-gradient(135deg, #ffd93d 0%, #ffe980 100%);
}

.btn-secondary {
  --bs-btn-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-border-color: rgba(255, 255, 255, 0.16);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.14);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.22);
  --bs-btn-active-bg: rgba(255, 255, 255, 0.18);
  --bs-btn-active-border-color: rgba(255, 255, 255, 0.22);
  --bs-btn-color: var(--body-text);
}

.btn-sm {
  padding: 10px 16px;
}

.form-control,
.lang-select {
  border-radius: var(--radius-sm);
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--body-text);
  background: #24495f;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.form-control:focus,
.lang-select:focus {
  border-color: rgba(0, 194, 255, 0.62);
  background: #2a5269;
  box-shadow: 0 0 0 0.2rem rgba(0, 194, 255, 0.12);
  color: var(--body-text);
}

.form-check-input {
  margin-top: 0.32em;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.form-check-input:checked {
  background-color: var(--green);
  border-color: var(--green);
}

.error-text {
  color: var(--danger);
  display: inline-block;
  margin-top: 0.5rem;
}

.alert {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.alert-danger {
  background: rgba(255, 107, 139, 0.12);
  color: #ffdbe4;
  border-color: rgba(255, 107, 139, 0.24);
}

a {
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: #ffe980;
}

.modal-content {
  background: linear-gradient(180deg, #1a4359 0%, #103146 100%);
  color: var(--body-text);
}

.modal-header,
.modal-footer {
  border-color: var(--line);
}

.modal-body.text-dark,
.modal-body.text-dark * {
  color: var(--body-text) !important;
}

.btn-close {
  filter: invert(1) brightness(1.1);
}

.face-detection-modal .modal-dialog {
  margin: 0.75rem;
}

.face-detection-modal .modal-content {
  border-radius: 18px;
}

.face-detection-modal .modal-header,
.face-detection-modal .modal-body,
.face-detection-modal .modal-footer {
  padding-left: 1rem;
  padding-right: 1rem;
}

.face-detection-modal .modal-header {
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.face-detection-modal .modal-title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-right: auto;
}

.face-detection-modal .modal-body {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
  font-size: 0.95rem;
}

.face-detection-preview {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.face-detection-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(52vh, 320px);
  object-fit: contain;
  margin: 0 auto;
}

.face-detection-preview-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.face-detection-modal-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.face-detection-modal-footer .btn {
  width: 100%;
  margin: 0;
}

footer {
  margin-top: auto;
  padding: 0 0 30px;
}

footer .container {
  color: var(--muted-text);
  font-size: 0.95rem;
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer-links {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted-text);
}

.socials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--body-text);
}

.language-selector {
  display: inline-flex;
  align-items: center;
}

.lang-select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--yellow) 50%),
    linear-gradient(135deg, var(--yellow) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.text-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--muted-text);
}

.flicker {
  animation: flicker 6s ease-in-out infinite;
}

.transition-opacity {
  transition: opacity 0.3s ease-in-out;
}

.opacity-0 {
  opacity: 0;
}

.opacity-1 {
  opacity: 1;
}

@keyframes bubbleFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: rotate(24deg) translateY(0);
  }

  50% {
    transform: rotate(18deg) translateY(-8px);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0.92);
    opacity: 0.4;
  }

  70% {
    transform: scale(1.05);
    opacity: 0.1;
  }

  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.92;
  }
}

@media (max-width: 767px) {
  header {
    padding-top: 14px;
  }

  header .container {
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
  }

  header .container h1 {
    position: static;
    transform: none;
    width: 100%;
    padding: 0;
    margin-top: 8px;
    text-align: left;
  }

  .logo {
    display: block;
    height: 36px;
  }

  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-card,
  .panel,
  .status-card,
  .sponsor-content {
    border-radius: 16px;
  }

  .hero-card {
    padding: 24px 18px 20px;
  }

  .hero-gun {
    left: 12px;
    bottom: 18px;
    transform: scale(0.88) rotate(-13deg);
    transform-origin: left bottom;
  }

  .hero-splash-a {
    width: 118px;
    height: 88px;
    right: 14px;
    top: 30px;
  }

  .hero-ring {
    width: 72px;
    height: 72px;
    right: 10px;
    top: 62px;
  }

  #photo-container {
    height: 240px;
    margin-top: 1.25rem;
  }

  .photo {
    width: 108px;
    height: 142px;
    border-radius: 12px;
  }

  #photo-container .photo:nth-child(1) {
    top: 22px;
    left: -2px;
  }

  #photo-container .photo:nth-child(2) {
    top: 34px;
    right: -2px;
  }

  #photo-container .photo:nth-child(3) {
    top: 82px;
    left: 22%;
  }

  #photo-container .photo:nth-child(4) {
    top: 0;
    left: 39%;
  }

  .file-input {
    min-height: 260px;
  }

  .result-actions {
    justify-content: space-between;
    gap: 0.75rem;
  }

  .result-actions .btn {
    width: calc(50% - 0.375rem);
  }

  .waiting-gun {
    right: -28px;
    top: 84px;
    transform: scale(0.54) rotate(-8deg);
  }

  .waiting-ring {
    width: 64px;
    height: 64px;
    right: 14px;
    top: 24px;
  }

  .result-block-header,
  .result-block-followup {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .result-block-followup .row {
    --bs-gutter-x: 0.6rem;
  }
}

@media (min-width: 768px) {
  .face-detection-modal .modal-dialog {
    margin: 1.75rem auto;
  }

  .face-detection-modal .modal-header,
  .face-detection-modal .modal-body,
  .face-detection-modal .modal-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .face-detection-modal .modal-title {
    font-size: 1.2rem;
  }

  .face-detection-modal .modal-body {
    font-size: 1rem;
  }

  .face-detection-preview-image {
    max-height: 400px;
  }

  .face-detection-modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }

  .face-detection-modal-footer .btn {
    width: auto;
  }
}
