:root {
  --bg: #0C1A15;
  --bg-dark: #0E201A;
  --panel: #17302A;
  --panel-light: #204438;
  --primary: #3FD3A6;
  --secondary: #1E8F72;
  --gold: #EBCB7A;
  --text: #EAF7F0;
  --text-sub: #8FB3A6;
  --border: rgba(160,235,215,.10);
  --border-strong: rgba(160,235,215,.20);
  --gradient: linear-gradient(135deg, #3FD3A6 0%, #EBCB7A 100%);
  --dark-text: #0A241C;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 26, 21, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
}
.nav-links {
  display: none;
}
.mobile-nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
}
.mobile-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-strong);
  flex-direction: column;
  padding: 10px 20px;
}
.mobile-nav.active {
  display: flex;
}
.mobile-nav a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.95rem;
}
.mobile-nav a:hover { color: var(--primary); }

/* Hero Section */
.hero {
  position: relative;
  padding: 40px 0;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(63, 211, 166, 0.1), transparent 40%);
}
.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.hero-content {
  z-index: 2;
}
.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(63, 211, 166, 0.15);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: var(--text-sub);
  font-size: 1rem;
  margin-bottom: 24px;
}
.download-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, filter 0.2s;
  cursor: pointer;
  color: var(--dark-text);
  background: var(--gradient);
  border: none;
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: rgba(63, 211, 166, 0.1);
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.hero-gallery img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  transition: transform 0.3s;
}
.hero-gallery img:hover {
  transform: scale(1.02);
}

/* Marquee */
.marquee-wrap {
  margin-top: 20px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-text {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(90deg, #3FD3A6, #EBCB7A, #3FD3A6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: marquee 20s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections Global */
section {
  padding: 50px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 30px;
}
.section-title h2 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 8px;
}
.section-title p {
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* Real Drama */
.drama-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.drama-card {
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}
.drama-card:hover { border-color: var(--primary); }
.drama-card img {
  width: 100%;
  height: 240px;
}
.drama-info {
  padding: 16px;
}
.drama-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.drama-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.drama-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: rgba(63, 211, 166, 0.1);
  color: var(--primary);
  border-radius: 4px;
}

/* Rewritten Drama */
.rewrite-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.rewrite-image img {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
}
.rewrite-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rewrite-item {
  background: var(--panel-light);
  padding: 14px 18px;
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rewrite-item span:first-child {
  font-weight: 600;
}
.rewrite-item span:last-child {
  font-size: 0.8rem;
  color: var(--gold);
}

/* Weekly Hot */
.hot-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.hot-item {
  display: flex;
  align-items: center;
  background: var(--panel);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  transition: background 0.3s;
}
.hot-item:hover { background: var(--bg-dark); }
.hot-rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  width: 40px;
  text-align: center;
  font-style: italic;
}
.hot-item img {
  width: 50px;
  height: 70px;
  border-radius: 8px;
  margin-right: 16px;
}
.hot-info {
  flex: 1;
}
.hot-info h3 { font-size: 1rem; margin-bottom: 4px; }
.hot-info p { font-size: 0.8rem; color: var(--text-sub); }

/* Reviews */
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.review-card {
  background: var(--panel-light);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.review-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: #000;
}
.review-header h4 { font-size: 0.95rem; }
.review-header p { font-size: 0.75rem; color: var(--gold); }
.review-card p {
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border-strong);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.timeline-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.faq-q {
  padding: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  background: var(--panel-light);
}
.faq-q::after {
  content: '+';
  color: var(--primary);
  font-weight: 700;
}
.faq-a {
  padding: 0 16px 16px;
  font-size: 0.9rem;
  color: var(--text-sub);
  display: block;
}

/* Download Section */
.download-section {
  background: var(--panel);
  border-radius: 24px;
  padding: 40px 20px;
  margin: 40px 20px;
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.download-content h2 {
  text-align: center;
  margin-bottom: 20px;
}
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-num {
  background: var(--gradient);
  color: var(--dark-text);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 4px;
}
.step-text p {
  font-size: 0.9rem;
  color: var(--text-sub);
}
.download-image img {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

/* Footer */
footer {
  background: var(--bg-dark);
  padding: 30px 20px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.8rem;
  text-align: center;
}
.footer-links {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.footer-links a:hover { color: var(--primary); }
.footer-info p { margin-bottom: 6px; }
.footer-info a { color: var(--text-sub); text-decoration: underline; }

/* Floating Download */
.floating-download {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, #0C1A15, rgba(12,26,21,0.9));
  border-top: 1px solid var(--border-strong);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 1000;
}
.floating-download img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
}
.float-info { flex: 1; }
.float-info h4 { font-size: 0.9rem; color: var(--text); }
.float-info p { font-size: 0.75rem; color: var(--text-sub); }
.floating-download .btn { padding: 8px 16px; font-size: 0.85rem; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: var(--panel);
  padding: 24px;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  border: 1px solid var(--border-strong);
  text-align: center;
}
.modal-content h3 {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1.1rem;
}
.modal-content p {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 20px;
  word-break: break-all;
}
.modal-content input {
  width: 100%;
  padding: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}
.modal-content button {
  width: 100%;
}

/* Desktop */
@media (min-width: 768px) {
  .hero-layout { flex-direction: row; align-items: center; }
  .hero-content { flex: 1; }
  .hero-gallery { flex: 1; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
  .hero-gallery img { height: 100%; min-height: 150px; }
  .hero h1 { font-size: 2.5rem; }
  
  .drama-grid { grid-template-columns: repeat(2, 1fr); }
  .hot-list { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .rewrite-layout { flex-direction: row; align-items: stretch; }
  .rewrite-image { width: 35%; }
  .rewrite-image img { height: 100%; min-height: 350px; }
  .rewrite-content { flex: 1; }
  
  .download-section { flex-direction: row; align-items: center; }
  .download-content { flex: 1.2; padding-right: 20px; }
  .download-content h2 { text-align: left; }
  .download-image { flex: 1; }
  
  .nav-links {
    display: flex;
    gap: 15px;
  }
  .nav-links a {
    font-size: 0.9rem;
    color: var(--text-sub);
    transition: color 0.2s;
    padding: 5px 0;
    position: relative;
  }
  .nav-links a:hover { color: var(--primary); }
  .nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--gradient); transition: width 0.3s;
  }
  .nav-links a:hover::after { width: 100%; }
  .mobile-nav-toggle { display: none; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .drama-grid { grid-template-columns: repeat(4, 1fr); }
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .rewrite-image { width: 30%; }
  .container { padding: 0 30px; }
  .floating-download { width: auto; left: 50%; transform: translateX(-50%); border-radius: 50px; bottom: 20px; padding: 8px 24px; min-width: 400px; }
}