@charset "UTF-8";
/* ==========================================================
 * Kingrich (金富翁) theme — mobile-first, dark purple + gold.
 * Compile:
 *   sass public/theme/kingrich/scss/kingrich.scss public/theme/kingrich/css/kingrich.css --style=compressed
 * 於 wrap.html 以以下方式引入（{web-version} 會自動改變 query 達到 cache-busting）：
 *   <link rel="stylesheet" href="/theme/kingrich/css/kingrich.css?v={web-version}">
 * ==========================================================
 */
/* -------- Brand palette -------- */
/* -------- CSS variables (runtime-overridable) -------- */
:root {
  --kr-purple-deep: #15022c;
  --kr-purple-dark: #2a0f4d;
  --kr-purple: #4a1e85;
  --kr-purple-soft: #6a3abf;
  --kr-gold: #f5c949;
  --kr-gold-dark: #b07d00;
  --kr-gold-light: #ffe68a;
  --kr-red: #c7261e;
  --kr-text: #f6e9c7;
  --kr-text-dim: #a998b6;
  --kr-danger: #ff4b6a;
  --kr-header-h: 56px;
  --kr-footer-h: 72px;
  --kr-max-w: 480px;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: "Microsoft JhengHei", "Arial", sans-serif;
  font-size: 14px;
  color: var(--kr-text);
  background: var(--kr-purple-deep);
  -webkit-font-smoothing: antialiased;
}

body {
  background: linear-gradient(180deg, rgba(10, 3, 30, 0.78) 0%, rgba(21, 2, 44, 0.92) 60%, #000 100%);
  min-height: 100vh;
}

a {
  color: var(--kr-text);
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* -------- Main app container: mobile-first, centered on desktop -------- */
.kr-app {
  position: relative;
  max-width: var(--kr-max-w);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: var(--kr-header-h);
  padding-bottom: calc(var(--kr-footer-h) + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(42, 15, 77, 0.7), rgba(21, 2, 44, 0.92));
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .kr-app {
    margin: 0 auto;
  }
}
/* -------- Header -------- */
.kr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--kr-header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #2a0f4d 0%, #180629 100%);
  border-bottom: 1px solid var(--kr-gold-dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.kr-header__inner {
  position: relative;
  width: 100%;
  max-width: var(--kr-max-w);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.kr-header__logo {
  flex: 1;
  text-align: left;
}

.kr-header__logo img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.kr-header__logo .kr-brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--kr-gold);
  text-shadow: 0 0 8px rgba(245, 201, 73, 0.5), 0 1px 0 #000;
}

.kr-header__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kr-header__right .kr-btn-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--kr-purple);
  border: 1px solid var(--kr-gold-dark);
  color: var(--kr-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* -------- Buttons -------- */
.kr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 22px;
  border: 1px solid var(--kr-gold-dark);
  background: linear-gradient(180deg, #6a3abf, #3d1775);
  color: var(--kr-gold);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
}

.kr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  color: var(--kr-gold-light);
}

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

.kr-btn--primary {
  background: linear-gradient(180deg, var(--kr-gold-light) 0%, var(--kr-gold) 50%, var(--kr-gold-dark) 100%);
  color: #2a0f4d;
  border-color: #fff1b0;
  text-shadow: 0 1px 0 #ffe68a;
}

.kr-btn--ghost {
  background: transparent;
  border-color: var(--kr-purple-soft);
  color: var(--kr-text);
}

.kr-btn--danger {
  background: linear-gradient(180deg, #ff5566, var(--kr-red));
  color: #fff;
  border-color: #ffb0b8;
}

.kr-btn--block {
  display: flex;
  width: 100%;
}

/* -------- Bottom tab-bar -------- */
.kr-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  height: calc(var(--kr-footer-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, #32155c 0%, #15022c 100%);
  border-top: 2px solid var(--kr-gold-dark);
}

.kr-bottom__inner {
  max-width: var(--kr-max-w);
  margin: 0 auto;
  height: var(--kr-footer-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

.kr-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--kr-text-dim);
  text-decoration: none;
  height: 100%;
  justify-content: center;
}

.kr-bottom a i {
  font-size: 22px;
  color: var(--kr-gold);
}

.kr-bottom a.kr-bottom__center {
  position: relative;
}

.kr-bottom a.kr-bottom__center > .kr-center-btn {
  position: absolute;
  top: -22px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffe68a 0%, var(--kr-gold) 45%, var(--kr-gold-dark) 100%);
  border: 3px solid #15022c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a0f4d;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 0 14px rgba(245, 201, 73, 0.55), inset 0 0 8px #fff1b0;
}

.kr-bottom a.kr-bottom__center span {
  margin-top: 36px;
}

.kr-bottom a.active {
  color: var(--kr-gold-light);
}

/* -------- Floating CS / chat -------- */
.kr-float {
  position: fixed;
  right: calc(50% - var(--kr-max-w) / 2 + 8px);
  bottom: calc(var(--kr-footer-h) + 16px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kr-float a {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #fff, #ccc 90%);
  border: 2px solid var(--kr-gold-dark);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  text-decoration: none;
}

.kr-float a.kr-float__line {
  background: radial-gradient(circle at 30% 30%, #9aea7a, #06c654 80%);
}

.kr-float a.kr-float__cs {
  background: radial-gradient(circle at 30% 30%, #ffe68a, var(--kr-gold) 70%);
  color: #2a0f4d;
}

@media (max-width: 560px) {
  .kr-float {
    right: 10px;
  }
}
/* -------- Content wrapper -------- */
.kr-main {
  position: relative;
  padding: 8px 10px 18px;
}

/* -------- Hero carousel -------- */
.kr-hero {
  position: relative;
  margin: 6px 0 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--kr-gold-dark);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.kr-hero .carousel-item img {
  width: 100%;
  display: block;
  aspect-ratio: 1000/480;
  object-fit: cover;
}

.kr-hero .carousel-indicators {
  margin-bottom: 4px;
}

.kr-hero .carousel-indicators li {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--kr-gold);
  opacity: 1;
  margin: 0 3px;
}

.kr-hero .carousel-indicators li.active {
  background: var(--kr-gold);
  width: 16px;
  border-radius: 4px;
}

/* -------- News / bulletin ticker -------- */
.kr-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  margin: 10px 0;
  background: linear-gradient(90deg, rgba(107, 58, 191, 0.45), rgba(42, 15, 77, 0.45));
  border: 1px solid var(--kr-purple-soft);
  border-radius: 20px;
}

.kr-ticker__label {
  color: var(--kr-gold);
  font-weight: bold;
  flex: 0 0 auto;
  font-size: 12px;
}

.kr-ticker__label i {
  margin-right: 4px;
}

.kr-ticker marquee {
  flex: 1;
  color: var(--kr-text);
}

.kr-ticker marquee a {
  color: var(--kr-text);
  margin-right: 30px;
}

/* -------- Category tab row (遊戲大廳 / 我的最愛 / 體彩 / 台灣真人 / 國際真人) -------- */
.kr-cats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 12px 0;
  padding: 6px;
  background: rgba(42, 15, 77, 0.55);
  border: 1px solid var(--kr-gold-dark);
  border-radius: 12px;
}

.kr-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  color: var(--kr-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.kr-cat:hover, .kr-cat.active {
  background: linear-gradient(180deg, rgba(245, 201, 73, 0.16), rgba(245, 201, 73, 0.03));
  color: var(--kr-gold-light);
}

.kr-cat__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #5f2ca2, #2a0f4d);
  border: 1px solid var(--kr-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--kr-gold);
}

.kr-cat__icon img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* -------- Feature / 獨家 big banner -------- */
.kr-feature {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--kr-gold);
  box-shadow: 0 0 16px rgba(245, 201, 73, 0.35);
}

.kr-feature::before {
  content: "獨家";
  position: absolute;
  top: 6px;
  right: 8px;
  background: var(--kr-red);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 2px;
  z-index: 2;
}

.kr-feature a {
  display: block;
}

.kr-feature img {
  width: 100%;
  display: block;
}

/* -------- Exclusive zone grid -------- */
.kr-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: var(--kr-gold);
  text-shadow: 0 0 8px rgba(245, 201, 73, 0.4);
}
.kr-section-title::before, .kr-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--kr-gold-dark), transparent);
}

.kr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.kr-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.kr-tile {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(42, 15, 77, 0.5);
  border: 1px solid var(--kr-gold-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  transition: transform 0.15s;
}

.kr-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 201, 73, 0.4);
}

.kr-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kr-tile__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
  text-align: center;
  letter-spacing: 1px;
}

/* -------- Game category sections (大廳 / 體育 / 彩票 / 電子) -------- */
.kr-games {
  margin: 12px 0;
}

.kr-games__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  padding-left: 8px;
  font-size: 15px;
  font-weight: bold;
  color: var(--kr-gold);
  border-left: 4px solid var(--kr-gold);
}

/* -------- Forms / login / register -------- */
.kr-form {
  max-width: 360px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(42, 15, 77, 0.85);
  border: 1px solid var(--kr-gold-dark);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.kr-form__title {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--kr-gold);
  margin-bottom: 18px;
  text-shadow: 0 0 8px rgba(245, 201, 73, 0.4);
}

.kr-form__row {
  margin-bottom: 14px;
}

.kr-form__row label {
  display: block;
  font-size: 12px;
  color: var(--kr-text-dim);
  margin-bottom: 4px;
}

.kr-input, input.kr-input, .kr-form input[type=text], .kr-form input[type=password], .kr-form input[type=email] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--kr-text);
  background: #1f0a3c;
  border: 1px solid var(--kr-purple-soft);
  border-radius: 8px;
  outline: none;
}

.kr-input:focus {
  border-color: var(--kr-gold);
  box-shadow: 0 0 0 2px rgba(245, 201, 73, 0.25);
}

.kr-form small {
  color: var(--kr-text-dim);
}

.kr-form__links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
}

.kr-form__links a {
  color: var(--kr-gold-light);
}

/* -------- Modal override (BS4) -------- */
.modal-content {
  background: var(--kr-purple-dark);
  border: 1px solid var(--kr-gold-dark);
  color: var(--kr-text);
}

.modal-header {
  background: linear-gradient(90deg, var(--kr-purple), var(--kr-purple-dark));
  border-bottom: 1px solid var(--kr-gold-dark);
}

.modal-header .close {
  color: var(--kr-gold);
  text-shadow: none;
  opacity: 0.8;
}

.modal-title {
  color: var(--kr-gold);
}

/* -------- Small helpers -------- */
.kr-hidden, .hidden {
  display: none !important;
}

.unauth { /* nothing by default */ }

/* NOTE: `.lang_<web-lang>` rule is inlined in wrap.html <style> so Yatp can interpolate {web-lang}. */
.kr-text-gold {
  color: var(--kr-gold) !important;
}

.kr-text-muted {
  color: var(--kr-text-dim) !important;
}

/* -------- Card / info block -------- */
.kr-card {
  background: rgba(42, 15, 77, 0.75);
  border: 1px solid var(--kr-purple-soft);
  border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
}

.kr-card--gold {
  border-color: var(--kr-gold-dark);
}

/* -------- Bulletin / promotion list -------- */
.kr-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 6px;
  background: rgba(42, 15, 77, 0.8);
  border: 1px solid var(--kr-purple-soft);
  border-radius: 10px;
}

.kr-list__item .date {
  color: var(--kr-text-dim);
  font-size: 11px;
}

/* -------- Info table -------- */
.kr-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.kr-info-table td {
  padding: 10px 12px;
  background: rgba(42, 15, 77, 0.7);
  border-top: 1px solid var(--kr-purple-soft);
  border-bottom: 1px solid var(--kr-purple-soft);
}

.kr-info-table td:first-child {
  border-left: 1px solid var(--kr-purple-soft);
  border-radius: 8px 0 0 8px;
  color: var(--kr-gold);
  width: 35%;
}

.kr-info-table td:last-child {
  border-right: 1px solid var(--kr-purple-soft);
  border-radius: 0 8px 8px 0;
}

/* -------- Desktop background fill (only below max-w wrapper) -------- */
@media (min-width: 768px) {
  .kr-app::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at top, rgba(120,40,180,0.35) 0%, transparent 60%), linear-gradient(180deg, #150a2e 0%, #0a0418 80%, #000 100%);
    filter: brightness(0.45) saturate(1.1);
  }
}
/* -------- Twostar legacy-neutralize (hide desktop-only chunks if any survive) -------- */
.hidden-desktop, .hidden-mobile {
  display: none !important;
}

@media (min-width: 993px) {
  .hidden-desktop {
    display: block !important;
  }
  .hidden-mobile {
    display: none !important;
  }
}
@media (max-width: 992px) {
  .hidden-mobile {
    display: block !important;
  }
  .hidden-desktop {
    display: none !important;
  }
}
