:root {
  --bg: #000;
  --text: #fff;
  --text-muted: #aaa;
  --text-subtle: #666;
  --border: rgba(255, 255, 255, 0.12);
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-brand: "ZCOOL QingKe HuangYou", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --chinese-weight: 700;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app {
  min-height: 100vh;
  background: var(--bg);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.logo {
  font-family: var(--font-brand);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions input {
  width: 170px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.header-actions input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-actions input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.header-actions button {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 6px;
  padding: 10px 18px;
  transition: background 0.2s, transform 0.1s;
}

.header-actions button:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.header-actions button:active {
  transform: translateY(0);
}

.hidden,
[hidden] {
  display: none !important;
}

/* Main */
.main {
  width: 100%;
  background: var(--bg);
}

/* Footer / admin login */
.site-footer {
  padding: 60px 32px 80px;
  text-align: center;
  background: var(--bg);
}

.admin-login-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.admin-login-link:hover {
  color: var(--text-muted);
}

.login-form {
  padding: 24px;
}

.modal-content--small {
  max-width: 420px;
}

/* Views */
.view {
  display: none;
}

.view--active {
  display: block;
}

/* Results info */
.results-info {
  position: fixed;
  bottom: 24px;
  left: 32px;
  z-index: 50;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  mix-blend-mode: difference;
  pointer-events: none;
}

/* Category filter */
.category-filter {
  position: fixed;
  top: 80px;
  left: 32px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(50% - 64px);
}

.category-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.2s;
}

.category-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-btn.active {
  color: #000;
  background: #fff;
  border-color: #fff;
}

/* Home cards */
.reviews-grid {
  display: flex;
  flex-direction: column;
}

.review-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  cursor: pointer;
  background: var(--bg);
}

.review-card + .review-card {
  border-top: 1px solid var(--border);
}

.card-text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 48px 40px;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.card-index {
  position: absolute;
  top: 28px;
  left: 48px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.card-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 40px 0;
}

.card-english-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 130px);
  font-weight: 400;
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
  word-break: break-word;
}

.card-chinese-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 10px;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 18px;
}

.card-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--text-subtle);
}

.card-category {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-rating {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 0.9;
  color: var(--text);
}

.card-summary {
  display: none;
}

.card-tags {
  display: none;
}

.card-poster {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-scroll-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  mix-blend-mode: difference;
  pointer-events: none;
}

.home-scroll-hint::after {
  content: "";
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
}

.empty-state {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
}

/* Detail */
.back-button {
  position: absolute;
  top: 20px;
  left: 32px;
  z-index: 90;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}

.back-button:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.45);
}

.review-detail {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg);
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.6) 45%,
    rgba(0, 0, 0, 0.15) 75%,
    transparent 100%
  );
}

.detail-title-overlay h1 {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 400;
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 14px 0;
  word-break: break-word;
  max-width: 90%;
}

.detail-title-overlay .detail-chinese-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.06em;
  margin: 0;
}

.detail-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}

.detail-meta-bar span {
  display: flex;
  align-items: center;
  gap: 24px;
}

.detail-meta-bar span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.detail-category {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.scroll-indicator::after {
  content: "";
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
}

.detail-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 32px 120px;
}

.detail-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-content h2 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.detail-content p {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  text-align: justify;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

/* Comments */
.comments-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 140px;
  background: var(--bg);
}

.comments-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 56px;
}

.comment-form-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-input {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.comment-input::placeholder {
  color: var(--text-subtle);
}

.comment-input:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.5);
}

.comment-nickname {
  max-width: 360px;
}

.comment-textarea {
  resize: vertical;
  line-height: 1.8;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.comment-hint {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-subtle);
}

.comment-status {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 900;
  min-height: 1.4em;
}

.comment-status.success {
  color: #fff;
}

.comment-status.error {
  color: #ff6b6b;
}

.cf-turnstile {
  margin-bottom: 4px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.comments-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-subtle);
  font-size: 16px;
  font-weight: 900;
}

.comment-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.comment-author {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
}

.comment-time {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-subtle);
  letter-spacing: 0.03em;
}

.comment-body {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  cursor: pointer;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-secondary {
  color: #fff;
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  color: #fff;
  background: rgba(220, 53, 69, 0.85);
  border-color: rgba(220, 53, 69, 0.85);
}

.btn-danger:hover {
  background: rgba(220, 53, 69, 1);
  border-color: rgba(220, 53, 69, 1);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 0;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.add-form {
  padding: 24px;
}

.form-field {
  display: block;
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.form-hint {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-subtle);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.form-field select option {
  background: #000;
  color: #fff;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-subtle);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.5);
}

.form-field textarea {
  resize: vertical;
  line-height: 1.7;
}

.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}

.poster-field {
  margin-bottom: 20px;
}

.poster-preview {
  width: 120px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.poster-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-preview img[src=""],
.poster-preview img:not([src]) {
  display: none;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  margin-bottom: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

.drop-zone-icon {
  color: rgba(255, 255, 255, 0.5);
}

.drop-zone-text {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
}

.drop-zone-hint {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-subtle);
}

.poster-status {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-subtle);
  min-height: 1.4em;
}

.poster-status.success {
  color: #fff;
}

.poster-status.error {
  color: #ff6b6b;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.detail-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .category-filter {
    top: 76px;
    left: 20px;
    max-width: calc(100% - 40px);
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .card-text {
    padding: 120px 32px 36px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    order: 2;
  }

  .card-index {
    left: 32px;
    top: 24px;
  }

  .card-title-block {
    padding: 24px 0;
  }

  .card-poster {
    height: 60vh;
    min-height: 400px;
    order: 1;
  }

  .card-english-title {
    font-size: clamp(48px, 14vw, 90px);
  }

  .card-chinese-title {
    font-size: 18px;
  }

  .card-meta {
    font-size: 14px;
  }

  .card-rating {
    font-size: 46px;
  }

  .detail-title-overlay h1 {
    font-size: clamp(48px, 14vw, 100px);
    max-width: 100%;
  }

  .detail-content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

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

  .logo {
    font-size: 26px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions input {
    width: 110px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .header-actions button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .category-filter {
    top: 68px;
    left: 16px;
    gap: 6px;
    max-width: calc(100% - 32px);
  }

  .category-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .results-info {
    left: 16px;
    bottom: 14px;
  }

  .card-text {
    padding: 110px 20px 32px;
  }

  .card-index {
    left: 20px;
  }

  .card-english-title {
    font-size: clamp(40px, 16vw, 64px);
  }

  .card-chinese-title {
    font-size: 17px;
  }

  .card-meta {
    font-size: 14px;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .card-meta span:not(:last-child)::after {
    width: 16px;
  }

  .card-rating {
    font-size: 40px;
  }

  .detail-title-overlay {
    padding: 28px 20px;
  }

  .detail-title-overlay h1 {
    font-size: clamp(40px, 16vw, 72px);
  }

  .detail-chinese-title {
    font-size: 18px;
  }

  .detail-meta-bar {
    font-size: 14px;
  }

  .detail-meta-bar span:not(:last-child)::after {
    width: 16px;
  }

  .scroll-indicator {
    display: none;
  }

  .detail-content,
  .comments-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .detail-content {
    padding-top: 64px;
    padding-bottom: 80px;
  }

  .detail-content p {
    font-size: 18px;
  }

  .comments-section {
    padding-bottom: 100px;
  }

  .back-button {
    left: 16px;
    right: auto;
    top: 15px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    max-height: 92vh;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }
}
