/* xjs.css - Specific style for Jinsha Lottery */
:root {
  --primary: #16a34a;
  --gold: #d97706;
  --gold-light: #f59e0b;
  --yellow-pale: #ffffcc;
  --yellow-bright: #ffff00;
  --red-deep: #dc2626;
  --blue-deep: #1e3a8a;
  --text-main: #000000;
  --border-color: #e5e7eb;
}

html, body { margin: 0; padding: 0; background-color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; }

/* Layout Container */
.container { max-width: 640px; margin: 0 auto; background: #fff; min-height: 100vh; }

/* Utilities */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.grid { display: grid; }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-7 { grid-template-columns: repeat(7, 1fr); }
.gap-1 { gap: 0.25rem; }
.gap-0 { gap: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 1rem; }
.text-xs { font-size: 0.875rem; }
.text-lg { font-size: 1.3rem; }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 1.8rem; }
.text-3xl { font-size: 2.2rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }

/* Colors */
.text-red { color: #ff0000; }
.text-blue { color: #0000ff; }
.text-green { color: #008000; }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-yellow { color: #ffff00; }
.bg-white { background-color: #ffffff; }
.bg-gray-100 { background-color: #f3f4f6; }

/* Header - Enhanced Banner Style */
.site-header {
  /* Use user-provided banner image */
  background: url('/static/banner.jpg') no-repeat center center;
  background-size: cover;
  padding: 3rem 0; /* Increase height to show more image */
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Main Content Text Base */
main {
  font-size: 1.1rem;
}

/* Decorative glow lines - kept as overlay */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent);
  opacity: 0.5;
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent);
  opacity: 0.5;
}

/* Golden Text Effect */
.site-header .text-xl {
  font-size: 2.5rem; /* Larger title */
  font-family: "Songti SC", "Noto Serif SC", serif; /* Serif font for elegance */
  font-weight: 900;
  letter-spacing: 2px;
  
  /* Gradient Text */
  background: linear-gradient(to bottom, #fef3c7 0%, #f59e0b 50%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  
  /* Multiple Shadows for 3D effect */
  text-shadow: 
    0 2px 0 #78350f, /* Dark Outline */
    0 4px 4px rgba(0,0,0,0.5); /* Drop Shadow */
    
  position: relative;
  display: inline-block;
}

/* Optional: Shine animation on text */
@keyframes shine {
  0% { background-position: -200%; }
  100% { background-position: 200%; }
}

/* Nav Tabs */
.nav-tabs { padding: 0.25rem; background: #fff; }
.nav-item {
  padding: 0.5rem 0;
  text-align: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-weight: bold;
  color: #374151;
  cursor: pointer;
  font-size: 1.1rem;
}
.nav-item.active {
  background: #22c55e; /* Green */
  color: white;
  border-color: #16a34a;
}

/* Info Bar (Period & History) */
.info-bar {
  background: #ffffff;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.3rem;
}
.btn-history {
  background: #e9d5ff; /* Light purple */
  color: #000;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid #d8b4fe;
}

/* Lottery Balls Grid */
.balls-grid {
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
}
.ball-cell {
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  text-align: center;
  background: #fff;
}
.ball-num {
  color: white;
  font-weight: bold;
  font-size: 1.6rem;
  padding: 0.3rem 0;
  display: block;
}
.ball-zodiac {
  color: #000;
  font-size: 1.25rem;
  padding: 0.2rem 0;
  display: block;
  font-weight: bold;
}
/* Ball Backgrounds */
.bg-red { background: #ff0000; }
.bg-green { background: #008000; }
.bg-blue { background: #0000ff; }

/* Next Period Bar */
.next-period-bar {
  background: #ffffcc; /* Pale yellow */
  padding: 0.5rem;
  color: #000;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.2rem;
}
.refresh-link {
  color: #0000ff;
  text-decoration: underline;
  cursor: pointer;
}

/* Red Link Bar */
.red-bar {
  background: #ff0000;
  color: white;
  text-align: center;
  padding: 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
}
.red-bar a { color: white; text-decoration: none; }

/* Table Tag Implementation (User Request) */
table.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.custom-table th {
  padding: 0.75rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.5rem;
  line-height: 1.4;
  border-radius: 8px 8px 0 0;
}

.custom-table td {
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  color: #000;
  line-height: 1.5;
  background: #fff;
  /* Borders mimicking the body border */
  border-left: 2px dashed #f59e0b;
  border-right: 2px dashed #f59e0b;
  border-bottom: 1px dashed #d1d5db;
}

/* Last row handling for proper closure */
.custom-table tr:last-child td {
  border-bottom: 2px dashed #f59e0b;
  border-radius: 0 0 8px 8px;
}

/* Specific Header Styles adaptation for TH */
.custom-table .header-gold {
  background: linear-gradient(to bottom, #f59e0b 0%, #d97706 100%);
  color: #fff;
  text-shadow: 0 2px 2px rgba(0,0,0,0.4);
  border: 1px solid #b45309;
  border-bottom: none;
}

.custom-table .header-yellow {
  background: #ffff00;
  color: #000;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

/* Table Box Component (Replica of user images) - KEEPING FOR COMPATIBILITY if needed, or can be removed */
.table-box {
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.table-header {
  padding: 0.75rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.5rem; /* Large title */
  line-height: 1.4;
  border-radius: 8px 8px 0 0; /* Rounded top */
}

/* Gold Gradient Header (Image 1) */
.header-gold {
  background: linear-gradient(to bottom, #f59e0b 0%, #d97706 100%);
  color: #fff;
  text-shadow: 0 2px 2px rgba(0,0,0,0.4);
  border: 1px solid #b45309;
  border-bottom: none;
}

/* Yellow Header (Image 2) */
.header-yellow {
  background: #ffff00;
  color: #000;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 4px 4px 0 0; /* Slightly smaller radius for this style usually */
}

/* Table Body */
.table-body {
  background: #fff;
  border: 2px dashed #f59e0b; /* Orange dashed border */
  border-top: none;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
}

/* Table Row */
.table-row {
  padding: 0.6rem 0;
  border-bottom: 1px dashed #d1d5db; /* Light grey dashed divider */
  font-size: 1.2rem;
  color: #000;
  line-height: 1.5;
}
.table-row:last-child {
  border-bottom: none;
}

/* Keep helper classes */
.highlight-red { color: #ff0000; }
.highlight-bg-yellow { background-color: #ffff00; padding: 0 2px; }

/* Prediction Box (Legacy - can be removed if fully replaced, but keeping safe) */
.pred-box {
  margin-top: 0.5rem;
}

/* iOS Compact overrides (keep existing logic) */
@supports (-webkit-touch-callout: none) {
  .ball-num { font-size: 1.1rem; }
  .ball-zodiac { font-size: 0.9rem; }
}

/* 计划平特一肖表格样式 */
table.plan-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #86efac;
}

table.plan-table .plan-header {
  background: linear-gradient(to bottom, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.3rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #15803d;
}

table.plan-table tbody tr:nth-child(odd) {
  background: #dcfce7; /* 浅绿色 */
}

table.plan-table tbody tr:nth-child(even) {
  background: #bbf7d0; /* 稍深绿色 */
}

table.plan-table td {
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-weight: bold;
  color: #000;
  border-bottom: 1px solid #86efac;
}

table.plan-table .zodiac-text {
  color: #facc15; /* 黄色文字 */
  font-size: 1.1rem;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

table.plan-table .plan-slogan {
  color: #15803d;
  font-size: 0.9rem;
}

table.plan-table .result-zodiac {
  color: #dc2626; /* 红色 */
}

table.plan-table .result-pending {
  color: #dc2626;
}

/* 平特一尾表格样式 (蓝色) */
table.tail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #93c5fd;
}

table.tail-table .tail-header {
  background: linear-gradient(to bottom, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #1e40af;
}

table.tail-table tbody tr:nth-child(odd) {
  background: #dbeafe; /* 浅蓝色 */
}

table.tail-table tbody tr:nth-child(even) {
  background: #bfdbfe; /* 稍深蓝色 */
}

table.tail-table td {
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-weight: bold;
  color: #1e3a8a;
  border-bottom: 1px solid #93c5fd;
  font-size: 0.95rem;
}

table.tail-table .tail-number {
  background: #facc15;
  color: #000;
  padding: 0.1rem 0.3rem;
  font-weight: bold;
}

table.tail-table .tail-result {
  color: #1e3a8a;
}

table.tail-table .tail-pending {
  color: #1e3a8a;
}

/* 20码中特表格样式 */
table.code-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 2px solid #666;
  background: #fff;
}

table.code-table .code-header {
  background: #fff;
  color: #dc2626;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.5rem;
  border-bottom: 2px solid #666;
}

table.code-table td {
  padding: 0.4rem 0.5rem;
  color: #000;
  border: 1px solid #999;
  vertical-align: middle;
}

table.code-table td:first-child {
  width: 30%;
  color: #dc2626;
  font-weight: bold;
  white-space: nowrap;
}

table.code-table td:nth-child(2) {
  width: 55%;
  color: #000;
  line-height: 1.4;
}

table.code-table td:last-child {
  width: 15%;
  text-align: center;
  font-weight: bold;
}

table.code-table .code-hit {
  background: #facc15;
  color: #000;
  padding: 0 2px;
}

table.code-table .code-result-hit {
  color: #dc2626;
}

table.code-table .code-result-pending {
  color: #000;
}

/* 独合三肖表格样式 */
table.zodiac-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #999;
  background: #fff;
}

table.zodiac-table .zodiac-header {
  background: #fff;
  color: #9333ea;
  font-weight: bold;
  font-size: 1.3rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 1px solid #999;
}

table.zodiac-table .zodiac-subheader {
  background: #fff;
  color: #dc2626;
  font-size: 1rem;
  text-align: center;
  padding: 0.4rem;
  border-bottom: 1px solid #999;
}

table.zodiac-table .zodiac-current {
  background: #fff;
  color: #dc2626;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.5rem;
  border-bottom: 2px solid #999;
  font-weight: bold;
}

table.zodiac-table td {
  padding: 0.5rem;
  color: #000;
  border: 1px solid #999;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.zodiac-table .zodiac-tag-du {
  background: #facc15;
  color: #9333ea;
  padding: 0 3px;
  font-weight: bold;
}

table.zodiac-table .zodiac-tag-he {
  background: #facc15;
  color: #dc2626;
  padding: 0 3px;
  font-weight: bold;
}

table.zodiac-table .zodiac-hit {
  color: #dc2626;
}

table.zodiac-table .zodiac-result {
  color: #dc2626;
}

/* 三肖中特表格样式 */
table.sanxiao-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #f59e0b;
  background: #fff;
}

table.sanxiao-table .sanxiao-header {
  background: linear-gradient(to bottom, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #b45309;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

table.sanxiao-table tbody tr:nth-child(odd) {
  background: #fef3c7;
}

table.sanxiao-table tbody tr:nth-child(even) {
  background: #fde68a;
}

table.sanxiao-table td {
  padding: 0.5rem;
  color: #000;
  border: 1px solid #f59e0b;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.sanxiao-table .sanxiao-zodiac {
  color: #dc2626;
  font-size: 1.05rem;
}

table.sanxiao-table .sanxiao-hit {
  color: #16a34a;
  font-weight: bold;
}

table.sanxiao-table .sanxiao-miss {
  color: #6b7280;
}

table.sanxiao-table .sanxiao-pending {
  color: #dc2626;
}

/* 双波中特表格样式 */
table.wave-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #6366f1;
  background: #fff;
}

table.wave-table .wave-header {
  background: linear-gradient(to bottom, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #4338ca;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

table.wave-table tbody tr:nth-child(odd) {
  background: #e0e7ff;
}

table.wave-table tbody tr:nth-child(even) {
  background: #c7d2fe;
}

table.wave-table td {
  padding: 0.5rem;
  color: #000;
  border: 1px solid #6366f1;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.wave-table .wave-red {
  color: #dc2626;
}

table.wave-table .wave-blue {
  color: #2563eb;
}

table.wave-table .wave-green {
  color: #16a34a;
}

table.wave-table .wave-hit {
  color: #16a34a;
  font-weight: bold;
}

table.wave-table .wave-miss {
  color: #6b7280;
}

table.wave-table .wave-pending {
  color: #dc2626;
}

/* 必中平码表格样式 */
table.pingma-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #818cf8;
  background: #fff;
}

table.pingma-table .pingma-header {
  background: linear-gradient(to bottom, #a78bfa 0%, #7c3aed 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #6d28d9;
}

table.pingma-table tbody tr {
  background: #f5f3ff;
}

table.pingma-table tbody tr:nth-child(even) {
  background: #ede9fe;
}

table.pingma-table td {
  padding: 0.5rem;
  color: #1e3a8a;
  border: 1px solid #c4b5fd;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.pingma-table .pingma-hit {
  background: #facc15;
  color: #000;
  padding: 0 2px;
}

table.pingma-table .pingma-result {
  color: #dc2626;
}

table.pingma-table .pingma-pending {
  color: #dc2626;
}

/* 大小数表格样式 */
table.daxiao-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #f97316;
  background: #fff;
}

table.daxiao-table .daxiao-header {
  background: linear-gradient(to bottom, #fb923c 0%, #ea580c 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #c2410c;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

table.daxiao-table tbody tr:nth-child(odd) {
  background: #fff7ed;
}

table.daxiao-table tbody tr:nth-child(even) {
  background: #ffedd5;
}

table.daxiao-table td {
  padding: 0.5rem;
  color: #000;
  border: 1px solid #fdba74;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.daxiao-table .daxiao-value {
  color: #c2410c;
  font-size: 1.05rem;
}

table.daxiao-table .daxiao-hit {
  color: #16a34a;
  font-weight: bold;
}

table.daxiao-table .daxiao-miss {
  color: #6b7280;
}

table.daxiao-table .daxiao-pending {
  color: #dc2626;
}

/* 三头中特表格样式 */
table.santou-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #818cf8;
  background: #fff;
}

table.santou-table .santou-header {
  background: linear-gradient(to bottom, #a78bfa 0%, #7c3aed 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #6d28d9;
}

table.santou-table tbody tr {
  background: #f5f3ff;
}

table.santou-table tbody tr:nth-child(even) {
  background: #ede9fe;
}

table.santou-table td {
  padding: 0.5rem;
  color: #1e3a8a;
  border: 1px solid #c4b5fd;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.santou-table .santou-num {
  color: #16a34a;
  font-size: 1.05rem;
}

table.santou-table .santou-hit {
  background: #facc15;
  color: #16a34a;
  padding: 0 2px;
}

table.santou-table .santou-result {
  color: #1e3a8a;
}

table.santou-table .santou-pending {
  color: #dc2626;
}

/* 绝杀三尾表格样式 */
table.shawei-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #818cf8;
  background: #fff;
}

table.shawei-table .shawei-header {
  background: linear-gradient(to bottom, #a78bfa 0%, #7c3aed 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #6d28d9;
}

table.shawei-table .shawei-header .highlight {
  color: #facc15;
}

table.shawei-table tbody tr {
  background: #f5f3ff;
}

table.shawei-table tbody tr:nth-child(even) {
  background: #ede9fe;
}

table.shawei-table td {
  padding: 0.5rem;
  color: #1e3a8a;
  border: 1px solid #1e3a8a;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

table.shawei-table .shawei-kill {
  color: #1e3a8a;
}

table.shawei-table .shawei-num {
  background: #facc15;
  color: #1e3a8a;
  padding: 2px 4px;
  font-weight: bold;
}

table.shawei-table .shawei-result {
  color: #1e3a8a;
}

table.shawei-table .shawei-pending {
  color: #1e3a8a;
}

/* 填词爆特码表格样式 */
table.tianci-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 2px solid #16a34a;
  background: #fff;
}

table.tianci-table .tianci-header {
  background: linear-gradient(to bottom, #4ade80 0%, #16a34a 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.6rem;
  border-bottom: 2px solid #15803d;
}

table.tianci-table .tianci-header .arrow {
  color: #facc15;
}

table.tianci-table tbody tr:nth-child(odd) {
  background: #f0fdf4;
}

table.tianci-table tbody tr:nth-child(even) {
  background: #dcfce7;
}

table.tianci-table td {
  padding: 0.5rem;
  color: #000;
  border: 1px solid #86efac;
  text-align: center;
  font-weight: bold;
}

table.tianci-table .tianci-content {
  text-align: left;
  font-size: 0.95rem;
}

table.tianci-table .tianci-answer {
  color: #15803d;
}

table.tianci-table .tianci-hit {
  background: #facc15;
  color: #000;
  padding: 0 2px;
}

table.tianci-table .tianci-result {
  color: #dc2626;
  font-size: 1rem;
}

table.tianci-table .tianci-pending {
  color: #dc2626;
}
