.lang-tabs {
  background: white;
  padding: 16px 20px 0;
  border-bottom: none;
}

.lang-tabs-content {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 2px solid var(--border);
  justify-content: center;
}

.lang-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-tab:hover {
  color: var(--text);
}

.lang-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-bar {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 15px;
  background: white;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.code-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.code-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.code-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.code-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 10px;
}

.code-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.code-card-title-area {
  flex: 1;
  min-width: 0;
}

.code-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.code-card-meta {
  font-size: 12px;
  color: var(--text-light);
}

.code-card-preview {
  margin: 0 20px;
  padding: 14px 16px;
  background: #1e1e2e;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  max-height: 180px;
}

.code-card-preview code {
  color: #cdd6f4;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre;
}

.code-card-empty {
  margin: 0 20px;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 10px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

.code-card-footer {
  padding: 12px 20px 18px;
  display: flex;
  justify-content: flex-end;
}

.code-play-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

.code-play-header {
  margin-bottom: 24px;
}

.code-play-header h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.code-play-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.code-play-description {
  margin-bottom: 24px;
  color: var(--text);
  line-height: 1.8;
}

.code-block {
  background: #1e1e2e;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #181825;
  color: #cdd6f4;
  font-size: 13px;
}

.code-block-body {
  padding: 20px;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.code-block-body pre {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.code-block-body code {
  color: #cdd6f4;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre;
}

.code-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.run-output {
  background: #1e1e2e;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.run-output-header {
  padding: 12px 20px;
  background: #181825;
  color: #cdd6f4;
  font-size: 13px;
  font-weight: 600;
}

.run-output-body {
  padding: 16px 20px;
  color: #a6e3a1;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  min-height: 60px;
  max-height: 300px;
  overflow-y: auto;
}

.run-output-body.error {
  color: #f38ba8;
}

.btn-run {
  background: #a6e3a1;
  color: #1e1e2e;
  font-weight: 700;
}

.btn-run:hover {
  background: #94d88a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(166,227,161,0.3);
}

.btn-run:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-run.loading {
  opacity: 0.7;
  pointer-events: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 14px;
}

.back-link:hover {
  color: var(--primary-dark);
}

.video-section {
  background: white;
  border-radius: var(--radius);
  padding: 25px;
  margin-top: 25px;
  box-shadow: var(--shadow);
}

.video-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text);
}

.video-wrapper {
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

.resources-section {
  background: white;
  border-radius: var(--radius);
  padding: 25px;
  margin-top: 25px;
  box-shadow: var(--shadow);
}

.resources-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text);
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: var(--transition);
}

.resource-item:hover {
  border-color: var(--primary);
  background: var(--bg);
}

.resource-item-info {
  flex: 1;
}

.resource-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.resource-item-desc {
  font-size: 13px;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .lang-tab {
    padding: 12px 18px;
    font-size: 14px;
  }

  .code-card-header {
    padding: 14px 16px 8px;
  }

  .code-card-preview {
    margin: 0 16px;
    padding: 12px;
    font-size: 12px;
  }

  .code-card-footer {
    padding: 10px 16px 14px;
  }

  .code-play-container {
    padding: 20px 14px;
  }

  .code-play-header h1 {
    font-size: 22px;
  }

  .code-block-body {
    padding: 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .lang-tab {
    padding: 10px 14px;
    font-size: 13px;
  }

  .code-card-icon {
    font-size: 22px;
  }

  .code-card-title {
    font-size: 15px;
  }

  .code-block-body {
    padding: 12px;
    font-size: 12px;
  }

  .code-actions {
    flex-direction: column;
  }

  .code-actions .btn {
    width: 100%;
  }
}
