/* ============================================================
   NEO-BRUTALIST STOREFRONT THEME (Clone style x.vinacheat.com)
   ============================================================ */
:root {
  --bg-page: #f8f9fa;
  --dot-color: #d4d4d8;
  --ink: #111827;
  --ink-muted: #4b5563;
  --border: 2.5px solid #111827;
  --border-thin: 2px solid #111827;
  --shadow: 4px 4px 0px #111827;
  --shadow-sm: 2.5px 2.5px 0px #111827;
  --shadow-lg: 6px 6px 0px #111827;
  --radius: 10px;
  --radius-sm: 7px;

  --yellow: #fde047;
  --cream: #fefce8;
  --purple: #6d28d9;
  --indigo: #4f46e5;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --white: #ffffff;
}

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

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--bg-page);
  background-image: radial-gradient(var(--dot-color) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

/* ---------- Neo-Brutalist Utility Primitives ---------- */
.nb-box {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
  user-select: none;
}

.nb-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3.5px 3.5px 0px #111827;
  filter: brightness(1.03);
}

.nb-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0.5px 0.5px 0px #111827;
}

.nb-btn-green {
  background: var(--green);
  color: var(--white);
}

.nb-btn-blue {
  background: var(--blue);
  color: var(--white);
}

.nb-btn-purple {
  background: var(--indigo);
  color: var(--white);
}

.nb-btn-white {
  background: var(--white);
  color: var(--ink);
}

.nb-btn-red {
  background: var(--red);
  color: var(--white);
}

.nb-btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.nb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  border: var(--border-thin);
  border-radius: 6px;
  box-shadow: 2px 2px 0px #111827;
}

/* ---------- 1. TOP HEADER CARD (Profile + Channels) ---------- */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-left {
  background: #facc15;
  padding: 20px;
  border-right: var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar-img {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  background: var(--white);
  display: block;
}

.online-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #22c55e;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.verified-icon {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
}

.profile-bio {
  background: #fce7f3;
  border: var(--border-thin);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 2px 2px 0px #111827;
}

.hero-right {
  background: var(--cream);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.channels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-purple {
  background: var(--purple);
  color: var(--white);
}

.badge-indigo {
  background: var(--indigo);
  color: var(--white);
}

.channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.channel-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: var(--border-thin);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 2px 2px 0px #111827;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.channel-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #111827;
}

.channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.icon-telegram { background: #0ea5e9; }
.icon-discord { background: #5865F2; }
.icon-zalo { background: #0068ff; }

.notice-pill {
  background: var(--red);
  color: var(--white);
  border: var(--border-thin);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 2px 2px 0px #111827;
}

/* ---------- 2. SHOP BANNER ---------- */
.shop-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.shop-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shop-icon-box {
  width: 46px;
  height: 46px;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 8px;
  box-shadow: 2px 2px 0px #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shop-title {
  font-size: 16px;
  font-weight: 800;
}

.shop-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ---------- 3. FILTER TABS BAR ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 8px;
  margin-bottom: 22px;
}

.filter-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  background: #f3f4f6;
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 7px;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  background: #e5e7eb;
}

.filter-tab.active {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--ink);
  box-shadow: 2.5px 2.5px 0px #111827;
}

/* ---------- 4. CATEGORY SECTION & PRODUCT CARDS ---------- */
.category-section {
  margin-bottom: 28px;
}

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

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  border: var(--border-thin);
  border-radius: 7px;
  box-shadow: 2.5px 2.5px 0px #111827;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--white);
}

.product-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-fallback-tag {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 2px 2px 0px #111827;
  margin-bottom: 8px;
  transform: rotate(-2deg);
}

.banner-fallback-title {
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 3px 3px 0px #111827, -1px -1px 0px #111827;
  line-height: 1.1;
}

.banner-fallback-sub {
  margin-top: 8px;
  background: rgba(17, 24, 39, 0.85);
  border: 1.5px solid var(--white);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.product-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-app-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: var(--border-thin);
  box-shadow: 2px 2px 0px #111827;
  object-fit: cover;
  background: var(--white);
  margin-top: -32px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.product-title {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.25;
}

.product-subtitle {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: 2px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------- 5. VIDEO SECTION ---------- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.video-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #18181b;
  border-bottom: var(--border);
  overflow: hidden;
  cursor: pointer;
}

.video-thumb-wrap img,
.video-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.video-thumb-wrap:hover .video-play-overlay {
  background: rgba(17, 24, 39, 0.5);
}

.play-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--yellow);
  border: var(--border);
  box-shadow: 3px 3px 0px #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1.5px solid var(--white);
}

.video-cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--indigo);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px #111827;
}

.video-body {
  padding: 14px 16px;
  background: #fefce8;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.video-title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
}

.video-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 500;
}

.video-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.video-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ---------- 6. BOTTOM GUIDE BUTTON & FOOTER ---------- */
.divider {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 26px 0 18px;
}

.guide-btn-full {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
}

.site-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ---------- 7. MODALS (Popup, Key, Download, Video, Guide, Admin) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  animation: popIn 0.16s ease-out;
}

.modal-card.modal-lg {
  max-width: 760px;
  background: var(--white);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-close-x {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: var(--border-thin);
  background: var(--white);
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #111827;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px dashed #d4d4d8;
}

/* Free Key Box */
.key-display-box {
  background: var(--white);
  border: var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.key-code-text {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 17px;
  font-weight: 900;
  color: var(--indigo);
  word-break: break-all;
}

.info-note {
  background: #eff6ff;
  border: var(--border-thin);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Video Player Container */
.video-player-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: var(--border);
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-player-frame iframe,
.video-player-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Guide List */
.guide-block {
  background: var(--white);
  border: var(--border-thin);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 2px 2px 0px #111827;
}

.guide-block h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--indigo);
}

.guide-block ol {
  padding-left: 20px;
  font-size: 13.5px;
  font-weight: 500;
}

.guide-block li {
  margin-bottom: 5px;
}

/* Admin Panel Forms */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  border: var(--border-thin);
  border-radius: 7px;
  background: #f3f4f6;
}

.admin-tab-btn.active {
  background: var(--yellow);
  box-shadow: 2px 2px 0px #111827;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 800;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: var(--border-thin);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--white);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border: var(--border-thin);
  border-radius: 7px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 8px;
  border: 2px solid var(--yellow);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 700;
  z-index: 2000;
  display: none;
}

.toast.show {
  display: block;
  animation: popIn 0.15s ease-out;
}

/* ---------- FLOATING MUSIC PLAYER ---------- */
.music-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  box-shadow: var(--shadow);
  max-width: 280px;
}

.music-widget.visible {
  display: flex;
}

.music-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-thin);
  background: var(--indigo);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 2px 2px 0px #111827;
}

.music-toggle-btn.playing {
  background: var(--green);
  animation: spinDisc 3s linear infinite;
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-meta {
  min-width: 0;
  overflow: hidden;
}

.music-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1;
}

.music-title {
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-embed-popup {
  position: fixed;
  bottom: 78px;
  left: 20px;
  z-index: 901;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
}

.music-embed-popup.open {
  display: block;
  animation: popIn 0.15s ease-out;
}

.music-embed-popup.hidden-audio {
  display: block;
  position: fixed;
  left: -9999px;
  bottom: -9999px;
  width: 300px;
  height: 166px;
  opacity: 0;
  pointer-events: none;
}

.music-embed-popup iframe {
  width: 100%;
  border: 0;
  display: block;
}

.music-embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--yellow);
  border-bottom: var(--border-thin);
  font-size: 12px;
  font-weight: 800;
}

.music-min-btn {
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 1.5px 1.5px 0px #111827;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-left {
    border-right: none;
    border-bottom: var(--border);
  }
  .products-grid,
  .videos-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .shop-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .banner-fallback-title {
    font-size: 22px;
  }
}
