* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  background: var(--tg-theme-bg-color, #fff);
  color: var(--tg-theme-text-color, #000);
}

/* ===== Gate (non-Telegram) ===== */
.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: #1a1a2e;
  color: #e0e0e0;
}
.gate-inner { text-align: center; }
.gate-icon { font-size: 56px; margin-bottom: 16px; }
.gate-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.gate-text { font-size: 14px; opacity: 0.6; }

/* ===== App ===== */
.app {
  padding: 12px;
  padding-bottom: 24px;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Search ===== */
.search-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 4px 0 8px;
  background: var(--tg-theme-bg-color, #fff);
}

.search-wrap input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--tg-theme-hint-color, #ccc);
  border-radius: 12px;
  background: var(--tg-theme-secondary-bg-color, var(--tg-theme-bg-color, #f5f5f5));
  color: var(--tg-theme-text-color, #000);
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-wrap input:focus {
  border-color: var(--tg-theme-button-color, #3390ec);
}

.search-wrap input::placeholder {
  color: var(--tg-theme-hint-color, #999);
}

/* ===== Count ===== */
.count {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  padding: 4px 2px 8px;
}

/* ===== Movie list ===== */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Movie card ===== */
.card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color, #f0f0f0);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.12s;
}

.card:active {
  opacity: 0.7;
}

/* Poster placeholder */
.card-poster {
  width: 52px;
  height: 68px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  color: #fff;
}

/* Card info */
.card-info {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #999);
  margin-top: 2px;
}

.card-desc {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #888);
  margin-top: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Send arrow */
.card-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tg-theme-button-color, #3390ec);
  color: var(--tg-theme-button-text-color, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-arrow svg {
  width: 18px;
  height: 18px;
}

/* ===== Empty ===== */
.empty {
  text-align: center;
  padding: 40px 16px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
}

.empty-sub {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  margin-top: 4px;
}
