/* ─── COSV5 Redesign — Inspired by cosv5-site visual language ─── */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f1a;
  --bg-card: #14141f;
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --accent-pink: #ff2d7b;
  --accent-purple: #7c3aed;
  --accent-cyan: #22d3ee;
  --accent-gradient: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  --accent-gradient-2: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  --glow-pink: 0 0 30px rgba(255, 45, 123, 0.25);
  --glow-purple: 0 0 30px rgba(124, 58, 237, 0.25);
  --glow-cyan: 0 0 30px rgba(34, 211, 238, 0.2);
  --border-glow: 1px solid rgba(255, 255, 255, 0.06);
  --font-display: 'Orbitron', 'Righteous', sans-serif;
  --font-body: 'Noto Sans SC', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 64px;
  --max-width: 960px;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  animation: bodyFadeIn 0.6s ease;
}
@keyframes bodyFadeIn { from { opacity: 0; } to { opacity: 1; } }
::selection { background: rgba(255, 45, 123, 0.3); color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.5); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ─── Particle Canvas ─── */
#particles-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}

/* ─── Progress Bar ─── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 1001;
  pointer-events: none;
  transition: transform 0.1s linear;
}

/* ─── NAV ─── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--border-glow);
  transition: transform 0.3s ease;
}
.header.hidden { transform: translateY(-100%); }
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active {
  color: var(--accent-pink);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--accent-pink); color: var(--accent-pink); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 0 24px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 123, 0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--accent-pink);
  margin-bottom: 24px;
  text-transform: uppercase;
  animation: fadeInDown 0.8s ease 0.1s both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
  animation: fadeInDown 0.8s ease 0.2s both;
}
.hero h1 .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(255, 45, 123, 0.35));
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  animation: fadeInDown 0.8s ease 0.3s both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInDown 0.8s ease 0.4s both;
}
/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  animation: fadeIn 1s ease 1.2s both;
  z-index: 2;
}
.scroll-arrow {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, var(--accent-pink), transparent);
  animation: scrollBounce 2s ease infinite;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--glow-pink);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(255, 45, 123, 0.5); }
.btn-gold {
  background: linear-gradient(135deg, #f0c040, #f5d868);
  color: #1a1a26;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(240, 192, 64, 0.35); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-outline:hover { border-color: var(--accent-pink); color: var(--accent-pink); background: rgba(255,45,123,0.04); }

/* ─── Section Basics ─── */
.section {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}
.section-bg-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.10;
  pointer-events: none;
}
.section-bg-glow.left { left: -200px; top: 10%; background: var(--accent-purple); }
.section-bg-glow.right { right: -200px; top: 30%; background: var(--accent-pink); }

/* ─── Reveal Animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: var(--accent-pink);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-meta { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.view-all {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-mono);
  transition: color 0.2s;
}
.view-all:hover { color: var(--accent-pink); }

/* ─── Stats Section ─── */
.stats-section {
  padding: 60px 0 20px;
  position: relative;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: var(--border-glow);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.stat-card:hover {
  border-color: rgba(255, 45, 123, 0.25);
}
.stat-icon { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--accent-gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-pink);
  margin-right: 6px;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Resource Card Grid ─── */
.resource-grid {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: var(--border-glow);
  border-radius: var(--radius);
  transition: all 0.25s ease;
  position: relative;
}
.resource-item:hover {
  border-color: rgba(124,58,237,0.25);
  background: rgba(20,20,31,0.8);
  transform: translateX(4px);
}
.resource-item.releases {
  border-left: 3px solid var(--accent-pink);
}
.resource-item.premium {
  border-left: 3px solid var(--accent-cyan);
}
.resource-item .date-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 44px;
  font-feature-settings: "tnum";
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  text-align: center;
}
.resource-item .item-link {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.resource-item:hover .item-link { color: var(--accent-pink); }
.resource-item.premium:hover .item-link { color: var(--accent-cyan); }
.resource-item .item-info {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.resource-item .item-type {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.resource-item.releases .item-type {
  color: var(--accent-pink);
  background: rgba(255,45,123,0.1);
}
.resource-item.premium .item-type {
  color: var(--accent-cyan);
  background: rgba(34,211,238,0.1);
}

/* initial 10 */
.resource-grid.initial-only .resource-item:nth-child(n+11) { display: none; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 0.88rem; }

/* Show More */
.show-more-wrapper { text-align: center; margin-top: 16px; }
.btn-show-more {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--accent-purple);
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 999px;
  transition: all 0.2s;
}
.btn-show-more:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}
.btn-show-more .count-badge { color: var(--text-muted); font-weight: 400; }

/* ─── Page Header ─── */
.page-header {
  padding: calc(var(--nav-height) + 40px) 0 20px;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  top: 8%; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.06), transparent 70%);
  pointer-events: none;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  background: var(--accent-gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.page-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* ─── About Page ─── */
.about-content { max-width: 640px; margin: 0 auto; }
.about-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.about-feature {
  background: var(--bg-card);
  border: var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
}
.about-feature:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-purple);
}
.about-feature .icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.about-feature h3 { font-size: 1rem; margin-bottom: 6px; font-weight: 700; }
.about-feature p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.about-feature a { color: var(--accent-cyan); }
.about-feature a:hover { color: var(--accent-pink); }

/* ─── Footer ─── */
.footer {
  border-top: var(--border-glow);
  padding: 36px 0;
  margin-top: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-pink); }
.footer-bottom {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15,15,26,0.85);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  box-shadow: var(--glow-pink);
}

/* ─── SEO ─── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ─── Keyframes ─── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .section { padding: 50px 0; }
  .hero { min-height: 90vh; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .hero p { font-size: 0.92rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 20px 14px; }
  .stat-number { font-size: 1.6rem; }

  .resource-item {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 10px 14px;
  }
  .resource-item .date-tag { min-width: 38px; }
  .resource-item .item-link { white-space: normal; }
  .resource-item .item-info { max-width: 60px; }
  .section-title { font-size: 1.1rem; }
  .page-header { padding: calc(var(--nav-height) + 24px) 0 12px; }
  .page-header h1 { font-size: 1.4rem; }

  .nav-links {
    display: none;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(10,10,15,0.96);
    backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px 24px;
    gap: 12px;
    border-bottom: var(--border-glow);
  }
  .nav-links.open { display: flex; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { color: var(--accent-pink); }
  .mobile-menu-btn { display: block; }

  .about-features { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
}
