
[data-theme="dark"] {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --border:      #2a2a2a;
  --border-hover:#555555;
  --text-primary:#e8e8e8;
  --text-sub:    #888888;
  --icon-color:  #666666;
  --icon-hover:  #e8e8e8;
  --pin-bg:      #1a1a1a;
  --pin-border:  #3a3a3a;
  --pin-text:    #aaaaaa;
  --link-color:  #888888;
  --link-hover:  #e8e8e8;
}

[data-theme="light"] {
  --bg:          #f4f4f4;
  --surface:     #ffffff;
  --border:      #dddddd;
  --border-hover:#aaaaaa;
  --text-primary:#111111;
  --text-sub:    #666666;
  --icon-color:  #888888;
  --icon-hover:  #111111;
  --pin-bg:      #f9f9f9;
  --pin-border:  #cccccc;
  --pin-text:    #888888;
  --link-color:  #888888;
  --link-hover:  #111111;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

header {
  padding: 28px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  transition: color 0.3s ease;
  text-align: center;
}

#telegram-link {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
  transition: color 0.2s ease, transform 0.25s ease;
  padding: 4px;
}

#telegram-link:hover {
  color: var(--icon-hover);
  transform: translateY(-2px);
}

#telegram-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

#theme-toggle {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, transform 0.25s ease;
  outline: none;
}

#theme-toggle:hover {
  color: var(--icon-hover);
  transform: rotate(15deg);
}

#theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ── Main layout ── */
.projects {
  padding: 8px 0 80px;
}

/* ── Pinned section ── */
.pinned-section {
  margin-bottom: 28px;
}

.card-pinned {
  border-color: var(--pin-border) !important;
  background: var(--pin-bg) !important;
}

.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pin-text);
  background: var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 12px;
}

.pin-badge svg {
  fill: var(--pin-text);
  flex-shrink: 0;
}

/* ── Section label ── */
.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.accounts-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 700px) {
  .accounts-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .accounts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition:
    border-color 0.25s ease,
    background 0.3s ease,
    transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.card-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-sub);
  line-height: 1.65;
  transition: color 0.3s ease;
}

/* ── Meta rows (price, rank, etc.) ── */
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 14px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.meta-icon {
  font-size: 0.8rem;
  line-height: 1;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.meta-val {
  font-weight: 400;
  color: var(--text-primary);
}

/* ── Tags ── */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-sub);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 9px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.card:hover .tag {
  border-color: var(--border-hover);
}

/* ── Screenshot link ── */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: auto;
  padding-top: 14px;
}

.card-link:hover {
  color: var(--link-hover);
}

.card-link svg {
  flex-shrink: 0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeUp 0.35s ease both; }
.card-pinned { animation-delay: 0.02s; }
.accounts-grid .card:nth-child(1) { animation-delay: 0.08s; }
.accounts-grid .card:nth-child(2) { animation-delay: 0.13s; }
.accounts-grid .card:nth-child(3) { animation-delay: 0.18s; }
.accounts-grid .card:nth-child(4) { animation-delay: 0.23s; }
.accounts-grid .card:nth-child(5) { animation-delay: 0.28s; }
.accounts-grid .card:nth-child(6) { animation-delay: 0.33s; }
.accounts-grid .card:nth-child(7) { animation-delay: 0.38s; }
.accounts-grid .card:nth-child(8) { animation-delay: 0.43s; }
