/**
 * Article Style - Modern Dark Theme
 * Version: 1.0.0
 * Description: Unified styles for all article pages
 */

/* =====================================================
   VARIABLES & RESET
   ===================================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --accent-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --dark-bg: #0f0f23;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --telegram-blue: #0088cc;
}

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

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

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

/* =====================================================
   NAVIGATION
   ===================================================== */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  backdrop-filter: blur(20px);
  background: rgba(15, 15, 35, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
  font-size: 24px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-cta {
  padding: 10px 25px;
  background: var(--telegram-blue);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 136, 204, 0.4);
}

/* =====================================================
   ARTICLE HEADER
   ===================================================== */

.article-header {
  padding: 140px 20px 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.article-category {
  display: inline-block;
  padding: 6px 16px;
  background: var(--card-bg);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-category i {
  margin-right: 6px;
  opacity: 0.9;
}

.article-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #a0aec0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* =====================================================
   ARTICLE CONTENT
   ===================================================== */

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

.article-content {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 60px;
  backdrop-filter: blur(10px);
  margin-bottom: 40px;
}

.article-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2em 0 1em 0;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1.5em 0 0.8em 0;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5em;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content p:first-of-type {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 500;
}

.article-content ul,
.article-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.8em;
  line-height: 1.7;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content a {
  color: #667eea;
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.article-content a:hover {
  border-bottom-color: #667eea;
}

.article-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  font-family: 'Courier New', monospace;
}

.article-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2em 0;
}

.article-content blockquote {
  border-left: 4px solid #667eea;
  padding-left: 20px;
  margin: 2em 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* =====================================================
   TABLE OF CONTENTS
   ===================================================== */

.toc {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
}

.toc h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc li {
  margin-bottom: 12px;
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc a:hover {
  color: var(--text-primary);
}

/* =====================================================
   CTA BLOCKS
   ===================================================== */

.cta-block {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}

.cta-block h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.cta-block p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.cta-block a {
  color: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.cta-block a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 700;
  background: var(--telegram-blue);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 136, 204, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(0, 136, 204, 0.5);
  color: white;
  text-decoration: none;
}

/* =====================================================
   RELATED ARTICLES
   ===================================================== */

.related-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 40px;
}

.related-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

.related-section h2 i {
  margin-right: 12px;
  opacity: 0.8;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 25px;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.related-card a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-card a:hover {
  color: #667eea;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-secondary);
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* =====================================================
   ANIMATIONS
   ===================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .article-header {
    padding: 120px 20px 40px;
  }

  .article-content {
    padding: 30px 25px;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    padding: 20px;
  }

  .cta-block {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .article-meta {
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
