/* =========================================================
   Responsive navigation site — desktop / tablet / mobile
   ========================================================= */
:root {
  --page-bg: #f3f5f9;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --ink: #172033;
  --muted: #697386;
  --line: #e8ebf1;
  --brand-red: #af0000;
  --brand-red-deep: #8f0000;
  --brand-red-soft: #fff2f1;
  --navy: #101a2d;
  --navy-2: #1a2942;
  --gold: #d8ad62;
  --gold-deep: #b98535;
  --blue: #3976d7;
  --shadow: 0 10px 30px rgba(20, 33, 55, .07);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  overflow-x: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(57, 118, 215, .35);
  outline-offset: 3px;
}

/* Header */
.main-header {
  position: relative;
  z-index: 5;
  color: #fff;
  background: linear-gradient(115deg, var(--navy), #17243a 68%, #24344d);
  border-bottom: 1px solid rgba(216, 173, 98, .35);
  box-shadow: 0 5px 22px rgba(13, 24, 42, .14);
}
.header-container {
  width: min(1280px, 100% - 40px);
  min-height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 13px 0;
}
.logo-container { min-width: 0; }
.logo-link { display: inline-flex; align-items: center; }
.logo-img {
  width: auto;
  height: 58px;
  object-fit: contain;
  transition: transform .25s ease;
}
.logo-link:hover .logo-img { transform: translateY(-2px); }
.search-container { width: 100%; max-width: 620px; justify-self: center; }
.search-form {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}
.search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 13px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}
.search-input::placeholder { color: rgba(255, 255, 255, .66); }
.search-input:focus-visible { outline: 0; }
.search-btn {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  color: #273248;
  background: #f4f6fa;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.search-btn + .search-btn { margin-left: 4px; }
.search-btn:hover { transform: translateY(-1px); background: #fff; }
.search-btn-google { color: #fff; background: #3976d7; }
.search-btn-google:hover { background: #2e66bd; }
.toolbar { justify-self: end; white-space: nowrap; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid rgba(216, 173, 98, .42);
  border-radius: 999px;
  color: #f4dfb9;
  font-size: 13px;
  transition: background .2s ease, border-color .2s ease;
}
.tool-btn:hover { background: rgba(216, 173, 98, .12); border-color: var(--gold); }
.favorite-btn::before { content: "★"; margin-right: 7px; color: var(--gold); }

/* Main layout */
.main-content {
  width: min(1280px, 100% - 40px);
  margin: 0 auto;
  padding: 24px 0 34px;
}
.banner-section {
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dce2ec;
  box-shadow: var(--shadow);
}
.swiper-container { width: 100%; overflow: hidden; }
.swiper-wrapper { box-sizing: content-box; }
.swiper-slide { box-sizing: border-box; }
.banner-section .swiper-slide img {
  width: 100%;
  aspect-ratio: 830 / 430;
  object-fit: contain;
  background: #e7ebf2;
}

/* Quick actions */
.quick-nav {
  margin: 0 0 22px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.nav-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.nav-btn {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.nav-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(25, 39, 62, .10); filter: saturate(1.08); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.hot-btn { color: #8c4d23; background: linear-gradient(135deg, #fff2dc, #f9e1b9); border-color: #f0d4a7; }
.new-btn { color: #294f86; background: #edf4ff; border-color: #d9e7fb; }
.nav-btn:nth-child(3) { color: #276b5b; background: #eaf7f2; border-color: #d4eee4; }

/* Link sections */
.website-section {
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.section-title {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 15px 22px 15px 25px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: linear-gradient(90deg, #fff, #fbfcfe);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: .02em;
}
.section-title::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--gold);
  content: "";
}
.section-icon { width: 22px; height: 22px; margin-right: 11px; color: var(--blue); }
.vip-section .section-icon { color: var(--gold-deep); }
.bank-section .section-icon { color: #329575; }
.website-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}
.website-card {
  min-width: 0;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #fcfdff);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.website-card:hover {
  transform: translateY(-3px);
  border-color: rgba(216, 173, 98, .72);
  background: #fffdf9;
  box-shadow: 0 9px 20px rgba(26, 41, 66, .09);
}
.website-img {
  width: min(112px, 90%);
  height: 54px;
  margin: 0 auto 9px;
  object-fit: contain;
  border-radius: 5px;
}
.website-card p {
  max-width: 100%;
  margin: 0;
  color: #354052;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
body.popup-open { overflow: hidden; }

/* Footer */
/* Footer and friend links */
.main-footer {
  padding: 26px 0 18px;
  color: rgba(255, 255, 255, .78);
  background: linear-gradient(135deg, #101a2d, #17253d 70%, #1d2d47);
  border-top: 2px solid rgba(216, 173, 98, .68);
}
.footer-container { width: min(1280px, 100% - 40px); margin: 0 auto; }
.friend-links {
  padding: 0 0 19px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.friend-links-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 13px;
  color: #f4dfb9;
  font-size: 14px;
  letter-spacing: .08em;
}
.friend-links-mark { color: var(--gold); font-size: 15px; }
.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.friend-links-list li { min-width: 0; }
.friend-links-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .055);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.friend-links-list a:hover {
  color: #fff4df;
  border-color: rgba(216, 173, 98, .58);
  background: rgba(216, 173, 98, .13);
  transform: translateY(-1px);
}
.friend-links-list a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.copyright {
  margin: 15px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

/* Announcement popup: compact single-image dialog */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 15, 28, .72);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  backdrop-filter: blur(4px);
}
.popup-overlay.active { opacity: 1; visibility: visible; }
.popup-container {
  position: relative;
  width: min(560px, calc(100vw - 48px));
  max-height: 76vh;
  max-height: 76svh;
  overflow: visible;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 18px 56px rgba(0, 0, 0, .28);
  transform: translateY(10px) scale(.985);
  transition: transform .25s ease;
}
.popup-overlay.active .popup-container { transform: translateY(0) scale(1); }
.popup-image-link {
  display: block;
  width: 100%;
  max-height: 76vh;
  max-height: 76svh;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}
.popup-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  max-height: 76svh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
}
.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, .88);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.close-btn:hover { transform: rotate(90deg); background: #263750; }

/* Tablet */
@media (max-width: 1050px) {
  .header-container { grid-template-columns: 190px minmax(220px, 1fr); gap: 18px; }
  .toolbar { display: none; }
  .website-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 700px) {
  .header-container {
    width: calc(100% - 28px);
    min-height: auto;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    padding: 12px 0 14px;
  }
  .logo-img { height: 47px; }
  .search-container { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .search-form { min-height: 43px; }
  .search-input { padding-left: 10px; font-size: 14px; }
  .search-btn { min-width: 53px; padding: 7px 10px; }
  .main-content { width: calc(100% - 24px); padding: 15px 0 24px; }
  .banner-section { margin-bottom: 14px; border-radius: 13px; }
  .quick-nav { margin-bottom: 14px; padding: 11px; border-radius: 14px; }
  .nav-buttons { gap: 8px; }
  .nav-btn { min-height: 48px; flex-direction: column; gap: 3px; padding: 7px 4px; border-radius: 10px; font-size: 12px; line-height: 1.3; }
  .nav-icon { width: 19px; height: 19px; margin: 0; }
  .website-section { margin-bottom: 14px; border-radius: 14px; }
  .section-title { min-height: 51px; padding: 12px 16px 12px 20px; font-size: 16px; }
  .section-title::before { top: 13px; bottom: 13px; }
  .section-icon { width: 20px; height: 20px; margin-right: 9px; }
  .website-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 12px; }
  .website-card { min-height: 99px; padding: 10px 5px 8px; border-radius: 11px; }
  .website-img { width: min(86px, 92%); height: 43px; margin-bottom: 7px; }
  .website-card p { font-size: 12px; line-height: 1.35; }
  .main-footer { padding: 17px 0 14px; }
  .footer-container { width: calc(100% - 28px); }
  .copyright { font-size: 11px; }
  .popup-overlay { padding: 14px; }
  .popup-container { width: min(460px, calc(100vw - 40px)); max-height: 72vh; max-height: 72svh; }
  .popup-image-link, .popup-img { max-height: 72vh; max-height: 72svh; }
  .close-btn { top: -9px; right: -9px; width: 32px; height: 32px; font-size: 23px; }
}

@media (max-width: 360px) {
  .main-content { width: calc(100% - 18px); }
  .website-grid { gap: 7px; padding: 9px; }
  .website-card { min-height: 92px; }
  .website-card p { font-size: 11px; }
  .nav-btn { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* =========================================================
   Brand refresh — Dafabet red / gold, refined desktop & mobile
   Logo background sampled from static/picture/logo.webp: #AF0000
   ========================================================= */
:root {
  --page-bg: #f5f6f8;
  --line: #e9e9ed;
  --shadow: 0 9px 26px rgba(50, 22, 22, .065);
}

/* Full-width header uses the exact red from the logo background. */
.main-header {
  background: #af0000;
  border-bottom: 2px solid #e5bd68;
  box-shadow: 0 5px 22px rgba(86, 0, 0, .18);
}
.header-container {
  min-height: 92px;
}
.logo-img {
  height: 60px;
}
.search-form {
  border-color: rgba(255, 255, 255, .30);
  background: rgba(70, 0, 0, .16);
  box-shadow: inset 0 1px 3px rgba(50, 0, 0, .10);
}
.search-input::placeholder { color: rgba(255, 255, 255, .78); }
.search-btn {
  color: #8f0000;
  background: #fff;
}
.search-btn:hover { background: #fff8ed; }
.search-btn-google {
  color: #fff;
  background: #790000;
  border: 1px solid rgba(255, 255, 255, .16);
}
.search-btn-google:hover { background: #650000; }
.tool-btn {
  color: #fff5df;
  border-color: rgba(255, 225, 165, .55);
  background: rgba(80, 0, 0, .12);
}
.tool-btn:hover {
  border-color: #ffe2a6;
  background: rgba(80, 0, 0, .25);
}
.favorite-btn::before { color: #ffe09a; }

/* Lighter page canvas and cleaner content hierarchy. */
body { background: #f5f6f8; }
.main-content { padding-top: 25px; }
.banner-section {
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(48, 28, 28, .08);
}
.quick-nav {
  border-color: #f0e7e7;
  box-shadow: 0 7px 22px rgba(48, 28, 28, .055);
}
.hot-btn {
  color: #fff;
  background: linear-gradient(135deg, #bf1717, #990000);
  border-color: #a90000;
}
.hot-btn:hover { filter: brightness(1.06); }
.new-btn {
  color: #9b1111;
  background: linear-gradient(135deg, #fff8f7, #ffebea);
  border-color: #f2d1cf;
}
.nav-btn:nth-child(3) {
  color: #76501a;
  background: linear-gradient(135deg, #fff8e9, #f9edcf);
  border-color: #efdfb7;
}
.website-section {
  border-color: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 24px rgba(48, 28, 28, .055);
}
.section-title {
  background: linear-gradient(90deg, #fffafa, #fff);
}
.section-title::before { background: #af0000; }
.section-icon,
.vip-section .section-icon { color: #af0000; }
.bank-section .section-icon { color: #a8782e; }
.website-card {
  border-color: #ece8e8;
  background: linear-gradient(180deg, #fff, #fdfcfc);
}
.website-card:hover {
  border-color: rgba(175, 0, 0, .42);
  background: #fffafa;
  box-shadow: 0 9px 21px rgba(110, 0, 0, .085);
}
.website-card:focus-visible {
  outline: 3px solid rgba(175, 0, 0, .24);
  outline-offset: 3px;
}
.website-card p { color: #333744; }

/* Deep wine footer complements the red masthead without competing with it. */
.main-footer {
  background: linear-gradient(135deg, #2d090b, #430b0d 68%, #541014);
  border-top: 2px solid rgba(229, 189, 104, .78);
}
.friend-links-list a:hover {
  border-color: rgba(229, 189, 104, .72);
  background: rgba(229, 189, 104, .16);
}

@media (max-width: 1050px) {
  .header-container { grid-template-columns: 210px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .header-container {
    width: calc(100% - 24px);
    padding-top: 11px;
    padding-bottom: 13px;
  }
  .logo-img { height: 47px; }
  .main-content { padding-top: 14px; }
  .quick-nav { border-color: #f0e3e3; }
  .section-title { background: linear-gradient(90deg, #fffafa, #fff); }
  .website-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-img, .nav-btn, .website-card, .friend-links-list a { transition: none !important; }
}
