/* hga030.tv 比分滚球页。比分在框架里，样式不引用对方的 app.css。 */

:root {
  --nav: #3f271c;
  --gold: #e4c36a;
  --gold-1: #f4e3b0;
  --gold-2: #c6a15a;
  --text: #3a2e26;
  --muted: #7a6e62;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--nav);
  color: #f8f3ea;
  padding: 0.7rem 1rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top));
}

.bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: auto;
}

.mark {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 11.6rem));
  gap: 0.55rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #3a2414;
  background-image:
    linear-gradient(105deg, transparent 40%, rgba(255, 250, 235, 0.72) 50%, transparent 60%),
    linear-gradient(180deg, var(--gold-1), var(--gold-2));
  background-size: 240% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 140% 0, 0 0;
  border: 1px solid #a7843f;
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: gold-sheen 4.4s ease-in-out infinite;
}

.actions a.open {
  color: #2a1a0e;
  background-image:
    linear-gradient(105deg, transparent 40%, rgba(255, 244, 214, 0.5) 50%, transparent 60%),
    linear-gradient(180deg, #e4c16a, #a8843a);
  border-color: #8d6a2c;
  box-shadow: inset 0 1px 0 rgba(255, 232, 186, 0.45);
  animation-delay: 1.5s;
}

.actions a:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.8),
    0 7px 14px rgba(42, 24, 12, 0.28);
}

.actions a:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.35);
}

@keyframes gold-sheen {
  0%,
  52% {
    background-position: 140% 0, 0 0;
  }

  78%,
  100% {
    background-position: -40% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .actions a {
    animation: none;
    transition: none;
  }
}

.board {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  padding: 0.35rem 0.55rem 0;
}

.board iframe {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #fff;
}

.note {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.miss {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  text-align: center;
}

.miss a {
  color: #8d6a2c;
  font-weight: 700;
}

@media (max-width: 760px) {
  .bar {
    padding: 0.78rem 0.55rem;
    padding-top: calc(0.78rem + env(safe-area-inset-top));
  }

  .bar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
  }

  .brand {
    flex: 0 1 auto;
    gap: 0.35rem;
  }

  .brand img {
    width: 38px;
  }

  .mark {
    display: none;
  }

  h1 {
    font-size: 1rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .actions {
    flex: 0 0 auto;
    margin-left: auto;
    width: auto;
    grid-template-columns: max-content max-content;
    gap: 0.4rem;
  }

  .actions a {
    min-height: 42px;
    padding: 0 0.45rem;
    font-size: clamp(0.68rem, 2.8vw, 0.8rem);
    letter-spacing: 0;
  }

  .note {
    padding: 0.28rem 0.55rem 0.05rem;
    font-size: 0.7rem;
  }

  .board {
    padding-top: 0.28rem;
  }
}

@media (max-width: 340px) {
  .bar {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .brand img {
    width: 32px;
  }

  .bar-inner {
    gap: 0.5rem;
  }

  h1 {
    font-size: 0.84rem;
  }

  .actions a {
    padding-left: 0.28rem;
    padding-right: 0.28rem;
  }
}
