/* Yue Theme Inspired Clean & Modern Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --success: #16a34a;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CH", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.brand-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: none;
  white-space: nowrap;
}
@media(min-width: 1024px) { .brand-tagline { display: inline-block; } }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
nav.main-nav a {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-block;
}
nav.main-nav a:hover, nav.main-nav a.active {
  background-color: #eff6ff;
  color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-tg-header {
  background-color: #0088cc;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,136,204,0.2);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon-img {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  color: var(--text-muted);
}
.search-input {
  padding: 8px 14px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.88rem;
  width: 285px;
  transition: width 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.search-input:focus {
  outline: none;
  width: 340px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-tg-header {
  background-color: #0088cc;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,136,204,0.2);
}
.btn-tg-header:hover {
  background-color: #0077b5;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

@media(max-width: 900px) {
  nav.main-nav { display: none; }
  nav.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--surface);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .menu-toggle { display: block; }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  padding: 50px 0 45px;
  text-align: center;
  border-bottom: 4px solid #3b82f6;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 18px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cluster-text {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 850px;
  margin: 0 auto 24px;
  color: #e0f2fe;
  background: rgba(0, 0, 0, 0.15);
  padding: 14px 20px;
  border-radius: 8px;
  border-left: 4px solid #60a5fa;
  text-align: left;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-main {
  background: #f59e0b;
  color: #0f172a !important;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}
.btn-hero-main:hover { background: #d97706; }
.btn-hero-sub {
  background: rgba(255,255,255,0.2);
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-hero-sub:hover { background: rgba(255,255,255,0.3); }

/* Main Layout Grid */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  margin: 40px 0;
}
@media(max-width: 960px) {
  .layout-grid { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.provider-card-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.provider-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.provider-card.top-4 {
  border: 2px solid #3b82f6;
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
}
.rank-badge {
  background: #3b82f6;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.top-4 .rank-badge {
  background: linear-gradient(135deg, #dc2626, #f59e0b);
}
.rank-num { font-size: 1.4rem; line-height: 1; }
.rank-label { font-size: 0.65rem; text-transform: uppercase; margin-top: 2px; }

.provider-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.provider-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.tag {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag.tag-ai { background: #dbeafe; color: #1e40af; }
.tag.tag-coupon { background: #fef3c7; color: #92400e; }

.provider-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.provider-details-grid .detail-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.provider-details-grid .detail-item.full-width {
  grid-column: 1 / -1;
  border-top: 1px dashed #cbd5e1;
  padding-top: 8px;
  margin-top: 4px;
}

.provider-details-grid .detail-label {
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}

.provider-details-grid .detail-value {
  color: #0f172a;
  font-weight: 600;
}

.provider-details-grid .highlight-price {
  color: #dc2626;
  font-weight: 800;
  font-size: 0.95rem;
}

.provider-details-grid .detail-sub {
  color: #64748b;
  font-size: 0.82rem;
}

.provider-details-grid .text-desc {
  color: #475569;
  font-weight: 400;
}

@media (max-width: 640px) {
  .provider-details-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}


.provider-meta-row {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.provider-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

/* EYE-CATCHING REGISTER BUTTON */
.btn-register {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
  transition: transform 0.2s, background 0.2s;
  display: block;
}
.btn-register:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  transform: scale(1.03);
}

.btn-detail {
  background: #f1f5f9;
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.btn-detail:hover { background: #e2e8f0; }

@media(max-width: 650px) {
  .provider-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .rank-badge { margin: 0 auto; }
  .provider-meta-row { justify-content: center; flex-wrap: wrap; }
  .provider-actions { flex-direction: row; justify-content: center; }
}

.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
table.cmp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
table.cmp-table th, table.cmp-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.cmp-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
table.cmp-table tr:hover { background: #f8fafc; }

.btn-cmp-register {
  background: #dc2626;
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
  transition: background 0.2s, transform 0.1s;
}
.btn-cmp-register:hover {
  background: #b91c1c;
  transform: scale(1.04);
}

.tag-ai-badge {
  font-size: 0.78rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.4;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s;
}
.article-card:hover { transform: translateY(-3px); }
.article-card h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.article-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.article-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.widget-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
.widget-list { list-style: none; }
.widget-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}
.widget-list li:last-child { border-bottom: none; }

.article-header {
  margin-bottom: 30px;
  text-align: center;
}
.article-header h1 {
  font-size: 2.1rem;
  line-height: 1.3;
  margin-bottom: 14px;
  color: #0f172a;
}
.article-meta-header {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1e293b;
  background: var(--surface);
  padding: 35px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.article-body h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: #0f172a;
}
.article-body h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: #1e293b;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-size: 0.92rem;
}

.article-body th, 
.article-body td {
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  line-height: 1.6;
}

.article-body th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.article-body tr:nth-child(even) {
  background-color: #f8fafc;
}

.article-body tr:hover {
  background-color: #f1f5f9;
}

.article-body td strong {
  color: #0f172a;
}


.callout-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}
.callout-box.warning {
  background: #fef2f2;
  border-left-color: var(--accent);
}

.top4-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.top4-card-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
@media(max-width: 900px) {
  .top4-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 500px) {
  .top4-card-grid { grid-template-columns: 1fr; }
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.faq-question {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-answer {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
}

footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 0 30px;
  margin-top: 60px;
  border-top: 4px solid var(--primary);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
@media(max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-about h4, .footer-links h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.footer-seo-p {
  line-height: 1.7;
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #ffffff; }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.8rem;
}

#search-results-modal {
  display: none;
  position: absolute;
  top: 45px;
  right: 0;
  width: 350px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  padding: 10px;
}
#search-results-modal.active { display: block; }
.search-result-item {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.search-result-item a { font-weight: 700; font-size: 0.9rem; }
