:root {
  --main-bg: #e91e63;
  --header-start: #512da8;
  --header-end: #673ab7;
  --card-pink: #f8bbd0;
  --card-white: #ffffff;
  --text-color: #111827;
  --accent: #e91e63;
  --available: #4caf50;
  --busy: #e91e63;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--main-bg);
  color: var(--text-color);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(to bottom, var(--header-start), var(--header-end));
  box-shadow: 0 10px 22px rgba(65, 18, 130, 0.22);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 2px solid #c7d2fe;
  border-radius: 999px;
  background: #fff;
  color: #4338ca;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.brand-block h1 {
  margin: 0;
  font-size: 30px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-block p {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 700;
}

.live-block {
  flex: 0 0 auto;
  text-align: right;
  font-style: italic;
  font-weight: 800;
}

.live-block div {
  font-size: 23px;
  line-height: 1.1;
  text-transform: uppercase;
}

.live-block p {
  margin: 4px 0 0;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.page-shell {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 12px 12px 108px;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.model-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 14px;
  background: var(--card-white);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.model-card.is-pink {
  background: var(--card-pink);
}

.model-image {
  position: relative;
  height: 192px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.model-image img,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.model-name {
  margin: 0;
  overflow: hidden;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 0;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.meta-icon {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.thumb {
  position: relative;
  height: 64px;
  overflow: hidden;
  border-radius: 7px;
  background: #111827;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play-dot span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent);
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 38px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.status-available {
  background: var(--available);
}

.status-busy {
  background: var(--busy);
}

.action-btn {
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  will-change: transform;
}

.action-btn:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.92);
}

.action-btn:focus-visible,
.modal-close:focus-visible,
.primary-modal-btn:focus-visible,
.soft-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.loading-indicator {
  min-height: 24px;
  padding: 18px 0 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.load-sentinel {
  height: 1px;
}

.footer-text {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-align: center;
}

.sticky-download-shell {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 100%, rgba(255, 0, 155, 0.34), transparent 62%),
    linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

.neon-download-btn {
  position: relative;
  display: flex;
  width: min(100%, 320px);
  min-height: 68px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff00bf 0%, #ff2f92 45%, #ff6b22 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 6px 14px rgba(95, 0, 48, 0.4),
    0 0 18px rgba(255, 0, 191, 0.82),
    0 0 38px rgba(255, 80, 41, 0.58);
  text-shadow: 0 2px 4px rgba(95, 0, 48, 0.45);
  pointer-events: auto;
}

.neon-download-btn::before {
  content: "";
  position: absolute;
  inset: 5px 14px auto 18px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.download-title {
  position: relative;
  z-index: 1;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.download-arrow {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1;
}

.download-subtitle {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  left: 0;
  width: 100%;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.contact-btn {
  position: fixed;
  right: 14px;
  bottom: 92px;
  z-index: 45;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card,
.state-card,
.state-panel {
  width: min(100%, 380px);
  border-radius: 14px;
  background: #fff;
  padding: 24px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.state-panel {
  margin: 32px auto;
}

.state-overlay {
  z-index: 90;
}

.modal-card {
  position: relative;
}

.modal-card h2,
.state-card h2,
.state-panel h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}

.modal-card p,
.state-card p,
.state-panel p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-size: 23px;
  line-height: 1;
}

.typing-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.soft-btn,
.primary-modal-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 900;
}

.soft-btn {
  color: #374151;
  background: #e5e7eb;
}

.primary-modal-btn {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 10px rgba(233, 30, 99, 0.4);
}

.full {
  width: 100%;
  margin-top: 14px;
}

.is-busy {
  opacity: 0.82;
  pointer-events: none;
}

body.is-blocked .models-grid,
body.is-blocked .loading-indicator,
body.is-blocked .sticky-download-shell {
  display: none;
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 12px;
  }

  .brand-block h1 {
    font-size: 27px;
  }

  .live-block div {
    font-size: 18px;
  }

  .models-grid {
    grid-template-columns: 1fr;
  }

  .model-image {
    height: 200px;
  }
}

@media (max-width: 390px) {
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-block h1 {
    font-size: 24px;
  }

  .brand-block p {
    font-size: 9px;
  }

  .live-block div {
    font-size: 15px;
  }

  .live-block p {
    font-size: 10px;
  }

  .download-title {
    font-size: 18px;
  }
}
