/* Main CSS - Non-critical styles */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
}

/* Typography */
h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

p {
  color: var(--gray-500);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

a:hover {
  text-decoration: underline;
}

/* Language switcher */
.lang-switch {
  text-decoration: none !important;
}

.lang-switch:hover {
  text-decoration: none !important;
}

.lang-switch .lang-code {
  text-decoration: none;
}

.lang-switch:hover .lang-code {
  text-decoration: underline;
}

/* Quick Start */
.quick-start {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.quick-start-title {
  font-size: 16px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.command {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  padding: calc(var(--spacing-unit) * 2);
  padding-left: calc(var(--spacing-unit) * 4);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  color: var(--gray-900);
}

.command::before {
  content: '>';
  position: absolute;
  left: calc(var(--spacing-unit) * 2);
  color: var(--gray-500);
  font-weight: 600;
}

.command:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
  opacity: 0.8;
}

.command::after {
  content: attr(data-hint);
  position: absolute;
  right: calc(var(--spacing-unit) * 2);
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--gray-500);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.command:hover::after {
  opacity: 1;
}

/* Buttons */
.buttons {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  justify-content: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.btn {
  font-size: 16px;
  font-weight: 500;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-primary {
  background: var(--telegram-blue);
  color: var(--pure-white);
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--telegram-blue);
  border: 1px solid var(--telegram-blue);
}

.btn-secondary:hover {
  background: var(--telegram-blue);
  color: var(--pure-white);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Sections */
section {
  padding: calc(var(--spacing-unit) * 10) 0;
  border-top: 1px solid var(--gray-100);
}

/* Code */
.code-example {
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  padding: calc(var(--spacing-unit) * 3);
  overflow-x: auto;
  margin-bottom: calc(var(--spacing-unit) * 4);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: var(--gray-100);
  border-radius: 4px;
}

pre {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}

/* Performance */
.chart {
  font-family: var(--font-mono);
  font-size: 14px;
}

.chart-scale {
  color: var(--gray-500);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.chart-bar {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.bar-fill {
  display: inline-block;
  height: 20px;
  background: var(--telegram-blue);
  border-radius: 2px;
  margin-right: calc(var(--spacing-unit) * 2);
}

/* Documentation */
.doc-links {
  display: grid;
  gap: calc(var(--spacing-unit) * 2);
}

.doc-link {
  display: flex;
  justify-content: space-between;
  padding: calc(var(--spacing-unit) * 2) 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-900);
}

.doc-link:hover {
  color: var(--telegram-blue);
}

.doc-time {
  color: var(--gray-500);
  font-size: 14px;
}

/* GitHub stats */
.github-stats {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
  justify-content: center;
  margin: calc(var(--spacing-unit) * 3) 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 600;
  display: block;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-500);
}

/* Donation */
.donation-list {
  font-family: var(--font-mono);
  font-size: 14px;
  margin: calc(var(--spacing-unit) * 3) 0;
}

.collaboration-items {
  list-style: none;
  margin: calc(var(--spacing-unit) * 3) 0;
}

.collaboration-items li {
  padding: calc(var(--spacing-unit) * 1) 0;
  color: var(--gray-500);
}

.collaboration-items li::before {
  content: '• ';
  color: var(--telegram-blue);
  font-weight: 600;
}

/* Footer */
footer {
  text-align: center;
  padding: calc(var(--spacing-unit) * 8) 0;
  border-top: 1px solid var(--gray-100);
}

.tribute {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: calc(var(--spacing-unit) * 2);
  white-space: pre-line;
}

.copyright {
  font-size: 14px;
  color: var(--gray-500);
}

/* Mobile */
@media (max-width: 768px) {
  h2 {
    font-size: 24px;
  }
  
  .buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .github-stats {
    gap: calc(var(--spacing-unit) * 3);
  }
  
  .stat-value {
    font-size: 24px;
  }
}

/* Donation */
.donation-item {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--telegram-blue);
  cursor: pointer;
  text-decoration: none;
  margin-right: calc(var(--spacing-unit) * 4);
}

.donation-item:hover {
  text-decoration: underline;
}