/* ===== Match Grid ===== */

.match-section {
  padding: 16px 0;
}
.match-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.home-empty {
  text-align: center;
  color: var(--text-2);
  padding: 60px 0;
  font-size: 14px;
}
.match-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px 8px 18px;
  transition: 0.2s;
}
a.match-main {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  color: inherit;
  text-decoration: none;
}
.match-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.match-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.match-head .league {
  color: var(--text-2);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-head .flag {
  background: var(--bg-main);
  width: 18px;
  height: 14px;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: -3px;
  object-fit: cover;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-block;
}
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  line-height: 1.4;
}
.badge-end {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-live {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.5s infinite;
}
.badge-time {
  background: var(--green-soft-bg);
  color: var(--green-soft-text);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.match-time {
  color: var(--text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex: 1;
}
.match-body {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.team {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.team.home {
  justify-content: flex-end;
  text-align: right;
}
.team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-logo {
  background: var(--bg-main);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  flex-shrink: 0;
}
.score {
  font-size: 24px;
  text-align: center;
  padding: 0 10px;
  font-family: fantasy;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.score .num {
  min-width: 30px;
}
.score .vs {
  color: var(--text-3);
  font-size: 14px;
  width: 30px;
}
.score.notyet .vs {
  font-size: 24px;
}
.score .minute {
  color: var(--green-soft-text);
  font-size: 11px;
  font-weight: 600;
  background: var(--green-soft-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 4px;
}
.match-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bg-input);
}
.match-foot.apply {
  color: var(--green);
  font-size: 12px;
  line-height: 22px;
}
.apply-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.apply-stats .apply-btn {
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 2px 15px;
  margin: 0;
  border: 1.5px solid rgba(34, 197, 94, 0.5);
  border-radius: 30px;
  cursor: pointer;
  transition: 0.2s;
  flex-shrink: 0;
}
.apply-stats .apply-btn:hover {
  background: var(--green-soft-bg);
}
.apply-stats .apply-btn.end {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.5);
}
.apply-stats .apply-btn.end:hover {
  background: rgba(239, 68, 68, 0.15);
}
.apply-stats .apply-btn:active {
  transform: scale(0.96);
}
.predictor {
  position: relative;
  z-index: 2;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px 3px 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.predictor:hover {
  border-color: #4a5270;
  color: var(--text);
}
.predictor.live {
  background: var(--green-soft-bg);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}
.predictor-av {
  background: var(--bg-main);
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
.predictor .playing {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.predictor .playing .bar {
  width: 2.5px;
  height: 100%;
  border-radius: 1px;
  background: var(--green);
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}
.predictor .playing .bar:nth-child(2) {
  animation-delay: 0.2s;
}
.predictor .playing .bar:nth-child(3) {
  animation-delay: 0.4s;
}
[data-theme="light"] .predictor.live {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}
.odds {
  display: flex;
  margin-left: auto;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  display: none;
}
.odds span {
  background: var(--bg-input);
  line-height: 16px;
  text-align: center;
  padding: 0 8px;
  margin: 0 0 0 5px;
  border-radius: 10px;
}
/* ===== Video Section ===== */

.information-item {
  color: var(--text-2);
  margin: 10px;
}
.video-section {
  height: 700px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 12px;
  margin-top: 10px;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.video-top {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  position: relative;
}
.video-top .back {
  display: none;
}
.live-tag {
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}
.team-mini {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}
.team-mini.home {
  justify-content: flex-end;
  text-align: right;
}
.team-mini span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-mini .team-logo {
  width: 26px;
  height: 26px;
}
.score-mini {
  line-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px;
}
.score-mini .num {
  background: var(--bg-input);
  font-size: 18px;
  text-align: center;
  font-family: fantasy;
  border-radius: 4px;
  min-width: 26px;
}
.score-mini .min {
  background: var(--bg-input);
  font-size: 12px;
  font-weight: 600;
  padding: 0 8px;
  border-radius: 4px;
  display: inline-block;
}
.score-mini .min.going {
  background: var(--green-soft-bg);
}
.score-mini .min.end {
  background: rgba(239, 68, 68, 0.15);
}
.video-area {
  position: relative;
  aspect-ratio: 1.777777778;
  background: linear-gradient(135deg, #0f4c2c, #1a6b3e);
  overflow: hidden;
  touch-action: none;
}
/* ===== 倒计时 ===== */

.countdown {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at center, rgba(10, 15, 30, 0.5) 30%, rgba(10, 15, 30, 0.8) 100%);
  z-index: 3;
  backdrop-filter: blur(2px);
  text-align: center;
  padding: 0 16px;
}
.cd-title {
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
.cd-btnitem .cd-btn {
  background: var(--tool-bg-h);
  text-align: center;
  min-width: 80px;
  padding: 6px;
  margin: 0 6px;
  border-radius: 4px;
  transition: 0.2s;
  cursor: pointer;
}
.cd-btnitem .cd-btn:hover {
  opacity: 0.8;
}
.cd-cell {
  background: rgba(20, 27, 45, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.cd-cell::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.cd-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  background: linear-gradient(180deg, white 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cd-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
[data-theme="light"] .cd-cell {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .cd-num {
  background: linear-gradient(180deg, #1a202c 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .cd-cell::before {
  background: rgba(0, 0, 0, 0.04);
}
/* ===== 主播 ===== */

.match-stats {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
}
.host-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  margin-right: 5px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.host-row {
  width: calc(100% - 40px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
  overflow-x: auto;
}
.host-row::-webkit-scrollbar {
  display: none;
}
.host-av {
  background: var(--avatar-border);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.host-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.host-chip:hover {
  border-color: #4a5270;
  color: var(--text);
}
.host-chip.active {
  background: var(--green-soft-bg);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}
.host-chip .playing {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
  transition: 0.15s;
}
.host-chip.active .playing .bar {
  background: var(--green);
}
.host-chip .playing .bar {
  background: var(--text-3);
  width: 2.5px;
  height: 100%;
  border-radius: 1px;
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}
.host-chip .playing .bar:nth-child(2) {
  animation-delay: 0.2s;
}
.host-chip .playing .bar:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes eq {
  0%, 100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
[data-theme="light"] .host-chip.active {
  background: rgba(34, 197, 94, 0.08);
}
[data-theme="light"] .host-chip.active {
  border-color: rgba(34, 197, 94, 0.3);
}
.ant .timeLine {
  width: 100%;
  height: 125px;
  padding: 0;
}
/* ===== Chat Panel ===== */

.chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.chat-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
}
.chat-tab {
  color: var(--text-2);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  padding: 15px 14px;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}
.chat-tab:hover {
  color: var(--text);
}
.chat-tab.active {
  color: var(--green);
}
.chat-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--green);
}
.audience {
  color: var(--text-2);
  font-size: 12px;
  line-height: 20px;
  margin-left: auto;
  padding: 15px 12px;
}
.audience .icon {
  margin-right: 5px;
  vertical-align: -2px;
}
.chat-banner {
  display: flex;
  align-items: center;
  padding: 0 0 0 10px;
  background: rgba(234, 179, 8, 0.1);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: #ca8a04;
}
[data-theme="light"] .chat-banner {
  color: #b45309;
}
.chat-banner .icon {
  margin-right: 8px;
}
.chat-banner .msg {
  flex: 1;
  height: 30px;
}
.chat-banner .swiper-wrapper {
  width: max-content;
  animation: notice-scroll calc(3*7s) linear infinite;
  will-change: transform;
}
.chat-banner .swiper-slide {
  line-height: 16px;
  width: auto;
  margin-right: 60px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
@keyframes notice-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}
.chat-banner .closeitem {
  padding: 0 5px;
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.chat-scroll-btn {
  background: #3d4659;
  color: #ca8a04;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: absolute;
  right: 12px;
  bottom: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 5;
  transition: opacity 0.2s, transform 0.2s;
}
[data-theme="light"] .chat-scroll-btn {
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.chat-scroll-btn:hover {
  transform: translateY(-2px);
}
.chat-scroll-btn svg {
  display: block;
}
.chat-item {
  display: flex;
  gap: 8px;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.5;
  align-items: flex-start;
}
.chat-av {
  background: var(--avatar-border);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.chat-content {
  flex: 1;
  min-width: 0;
}
.chat-name {
  color: var(--green-2);
  font-weight: 600;
  margin-right: 4px;
}
.chat-text {
  color: var(--text);
  word-break: break-word;
}
.chat-text img {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -3px;
  display: inline-block;
}
.chat-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 4px;
  color: white;
}
.tag-live {
  background: var(--red);
}
.tag-vip {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.tag-mod {
  background: var(--blue);
}
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
  position: relative;
}
.chat-input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.chat-input input:focus {
  border-color: var(--blue);
}
.chat-input input::placeholder {
  color: var(--text-3);
}
.chat-send {
  width: 32px;
  height: 32px;
  background: var(--green-2);
  color: white;
  font-size: 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}
.chat-send:hover {
  background: var(--green);
}
.chat-send .icon {
  transform: translate(2px, -2px) rotate(-45deg);
}
.chat-emoji {
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: 0.2s;
  padding: 0;
}
.chat-emoji:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.chat-emoji.active {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
}
.emoji-popup {
  position: absolute;
  bottom: 60px;
  right: 6px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 20;
}
.emoji-popup.open {
  display: block;
}
.emoji-popup-header {
  font-size: 12px;
  color: var(--text-2);
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.emoji-popup-header .close {
  width: 16px;
  height: 16px;
}
.emoji-grid {
  height: 150px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}
.emoji-item {
  font-size: 20px;
  width: 28px;
  height: 28px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
  line-height: 1;
}
.emoji-item:hover {
  background: var(--bg-input);
  transform: scale(1.15);
}
/* ===== Responsive ===== */

@media (max-width: 960px) {
  .inner {
    height: var(--h5-height);
    overflow: hidden;
  }
  .header {
    position: relative;
  }
  .match-section {
    padding: 10px;
  }
  .match-grid,
  .video-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .match-card {
    padding: 12px 14px 8px 14px;
  }
  .team-name {
    font-size: 13px;
  }
  .match-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  .predictor-name {
    max-width: 90px;
  }
  .odds {
    font-size: 10px;
  }
  .odds span {
    padding: 0 5px;
    margin: 0 0 0 3px;
  }
  .live-tag {
    display: none;
  }
  .match-stats {
    padding: 5px 8px;
    border: none;
  }
  .host-row {
    width: 100%;
  }
  .host-chip {
    font-size: 11px;
  }
  .video-card {
    border: none;
    border-radius: 0;
    flex-shrink: 0;
  }
  .video-top {
    border: none;
  }
  .video-card .ant {
    display: none;
  }
  .ant .timeLine {
    height: 90px;
  }
  .chat-card {
    height: 63vh;
    border: none;
    border-radius: 0;
  }
  .chat-tab {
    font-size: 15px;
    padding: 8px 10px;
  }
  .audience {
    padding: 8px;
  }
  .chat-banner {
    font-size: 11px;
    padding: 0 0 0 8px;
  }
  .chat-item {
    font-size: 12px;
    padding: 5px 10px;
  }
  .chat-scroll-btn {
    bottom: 60px;
  }
  .chat-input {
    padding: 8px 10px;
  }
  .newH5 .information-item {
    display: none;
  }
  .newH5 .video-section {
    height: 100%;
    gap: 5px;
    margin: 0;
  }
  .newH5 .video-top {
    padding: 5px;
  }
  .newH5 .video-top .back {
    background: var(--bg-main);
    margin: 0 5px;
    display: block;
  }
  .newH5 .video-top .back::before {
    border-width: 2px;
  }
  .newH5 .video-top .team-mini {
    font-size: 12px;
    font-weight: 500;
  }
  .newH5 .video-top .score-mini .num {
    font-size: 16px;
  }
  .newH5 .chat-card {
    flex: 1;
  }
  .newH5 .chat-list {
    margin-bottom: 50px;
  }
  .newH5 .chat-input {
    width: 100%;
    position: fixed;
    bottom: var(--chat-bottom);
    z-index: 100;
  }
}
@media (max-width: 414px) {
  .match-card {
    padding: 10px 10px 8px 10px;
  }
  .team-logo {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }
  .team-name {
    font-size: 12px;
  }
  .score {
    padding: 0;
  }
  .score,
  .score.notyet .vs {
    font-size: 20px;
  }
  .score .minute {
    font-size: 10px;
    padding: 1px 4px;
  }
  .predictor-av {
    width: 16px;
    height: 16px;
  }
  .information-item {
    font-size: 12px;
  }
  .video-top {
    padding: 15px 10px;
  }
  .score-mini {
    gap: 4px;
    margin: 0 5px;
  }
  .countdown {
    gap: 14px;
  }
  .cd-grid {
    gap: 6px;
    max-width: 280px;
  }
  .cd-num {
    font-size: 24px;
  }
  .cd-label {
    font-size: 10px;
  }
  .host-icon {
    width: 26px;
    height: 26px;
  }
  .host-icon .icon {
    width: 16px;
    height: 16px;
  }
  .host-av {
    width: 18px;
    height: 18px;
  }
}
