/* ============================================
   TRENZY VIBES - Shared Styles
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(26, 26, 46, 0.6);
  --bg-code: #0d1117;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- Background Mesh ---------- */
.bg-mesh {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.4;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-hover);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-wide {
  background: linear-gradient(135deg, var(--accent), #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.cta {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--accent-glow);
  font-family: 'Inter', sans-serif;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.cta-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-hover);
  box-shadow: none;
}

.cta-outline:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card h3 {
  margin-top: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.tag {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-weight: 500;
  transition: all 0.3s;
}

.tag:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* ---------- Code Blocks ---------- */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 2rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}

code {
  font-family: 'Fira Code', monospace;
}

.code-block pre code { color: #e2e8f0; }

/* Syntax highlighting */
.keyword { color: #c678dd; }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.function { color: #61afef; }
.number { color: #d19a66; }
.class-name { color: #e5c07b; }

/* ---------- Info Cards ---------- */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--accent);
  backdrop-filter: blur(10px);
}

.info-card.warning { border-left-color: var(--warning); }
.info-card.success { border-left-color: var(--success); }

.info-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.info-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ---------- Architecture Diagram ---------- */
.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  backdrop-filter: blur(10px);
}

.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.arch-box {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 140px;
  transition: all 0.3s;
}

.arch-box:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.arch-arrow {
  color: var(--accent);
  font-size: 1.5rem;
}

/* ---------- Share Buttons ---------- */
.share-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.share-btn:hover { transform: translateY(-2px); }

.share-linkedin { background: #0077b5; color: white; border-color: #0077b5; }
.share-facebook { background: #1877f2; color: white; border-color: #1877f2; }
.share-twitter { background: #1da1f2; color: white; border-color: #1da1f2; }
.share-copy {
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* ---------- Highlight Box ---------- */
.highlight {
  background: rgba(99, 102, 241, 0.08);
  padding: 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  margin: 25px 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 60px;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: white;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .grid { grid-template-columns: 1fr; }
  .share-section { flex-direction: column; align-items: center; }
  .share-btn { width: 200px; justify-content: center; }
  .arch-flow { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
}
