<!DOCTYPE html>
<html lang="vi">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>[K20] 4K & 1080p • Stremio & Nuvio Add-on</title>
  <meta name="description" content="Add-on [K20] xem phim 4K UHD (3840x1600 / 2160p) & FHD 1080p tốc độ cao hỗ trợ Stremio & Nuvio.">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
  <style>
    :root {
      --bg-dark: #08080e;
      --bg-card: rgba(18, 18, 30, 0.72);
      --bg-card-hover: rgba(26, 26, 44, 0.85);
      --border-subtle: rgba(255, 255, 255, 0.08);
      --border-glow: rgba(225, 29, 72, 0.35);
      --accent-red: #e11d48;
      --accent-red-hover: #be123c;
      --accent-gold: #f59e0b;
      --accent-cyan: #06b6d4;
      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      --emerald: #10b981;
    }

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

    body {
      font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg-dark);
      color: var(--text-main);
      min-height: 100vh;
      line-height: 1.6;
      overflow-x: hidden;
      position: relative;
    }

    .ambient-glow {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      overflow: hidden;
    }
    .glow-1 {
      position: absolute;
      top: -12%;
      left: 15%;
      width: 700px;
      height: 700px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(225, 29, 72, 0.18) 0%, rgba(225, 29, 72, 0) 70%);
      filter: blur(80px);
    }
    .glow-2 {
      position: absolute;
      top: 35%;
      right: -8%;
      width: 650px;
      height: 650px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0) 70%);
      filter: blur(90px);
    }

    .container {
      position: relative;
      z-index: 1;
      max-width: 960px;
      margin: 0 auto;
      padding: 48px 24px 80px;
    }

    header {
      text-align: center;
      margin-bottom: 48px;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 16px;
      background: rgba(225, 29, 72, 0.12);
      border: 1px solid rgba(225, 29, 72, 0.3);
      border-radius: 999px;
      font-size: 13px;
      font-weight: 600;
      color: var(--accent-red);
      margin-bottom: 20px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .badge-dot {
      width: 8px;
      height: 8px;
      background: var(--emerald);
      border-radius: 50%;
      box-shadow: 0 0 10px var(--emerald);
    }

    h1 {
      font-size: clamp(34px, 5.5vw, 54px);
      font-weight: 800;
      letter-spacing: -1.5px;
      line-height: 1.15;
      margin-bottom: 16px;
      background: linear-gradient(135deg, #ffffff 40%, var(--accent-red) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .subtitle {
      font-size: 17px;
      color: var(--text-muted);
      max-width: 640px;
      margin: 0 auto;
      font-weight: 300;
    }

    .main-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 24px;
      padding: 36px;
      backdrop-filter: blur(20px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
      margin-bottom: 40px;
    }

    .stream-spec-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 32px;
    }

    @media (max-width: 680px) {
      .stream-spec-grid { grid-template-columns: 1fr; }
      .main-card { padding: 24px 18px; }
    }

    .spec-box {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .spec-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .spec-tag {
      font-size: 11px;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 6px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .spec-tag-4k {
      background: rgba(245, 158, 11, 0.2);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.4);
    }
    .spec-tag-1080p {
      background: rgba(6, 182, 212, 0.2);
      color: #22d3ee;
      border: 1px solid rgba(6, 182, 212, 0.4);
    }
    .spec-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-main);
    }
    .spec-desc {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.5;
    }
    .spec-bitrate {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: var(--emerald);
      margin-top: 4px;
    }

    .action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      align-items: center;
      margin-bottom: 24px;
    }

    .btn-install {
      flex: 1 1 240px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 16px 28px;
      background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-hover) 100%);
      color: #fff;
      font-weight: 700;
      font-size: 16px;
      border-radius: 14px;
      text-decoration: none;
      transition: all 0.2s ease;
      box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
      border: none;
      cursor: pointer;
    }
    .btn-install:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 28px rgba(225, 29, 72, 0.45);
    }

    .btn-copy {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 16px 22px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: var(--text-main);
      font-weight: 600;
      font-size: 15px;
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .btn-copy:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.25);
    }

    .manifest-box {
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      color: var(--text-muted);
      overflow: hidden;
    }
    .manifest-box span {
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }

    .qr-section {
      margin-top: 32px;
      padding-top: 32px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 20px;
    }
    .qr-info {
      max-width: 480px;
    }
    .qr-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .qr-desc {
      font-size: 13px;
      color: var(--text-muted);
    }
    .qr-img {
      width: 110px;
      height: 110px;
      border-radius: 12px;
      background: #fff;
      padding: 6px;
    }

    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 20px;
    }
    .feat-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 18px;
      padding: 24px;
      transition: all 0.2s;
    }
    .feat-card:hover {
      border-color: rgba(255, 255, 255, 0.16);
      transform: translateY(-2px);
    }
    .feat-icon {
      font-size: 26px;
      margin-bottom: 12px;
      display: inline-block;
    }
    .feat-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .feat-desc {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.5;
    }
  </style>
</head>
<body>
  <div class="ambient-glow">
    <div class="glow-1"></div>
    <div class="glow-2"></div>
  </div>

  <div class="container">
    <header>
      <div class="badge">
        <span class="badge-dot"></span>
        [K20] High-Bitrate HLS
      </div>
      <h1>[K20] 4k-1080p</h1>
      <p class="subtitle">Add-on streaming phim điện ảnh và series tốc độ cao chỉ lấy đúng 2 nguồn chọn lọc 4K UHD & FHD 1080p.</p>
    </header>

    <div class="main-card">
      <div class="stream-spec-grid">
        <div class="spec-box">
          <div class="spec-header">
            <span class="spec-title">Nguồn 1: 4K UHD</span>
            <span class="spec-tag spec-tag-4k">3840x1600 / 2160p</span>
          </div>
          <div class="spec-desc">Độ phân giải 4K sắc nét nhất từ cụm CDN edge (carwashonline, buswashsolarpanel, cashmanages).</div>
          <div class="spec-bitrate">⚡ ~16.2 Mbps • HLS Direct Play</div>
        </div>

        <div class="spec-box">
          <div class="spec-header">
            <span class="spec-title">Nguồn 2: FHD 1080p</span>
            <span class="spec-tag spec-tag-1080p">2592x1080 / 1080p</span>
          </div>
          <div class="spec-desc">Độ phân giải Full HD mượt mà, tối ưu băng thông cho kết nối di động hoặc TV cấu hình vừa.</div>
          <div class="spec-bitrate">⚡ ~6.2 Mbps • HLS Direct Play</div>
        </div>
      </div>

      <div class="action-row">
        <a href="stremio://4kp1.k-20.xyz/manifest.json" class="btn-install">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
          Cài đặt vào Stremio
        </a>
        <button class="btn-copy" onclick="copyManifest()">
          <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
          Sao chép link Manifest
        </button>
      </div>

      <div class="manifest-box">
        <span id="manifestUrl">https://4kp1.k-20.xyz/manifest.json</span>
      </div>

      <div class="qr-section">
        <div class="qr-info">
          <div class="qr-title">Cài đặt trên TV & Thiết bị di động</div>
          <div class="qr-desc">Quét mã QR bằng camera điện thoại hoặc ứng dụng Nuvio / Stremio trên Android TV để đồng bộ add-on ngay lập tức.</div>
        </div>
        <img class="qr-img" src="https://api.qrserver.com/v1/create-qr-code/?size=260x260&margin=10&data=https%3A%2F%2F4kp1.k-20.xyz%2Fmanifest.json" alt="Stremio Addon QR Code" />
      </div>
    </div>

    <div class="features-grid">
      <div class="feat-card">
        <span class="feat-icon">🎯</span>
        <div class="feat-title">Đúng 2 luồng 4K & 1080p</div>
        <div class="feat-desc">Loại bỏ hoàn toàn các luồng 720p/480p chất lượng thấp, giữ danh sách stream gọn gàng và cao cấp.</div>
      </div>
      <div class="feat-card">
        <span class="feat-icon">⚡</span>
        <div class="feat-title">CORS Mở & Phát trực tiếp</div>
        <div class="feat-desc">Link stream m3u8 mở CORS toàn cầu, phát mượt trên ExoPlayer, VLC, mpv mà không cần proxy trung gian.</div>
      </div>
      <div class="feat-card">
        <span class="feat-icon">💬</span>
        <div class="feat-title">Tích hợp Phụ đề VTT</div>
        <div class="feat-desc">Tự động gắn phụ đề chuẩn VTT đa ngôn ngữ trực tiếp vào stream và qua Stremio Subtitles resource.</div>
      </div>
    </div>
  </div>

  <script>
    function copyManifest() {
      const url = document.getElementById('manifestUrl').innerText;
      navigator.clipboard.writeText(url).then(() => {
        const btn = document.querySelector('.btn-copy');
        const oldText = btn.innerHTML;
        btn.innerText = 'Đã chép link!';
        setTimeout(() => btn.innerHTML = oldText, 2000);
      });
    }
  </script>
</body>
</html>