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

:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f28;
  --bg-card: #242b36;
  --border: #2f3845;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 40px 20px;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 60px;
}

header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Section */
.section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

/* Basic Tabs */
.tabs-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.tabs-list {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.tab-button {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-family: inherit;
}

.tab-button:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.05);
}

.tab-button.active {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.tabs-content {
  padding: 32px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

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

.tab-panel h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.tab-panel p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Vertical Tabs */
.tabs-vertical {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}

.tabs-vertical .tabs-list {
  flex-direction: column;
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.tabs-vertical .tab-button {
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tabs-vertical .tab-button:last-child {
  border-bottom: none;
}

.tabs-vertical .tab-button.active::after {
  height: auto;
  width: 2px;
  left: auto;
  right: 0;
  top: 0;
  bottom: 0;
}

/* Pill Tabs */
.tabs-pill .tabs-list {
  background: transparent;
  border: none;
  padding: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs-pill .tab-button {
  flex: none;
  padding: 10px 20px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.tabs-pill .tab-button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tabs-pill .tab-button.active::after {
  display: none;
}

/* Icon Tabs */
.tab-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.tab-icon-emoji {
  font-size: 1.2rem;
}

/* With Counter */
.tab-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 8px;
}

.tab-button.active .tab-counter {
  background: white;
  color: var(--accent);
}

/* Card Style */
.tabs-card {
  background: transparent;
  border: none;
}

.tabs-card .tabs-list {
  background: transparent;
  border: none;
  gap: 12px;
  padding: 0 0 20px;
}

.tabs-card .tab-button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all var(--transition);
}

.tabs-card .tab-button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tabs-card .tab-button.active {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.tabs-card .tab-button.active::after {
  display: none;
}

.tabs-card .tabs-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  padding: 20px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.feature-item h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Code Block */
.code-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 40px;
}

.code-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.code-block {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  position: relative;
}

.code-block code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #d4d4d4;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}

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

/* Responsive */
@media (max-width: 768px) {
  .tabs-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    white-space: nowrap;
    padding: 14px 20px;
  }

  .tabs-vertical {
    grid-template-columns: 1fr;
  }

  .tabs-vertical .tabs-list {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tabs-vertical .tab-button.active::after {
    width: auto;
    height: 2px;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
  }

  .tabs-content {
    padding: 24px 20px;
  }

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