:root {
  --primary: #1a56db;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #06b6d4;
  --accent-light: #67e8f9;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #1a56db 0%, #06b6d4 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-light); transition: all 0.3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--dark); }
.logo-icon {
  width: 40px; height: 40px; background: var(--gradient); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
}
.nav { display: flex; gap: 36px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--dark-2); position: relative; padding: 4px 0; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px;
  background: var(--gradient); border-radius: 2px;
}
.header-cta {
  padding: 10px 24px; background: var(--gradient); color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,86,219,0.3); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ===== Hero / Banner ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden;
  background: var(--gradient-dark); padding-top: 72px;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%); border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,86,219,0.2) 0%, transparent 70%); border-radius: 50%;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; width: 100%; }
.hero-text { color: #fff; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  background: rgba(6,182,212,0.15); border: 1px solid rgba(6,182,212,0.3);
  border-radius: 20px; font-size: 13px; color: var(--accent-light); margin-bottom: 20px;
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h1 .highlight { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 32px; max-width: 480px; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; }
.hero-stat .num { font-size: 32px; font-weight: 700; color: #fff; }
.hero-stat .label { font-size: 13px; color: rgba(255,255,255,0.6); }

/* Brand check card */
.brand-check-card {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 40px; backdrop-filter: blur(20px);
}
.brand-check-card h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.brand-check-card .sub { color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: 28px; }
.brand-check-form { display: flex; flex-direction: column; gap: 16px; }
.brand-check-form input {
  width: 100%; padding: 14px 18px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; color: #fff; font-size: 15px;
  transition: border-color 0.2s;
}
.brand-check-form input::placeholder { color: rgba(255,255,255,0.4); }
.brand-check-form input:focus { outline: none; border-color: var(--accent); }
.brand-check-submit {
  padding: 16px; background: var(--gradient); border: none; border-radius: 12px;
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.brand-check-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(6,182,212,0.3); }
.brand-check-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.brand-check-note { font-size: 12px; color: rgba(255,255,255,0.4); text-align: center; }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-light { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag { display: inline-block; padding: 4px 16px; background: rgba(26,86,219,0.1); color: var(--primary); border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.section-header h2 { font-size: 36px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--gray); max-width: 600px; margin: 0 auto; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card {
  background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius);
  padding: 32px; transition: all 0.3s; position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px; background: rgba(26,86,219,0.1); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px;
}
.service-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.service-card p { color: var(--gray); font-size: 14px; line-height: 1.7; }
.service-features { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.service-features li { list-style: none; font-size: 13px; color: var(--dark-2); display: flex; align-items: center; gap: 8px; }
.service-features li::before { content: '✓'; color: var(--success); font-weight: bold; }

/* Cases */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 24px; }
.case-card { background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius); overflow: hidden; transition: all 0.3s; cursor: pointer; }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-card-img { height: 200px; background: var(--gradient-dark); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 48px; }
.case-card-body { padding: 24px; }
.case-tag { display: inline-block; padding: 2px 10px; background: rgba(26,86,219,0.1); color: var(--primary); border-radius: 4px; font-size: 12px; margin-bottom: 12px; }
.case-card-body h3 { font-size: 18px; margin-bottom: 8px; }
.case-card-body .client { font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.case-result { padding: 12px; background: var(--bg-light); border-radius: 8px; font-size: 13px; color: var(--dark-2); border-left: 3px solid var(--accent); }

/* News */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item { display: flex; gap: 24px; padding: 24px; background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius); transition: all 0.3s; cursor: pointer; }
.news-item:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.news-date { text-align: center; min-width: 70px; padding: 12px; background: var(--bg-light); border-radius: 8px; }
.news-date .day { font-size: 28px; font-weight: 700; color: var(--primary); }
.news-date .month { font-size: 12px; color: var(--gray); }
.news-content { flex: 1; }
.news-category { display: inline-block; padding: 2px 10px; background: rgba(26,86,219,0.1); color: var(--primary); border-radius: 4px; font-size: 12px; margin-bottom: 8px; }
.news-content h3 { font-size: 18px; margin-bottom: 8px; transition: color 0.2s; }
.news-item:hover .news-content h3 { color: var(--primary); }
.news-summary { font-size: 14px; color: var(--gray); }
.news-meta { font-size: 12px; color: var(--gray-light); margin-top: 8px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 36px; margin-bottom: 16px; }
.about-text p { color: var(--gray); margin-bottom: 16px; font-size: 16px; line-height: 1.8; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.about-feature { display: flex; gap: 12px; align-items: flex-start; }
.about-feature .icon { font-size: 24px; color: var(--primary); }
.about-feature .text h4 { font-size: 16px; margin-bottom: 4px; }
.about-feature .text p { font-size: 13px; color: var(--gray); margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h2 { font-size: 32px; margin-bottom: 24px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-item .icon { width: 48px; height: 48px; background: rgba(26,86,219,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.contact-item .info h4 { font-size: 16px; margin-bottom: 4px; }
.contact-item .info p { color: var(--gray); font-size: 14px; }
.contact-form { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--gray-light); border-radius: 8px; font-size: 15px;
  font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-primary {
  width: 100%; padding: 14px; background: var(--gradient); border: none; border-radius: 8px;
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,86,219,0.3); }

/* ===== Footer ===== */
.footer { background: var(--dark); color: rgba(255,255,255,0.6); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { color: #fff; font-size: 20px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ===== Modal / Popup ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: #fff; border-radius: 20px; max-width: 720px; width: 100%;
  max-height: 90vh; overflow-y: auto; transform: scale(0.9); transition: transform 0.3s;
}
.modal-overlay.show .modal { transform: scale(1); }
.modal-header { padding: 32px 32px 0; text-align: center; position: relative; }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray); }
.modal-body { padding: 24px 32px 32px; }

/* Score display */
.score-display { text-align: center; margin-bottom: 24px; }
.score-circle {
  width: 120px; height: 120px; margin: 0 auto 16px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.score-circle svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.score-circle .score-bg { stroke: var(--gray-light); stroke-width: 8; fill: none; }
.score-circle .score-fg { stroke-width: 8; fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }
.score-value { font-size: 36px; font-weight: 800; }
.score-label { font-size: 14px; color: var(--gray); }
.score-level { display: inline-block; padding: 4px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.score-level.excellent { background: rgba(16,185,129,0.1); color: var(--success); }
.score-level.good { background: rgba(59,130,246,0.1); color: var(--primary-light); }
.score-level.average { background: rgba(245,158,11,0.1); color: var(--warning); }
.score-level.poor { background: rgba(239,68,68,0.1); color: var(--danger); }

.score-summary { text-align: center; font-size: 15px; color: var(--gray); margin-bottom: 24px; line-height: 1.7; padding: 16px; background: var(--bg-light); border-radius: 12px; }

.score-dimensions { margin-bottom: 24px; }
.score-dimensions h4 { font-size: 16px; margin-bottom: 16px; }
.dimension-item { margin-bottom: 12px; }
.dimension-header { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.dimension-header .name { font-weight: 500; }
.dimension-header .score { font-weight: 600; }
.dimension-bar { height: 6px; background: var(--gray-light); border-radius: 3px; overflow: hidden; }
.dimension-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.dimension-comment { font-size: 12px; color: var(--gray); margin-top: 4px; }

.score-suggestions { margin-bottom: 24px; }
.score-suggestions h4 { font-size: 16px; margin-bottom: 16px; }
.suggestion-item { display: flex; gap: 10px; margin-bottom: 10px; font-size: 14px; color: var(--dark-2); }
.suggestion-item .num { width: 24px; height: 24px; background: rgba(26,86,219,0.1); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }

.detected-content-box { padding: 16px; background: var(--bg-light); border-radius: 12px; margin-bottom: 24px; }
.detected-content-box h4 { font-size: 14px; margin-bottom: 8px; color: var(--dark-2); }
.detected-content-box p { font-size: 13px; color: var(--gray); line-height: 1.7; }

.modal-cta { text-align: center; padding: 24px; background: linear-gradient(135deg, rgba(26,86,219,0.05), rgba(6,182,212,0.05)); border-radius: 16px; }
.modal-cta h3 { font-size: 20px; margin-bottom: 8px; }
.modal-cta p { font-size: 14px; color: var(--gray); margin-bottom: 20px; }
.modal-cta-btn {
  display: inline-block; padding: 14px 40px; background: var(--gradient); color: #fff;
  border-radius: 30px; font-size: 16px; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.2s;
}
.modal-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,86,219,0.3); }

/* Contact form in modal */
.contact-form-modal { display: none; }
.contact-form-modal.show { display: block; }
.modal-cta-section.hidden { display: none; }

/* Loading */
.loading-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.loading-spinner .spinner {
  width: 48px; height: 48px; border: 4px solid var(--gray-light);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}
.loading-spinner p { margin-top: 16px; color: var(--gray); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-steps { margin-top: 16px; }
.loading-step { font-size: 13px; color: var(--gray); margin: 6px 0; display: flex; align-items: center; gap: 8px; }
.loading-step.active { color: var(--primary); }
.loading-step.done { color: var(--success); }
.loading-step .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination button {
  padding: 8px 14px; border: 1px solid var(--gray-light); background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 14px; transition: all 0.2s;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--dark); color: #fff; padding: 14px 28px; border-radius: 8px;
  font-size: 14px; z-index: 3000; transition: transform 0.3s; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Whitepaper button */
.header-whitepaper {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--primary); background: #eff6ff; border: 1px solid #bfdbfe;
  text-decoration: none; transition: all 0.3s; cursor: pointer; white-space: nowrap;
}
.header-whitepaper:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Page header */
.page-header { background: var(--gradient-dark); padding: 140px 0 60px; color: #fff; text-align: center; }
.page-header h1 { font-size: 36px; margin-bottom: 12px; }
.page-header p { font-size: 16px; color: rgba(255,255,255,0.6); }

/* Detail pages */
.detail-content { max-width: 800px; margin: 0 auto; }
.detail-content h1 { font-size: 28px; margin-bottom: 16px; }
.detail-meta { display: flex; gap: 16px; font-size: 14px; color: var(--gray); margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-light); }
.detail-body { font-size: 16px; line-height: 1.8; color: var(--dark-2); }
.detail-body p { margin-bottom: 16px; }
.detail-section { margin-bottom: 32px; }
.detail-section h3 { font-size: 20px; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .header-whitepaper { font-size: 12px; padding: 8px 12px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 26px; }
  .news-item { flex-direction: column; }
  .container { padding: 0 16px; }
  .brand-check-card { padding: 24px; }
}

.nav.mobile-open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: #fff; padding: 20px; box-shadow: var(--shadow-lg); gap: 16px; }

/* News table styles (frontend detail page) */
.detail-body .news-table, .detail-body table {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;
}
.detail-body .news-table th, .detail-body .news-table td,
.detail-body table th, .detail-body table td {
  border: 1px solid #e2e8f0; padding: 10px 14px; text-align: left;
}
.detail-body .news-table th, .detail-body table th {
  background: #f1f5f9; font-weight: 600; color: #1e293b;
}
.detail-body .news-table tr:nth-child(even), .detail-body table tr:nth-child(even) {
  background: #f8fafc;
}
.detail-body .news-table tr:hover, .detail-body table tr:hover {
  background: #eff6ff;
}
.detail-body h2 { font-size: 22px; margin: 24px 0 12px; }
.detail-body h3 { font-size: 18px; margin: 20px 0 10px; }
.detail-body ul, .detail-body ol { margin: 12px 0; padding-left: 24px; }
.detail-body li { margin-bottom: 6px; }
.detail-body a { color: var(--primary); text-decoration: underline; }
.detail-body img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
