/* ===== CSS Variables & Reset ===== */
:root {
  --color-bg: #fff;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-price: #e53935;
  --color-border: #e8e8e8;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --radius-card: 12px;
  --radius-btn: 6px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gap-grid: 20px;
  --header-h: 60px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Utility ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--color-text);
}

/* ===== Main Layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 48px;
}

/* ===== Section Titles ===== */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  font-weight: 700;
}

/* ===== Account Cards Grid ===== */
.account-cards {
  margin-bottom: 48px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-grid);
}

/* ===== Account Card ===== */
.account-card {
  position: relative;
  cursor: pointer;
  padding: 24px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: #fff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.account-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.account-card[data-platform="telegram"],
.account-card[data-platform="twitter"],
.account-card[data-platform="facebook"],
.account-card[data-platform="instagram"],
.account-card[data-platform="twitch"],
.account-card[data-platform="discord"] {
  background: linear-gradient(135deg, #2d2d2d 0%, #424242 100%);
}

.card-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "icon tag"
    "name price";
  gap: 12px 20px;
  align-items: end;
}

.card-icon {
  grid-area: icon;
  align-self: start;
  width: 44px;
  height: 44px;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-tag {
  grid-area: tag;
  justify-self: end;
  align-self: start;
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
}

.card-name {
  grid-area: name;
  align-self: end;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-price {
  grid-area: price;
  justify-self: end;
  align-self: end;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.card-price::first-letter {
  font-size: 0.85em;
  opacity: 0.95;
}

.btn-buy {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  border-radius: var(--radius-btn);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== Content Cards Grid ===== */
.content-cards {
  margin-top: 48px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-grid);
}

/* ===== Content Card ===== */
.content-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}

.content-card:hover {
  box-shadow: var(--shadow-hover);
}

.content-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.content-body {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.content-body p + p {
  margin-top: 10px;
}

/* ===== Footer ===== */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-text);
}

.copyright {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .account-grid,
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 12px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .account-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 20px 16px 32px;
  }

  .account-card {
    min-height: 140px;
  }
}

/* ===== Performance: reduce motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .account-card:hover,
  .content-card:hover {
    transform: none;
  }
}
