html, body {
  width: 1920px;
  height: 1080px;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #fff8e1, #fff3cd);
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

h1 {
  font-size: 80px;
  color: #b8860b;
  margin: 20px 0;
  text-align: center;
}

.table-container {
  width: 1800px;
  height: 850px;
  border: 5px solid #d4af37;
  border-radius: 20px;
  background-color: #fffef2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tiêu đề bảng */
#goldHeader {
  width: 100%;
  border-collapse: collapse;
  font-size: 50px;
  text-align: center;
  table-layout: fixed;
}

th {
  border: 3px solid #d4af37;
  background-color: #f7e4a8;
  padding: 25px 10px;
}

.col-stt { width: 8%; }
.col-name { width: 28%; }
.col-location { width: 20%; }
.col-buy { width: 22%; }
.col-sell { width: 22%; }

/* Khu vực cuộn */
.scroll-area {
  position: relative;
  width: 100%;
  height: 740px;
  overflow: hidden;
}

/* Cuộn bảng chính */
.scroll-content {
  display: block;
  animation: scrollLoop linear infinite;
  animation-duration: 30s !important; /* chỉnh để nhanh/chậm */
  will-change: transform;
  transform: translateZ(0);
}

.scroll-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 50px;
  text-align: center;
  table-layout: fixed;
}

.scroll-table td {
  border: 3px solid #d4af37;
  padding: 25px 10px;
}

.scroll-table tr:nth-child(even) {
  background-color: #fffbea;
}

/* Hiệu ứng cuộn */
@keyframes scrollLoop {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* Đồng hồ góc trái trên cùng */
#clock {
  position: fixed;
  top: 12px;
  left: 18px;
  z-index: 9999;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  line-height: 1.1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
}
#clock .clk-time { font-size: 56px; font-weight: 700; letter-spacing: 1px; }
#clock .clk-date { font-size: 28px; opacity: 0.95; }

@media (max-width: 1280px) {
  #clock .clk-time { font-size: 28px; }
  #clock .clk-date { font-size: 14px; }
}

/* -------------------------- */
/* Ticker giá vàng chạy liên tục */
/* -------------------------- */

#goldTicker {
  position: fixed;
  inset: auto 0 0 0;
  height: 70px;
  z-index: 10000;
  background: linear-gradient(90deg,#3a2f12,#5a471a);
  color: #fff;
  border-top: 3px solid #d4af37;
  overflow: hidden;
}

#goldTicker .ticker-track {
  white-space: nowrap;
  display: inline-block;
  line-height: 70px;
  font-size: 34px;
  letter-spacing: 0.2px;
  animation: tickerMove 90s linear infinite;
  will-change: transform;
  padding-left: 0;
}

/* chạy liên tục, không ngắt: chỉ cuộn -50% (vì có 2 bản text lặp) */
@keyframes tickerMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

#goldTicker .item { margin: 0 28px; }
#goldTicker .label { color:#ffd36a; font-weight:700; margin-right: 6px; }
#goldTicker .val { font-variant-numeric: tabular-nums; }
#goldTicker .sep { opacity: .55; margin: 0 16px; }

#goldTicker:hover .ticker-track { animation-play-state: paused; }

@media (max-width: 1366px) {
  #goldTicker { height: 56px; }
  #goldTicker .ticker-track { line-height: 56px; font-size: 24px; }
}
