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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: #222;
  background: #f5f5f5;
  line-height: 1.7;
}

a { color: #c0392b; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1e1e2e;
  padding: 1rem 0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  padding: .75rem 1.2rem 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #333;
}

.sidebar-logo span { color: #e74c3c; }

.nav-section {
  padding: .7rem 1.2rem .2rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #666;
}

.nav-link {
  display: block;
  padding: .35rem 1.2rem;
  color: #bbb;
  font-size: .88rem;
  transition: background .15s, color .15s;
}

.nav-link:hover {
  background: #2a2a3e;
  color: #fff;
  text-decoration: none;
}

.nav-link.active {
  color: #e74c3c;
  background: #2a2a3e;
  font-weight: 600;
}

/* Content */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
  max-width: 860px;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #e74c3c;
  color: #111;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 .6rem;
  color: #111;
}

h3 { font-size: 1rem; margin: 1.5rem 0 .4rem; color: #333; }

p { margin: .6rem 0; }

.subtitle { color: #666; font-size: 1rem; margin-bottom: 1.5rem; }

ul, ol { margin: .5rem 0 .5rem 1.5rem; }
li { margin: .25rem 0; }

/* Name lists */
.name-list {
  list-style: none;
  margin: 0 0 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .35rem;
}

.name-list li {
  background: #fff;
  padding: .5rem .8rem;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .88rem;
  transition: all .2s;
}

.name-list li:hover {
  border-color: #c0392b;
  background: #fffafa;
  transform: translateY(-1px);
}

code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .88em;
  background: #eee;
  padding: .1em .35em;
  border-radius: 3px;
  color: #c0392b;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
  color: #eee;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.hero p { font-size: 1.05rem; line-height: 1.8; margin: 0; }
.hero strong { color: #e74c3c; }

/* Featured grid (homepage) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.featured-card {
  display: block;
  background: #fff;
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all .2s;
  color: #333;
}

.featured-card:hover {
  border-color: #c0392b;
  box-shadow: 0 2px 12px rgba(192,57,43,0.1);
  transform: translateY(-3px);
  text-decoration: none;
}

.card-icon { font-size: 2rem; margin-bottom: .5rem; }

.featured-card h3 { font-size: 1rem; margin: 0 0 .3rem; color: #1e1e2e; }

.featured-card p { font-size: .85rem; color: #666; margin: 0; line-height: 1.5; }

/* Trending */
.trending-list { margin: .5rem 0 1.5rem; }

.trend-item {
  padding: .5rem .8rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  margin-bottom: .35rem;
  font-size: .88rem;
}

.trend-rank {
  display: inline-block;
  font-weight: 700;
  color: #e74c3c;
  margin-right: .5rem;
  min-width: 2rem;
}

/* Tips */
.tips { margin: .5rem 0 1.5rem; }

.tip {
  background: #fff8f8;
  border-left: 3px solid #c0392b;
  padding: .8rem 1rem;
  margin-bottom: .6rem;
  border-radius: 0 4px 4px 0;
}

.tip strong { color: #c0392b; }
.tip p { margin: .3rem 0 0; font-size: .88rem; color: #555; }

/* Subscribe box */
.subscribe-box {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #fff8f8;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  text-align: center;
}

.subscribe-label {
  font-size: .9rem;
  font-weight: 600;
  color: #c0392b;
  margin-bottom: .75rem;
}

.subscribe-box p { font-size: .88rem; color: #666; }

/* Footer */
.footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  font-size: .82rem;
  color: #999;
}

.footer a { color: #999; }
.footer a:hover { color: #c0392b; }

/* Adsterra slot placeholder */
.ad-slot {
  background: #fafafa;
  border: 1px dashed #ddd;
  text-align: center;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 4px;
  font-size: .75rem;
  color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 1.5rem; }
  .name-list { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
}
