
:root {
  --bg-main: #121214;
  --bg-card: #18181c;
  --bg-card-hover: #222228;
  --border-color: #2a2a32;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #38bdf8; text-decoration: underline; }

header {
  background: #16161a;
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 100;
  padding: 12px 24px;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-logo span { color: var(--accent-cyan); }

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 18px;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.2s;
}
nav a:hover, nav a.active {
  color: var(--accent-cyan);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-box { position: relative; display: flex; align-items: center; }
.search-icon-btn {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 0.8rem; color: #94a3b8; pointer-events: none; z-index: 2;
}
.search-input {
  background: #22222a;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 7px 14px 7px 30px;
  border-radius: 20px;
  font-size: 0.82rem;
  width: 190px;
  outline: none;
  transition: width 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.search-input:focus {
  width: 270px;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}
.search-results {
  position: absolute; right: 0; top: 40px; background: #1a1a22; border: 1px solid #3a3a4a;
  border-radius: var(--radius); width: 380px; max-height: 460px; overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6); display: none; z-index: 1000;
}
.search-results a {
  display: block; padding: 10px 14px; border-bottom: 1px solid #2a2a36; color: var(--text-main); font-size: 0.88rem;
  transition: background 0.15s;
}
.search-results a:hover { background: #282836; text-decoration: none; }
.search-tag {
  display: inline-block; font-size: 0.72rem; padding: 1px 6px; border-radius: 4px;
  margin-right: 6px; font-weight: 600; background: #312e81; color: #a5b4fc;
}

.tg-btn {
  background: #0088cc;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s;
}
.tg-btn:hover { background: #0099e6; text-decoration: none; transform: translateY(-1px); }

.main-container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.hero-box {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid #312e81; border-radius: var(--radius);
  padding: 35px; margin-bottom: 35px; text-align: center;
}
.hero-box h1 { font-size: 1.8rem; margin-bottom: 15px; color: #fff; }
.hero-box p { color: #cbd5e1; font-size: 1rem; max-width: 900px; margin: 0 auto 20px; }

.top4-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; margin-bottom: 40px;
}
.top4-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 22px; position: relative; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}
.top4-card:hover { transform: translateY(-3px); border-color: var(--accent-cyan); }
.top4-card.rank-1 { border-color: var(--accent-gold); }
.rank-badge {
  position: absolute; top: -12px; left: 16px; background: var(--accent-indigo); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; text-transform: uppercase;
}
.top4-card.rank-1 .rank-badge { background: var(--accent-gold); color: #000; }

.card-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-top: 5px; margin-bottom: 8px; }
.card-price { font-size: 1.1rem; color: var(--accent-green); font-weight: 700; margin-bottom: 10px; }
.card-features { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 15px; }
.cta-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #fff !important; text-align: center; font-weight: 700; padding: 10px 16px;
  border-radius: var(--radius); display: block; width: 100%; transition: opacity 0.2s;
}
.cta-btn:hover { opacity: 0.9; text-decoration: none; }

.content-section { margin-bottom: 40px; }
.section-title { font-size: 1.4rem; font-weight: 700; color: #fff; border-left: 4px solid var(--accent-cyan); padding-left: 12px; margin-bottom: 20px; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.article-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
}
.article-card h3 { font-size: 1.1rem; color: #fff; margin-bottom: 10px; }
.article-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.article-meta { font-size: 0.8rem; color: #64748b; display: flex; justify-content: space-between; }

.article-content { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 35px; }
.article-content h1 { font-size: 1.8rem; color: #fff; margin-bottom: 15px; }
.article-content h2 { font-size: 1.35rem; color: #38bdf8; margin: 30px 0 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.article-content h3 { font-size: 1.15rem; color: #cbd5e1; margin: 20px 0 10px; }
.article-content p { margin-bottom: 16px; font-size: 1rem; color: #cbd5e1; }
.article-content ul, .article-content ol { margin-left: 25px; margin-bottom: 16px; color: #cbd5e1; }
.article-content li { margin-bottom: 6px; }

table { width: 100%; border-collapse: collapse; margin: 25px 0; background: #16161c; border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
th { background: #202028; color: #fff; }

footer { background: #0c0c0e; border-top: 1px solid var(--border-color); padding: 40px 20px; margin-top: 60px; color: var(--text-muted); font-size: 0.88rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }

@media (max-width: 1100px) {
  .header-container { flex-wrap: wrap; justify-content: space-between; }
  nav { order: 3; width: 100%; justify-content: flex-start; margin-top: 10px; }
  nav ul { overflow-x: auto; padding-bottom: 5px; }
}
