/* Variables */
:root {
  --primary-color: #5c6ac4;
  --primary-color-light: #7b86d9;
  --secondary-color: #2e3440;
  --text-color: #4c566a;
  --text-color-light: #6e7b95;
  --light-bg: #f8f9fc;
  --white: #ffffff;
  --border-color: #e5e9f2;
  --highlight: #5c6ac4;
  --code-bg: #2e3440;
  --section-padding: 3rem 2rem;
  --section-bg: #ffffff;
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.7;
  font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--secondary-color);
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  position: relative;
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 60px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #3b4252 100%);
  color: var(--white);
  padding: 5rem 0 5rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M0 0h10v10H0z" fill="rgba(255,255,255,0.05)"/><path d="M20 20h10v10H20z" fill="rgba(255,255,255,0.05)"/><path d="M40 40h10v10H40z" fill="rgba(255,255,255,0.05)"/><path d="M60 60h10v10H60z" fill="rgba(255,255,255,0.05)"/><path d="M80 80h10v10H80z" fill="rgba(255,255,255,0.05)"/><path d="M10 10h10v10H10z" fill="rgba(255,255,255,0.05)"/><path d="M30 30h10v10H30z" fill="rgba(255,255,255,0.05)"/><path d="M50 50h10v10H50z" fill="rgba(255,255,255,0.05)"/><path d="M70 70h10v10H70z" fill="rgba(255,255,255,0.05)"/><path d="M90 90h10v10H90z" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.2;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.header-text h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
}

.header-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.header-nav {
  position: absolute;
  top: 20px;
  right: 20px;
}

.header-nav ul {
  list-style: none;
  display: flex;
  gap: 0.8rem;
}

.header-nav a {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.header-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.header-nav .fab {
  font-size: 1.3rem;
}

.badges {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.badges img {
  height: 22px;
  border-radius: 3px;
}

/* Section Styles */
section {
  padding: var(--section-padding);
  background-color: var(--white);
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.demo {
  text-align: center;
  margin-top: 2rem;
}

.demo img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.demo img:hover {
  transform: scale(1.01);
}

/* Tab Styles */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.75rem 1.5rem;
  background-color: var(--light-bg);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.tab:hover {
  background-color: var(--white);
  border-color: var(--primary-color-light);
  color: var(--primary-color);
}

.tab.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.tab-content {
  display: none;
  padding: 2rem;
  border-radius: 8px;
  background-color: var(--light-bg);
  margin-bottom: 1.5rem;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Code Block Styles */
.code-block-container {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.code-block {
  background-color: var(--code-bg);
  color: var(--white);
  padding: 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  margin: 0;
  white-space: pre;
  font-size: 0.95rem;
  line-height: 1.5;
}

pre.code-block {
  display: block;
  width: 100%;
}

code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
}

.copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: var(--white);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Installation Steps */
.install-steps {
  margin: 1.5rem 0;
}

.install-steps h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  font-weight: 600;
}

.install-steps ul {
  margin-left: 1.2rem;
  margin-bottom: 1rem;
}

.install-steps ul li {
  margin-bottom: 0.5rem;
}

/* Usage */
.usage ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.usage ol li {
  margin-bottom: 0.8rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #3b4252 100%);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M0 0h10v10H0z" fill="rgba(255,255,255,0.03)"/><path d="M20 20h10v10H20z" fill="rgba(255,255,255,0.03)"/><path d="M40 40h10v10H40z" fill="rgba(255,255,255,0.03)"/><path d="M60 60h10v10H60z" fill="rgba(255,255,255,0.03)"/><path d="M80 80h10v10H80z" fill="rgba(255,255,255,0.03)"/><path d="M10 10h10v10H10z" fill="rgba(255,255,255,0.03)"/><path d="M30 30h10v10H30z" fill="rgba(255,255,255,0.03)"/><path d="M50 50h10v10H50z" fill="rgba(255,255,255,0.03)"/><path d="M70 70h10v10H70z" fill="rgba(255,255,255,0.03)"/><path d="M90 90h10v10H90z" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.1;
  z-index: 0;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--primary-color-light);
  font-weight: 500;
  transition: var(--transition);
}

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

.footer p {
  margin-bottom: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --section-padding: 2rem 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  header {
    padding: 4rem 0 4rem;
  }
  
  .header-nav {
    position: relative;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    top: auto;
    right: auto;
  }
  
  .tabs {
    flex-direction: column;
    width: 100%;
  }

  .tab {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Responsive GIF styling */
.gif-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 10px;
}

.responsive-gif {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
