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

:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --dark: #0f172a;
  --dark-secondary: #1e293b;
  --light: #f8fafc;
  --accent: #f97316;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --code-bg: #f1f5f9;
  --success: #22c55e;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--light);
  font-size: 16px;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

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

nav h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

nav a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 100%);
  color: white;
  padding: 5rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.4rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.hero code {
  background: rgba(0,0,0,0.4);
  padding: 1.2rem 2.5rem;
  border-radius: 12px;
  font-size: 1.1rem;
  display: inline-block;
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

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

/* Section */
/* Section */
section {
  padding: 5rem 2rem;
}

section:nth-child(even) {
  background: white;
}

section h2 {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
  font-weight: 800;
  letter-spacing: -0.02em;
}

section h3 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: var(--dark);
  font-weight: 700;
}

section p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

/* Article Styling */
article {
  max-width: 850px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

article h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.02em;
}

article h2 {
  font-size: 2rem;
  margin: 3rem 0 1rem;
  font-weight: 700;
  color: var(--dark);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

article h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
  color: var(--dark);
}

article p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text);
}

article ul, article ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

article li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: var(--text);
}

article code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-dark);
  font-family: 'Consolas', 'Monaco', monospace;
}

article pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

article pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.95rem;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

article th, article td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

article th {
  background: var(--code-bg);
  font-weight: 600;
  color: var(--dark);
}

article tr:hover {
  background: var(--light);
}

article a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

article a:hover {
  border-bottom-color: var(--primary);
}

article blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

/* Gallery */
.gallery-category {
  margin-bottom: 4rem;
}

.gallery-category h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.gallery-category > p {
  margin-bottom: 2rem;
  color: #666;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  background: white;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0;
}

.gallery-info {
  padding: 1.125rem;
}

.gallery-info h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  color: #2c3e50;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.gallery-info p {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.625rem;
  line-height: 1.4;
}

.command-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(0, 123, 204, 0.75) 0%, rgba(0, 86, 179, 0.75) 100%);
  color: white;
  padding: 0.75rem 1rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 10;
}

.gallery-item:hover .command-container {
  transform: translateY(0);
}

.command-container code {
  flex: 1;
  font-size: 0.8125rem;
  color: white;
  overflow-x: auto;
  white-space: nowrap;
  background: transparent;
  padding: 0;
  margin: 0;
  margin-right: 0.5rem;
  font-family: inherit;
}

.copy-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: white;
  padding: 0.25rem 0.375rem;
  cursor: pointer;
  font-size: 0.6875rem;
  transition: all 0.2s ease;
  font-weight: 400;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 60px;
  justify-content: center;
}

.copy-btn svg {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  fill: currentColor;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn:disabled,
.copy-btn[style*="pointer-events: none"] {
  cursor: not-allowed;
  opacity: 0.9;
}

.copy-btn.copied {
  background: rgba(76, 175, 80, 0.8) !important;
  border-color: rgba(76, 175, 80, 0.9);
  animation: successPulse 0.5s ease-out;
}

.copy-btn.error {
  background: rgba(244, 67, 54, 0.8) !important;
  border-color: rgba(244, 67, 54, 0.9);
  animation: errorShake 0.5s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes errorShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.copy-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  animation: ripple-effect 0.6s;
  pointer-events: none;
}

@keyframes ripple-effect {
  from {
    opacity: 1;
    transform: scale(0);
  }
  to {
    opacity: 0;
    transform: scale(2);
  }
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  text-align: center;
  padding: 2.5rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

.feature p {
  color: var(--text-light);
  line-height: 1.7;
}

/* Installation */
.install-box {
  background: var(--dark);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
}

.install-box code {
  display: block;
  background: rgba(0,0,0,0.3);
  padding: 1rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-size: 1.05rem;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem;
}

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

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

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