:root {
  --color-bg: #0d1117;
  --color-bg-secondary: #161b22;
  --color-border: #30363d;
  --color-text: #c9d1d9;
  --color-text-secondary: #8b949e;
  --color-accent: #58a6ff;
  --color-success: #3fb950;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.github-header {
  margin-top: 24px;
  margin-bottom: 24px;
  background: #010409;
  border: 1px solid #30363d;
  border-radius: 12px;
  position: sticky;
  top: 24px;
  z-index: 100;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 64px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.github-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
  color: #f0f6fc;
}

.github-logo svg {
  width: 28px;
  height: 28px;
  fill: #f0f6fc;
}

.header-divider {
  color: #6e7681;
  font-size: 20px;
}

.repo-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.repo-name {
  font-weight: 600;
  font-size: 16px;
  color: #f0f6fc;
}

.repo-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 20px;
  color: #8b949e;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.header-btn:hover {
  background: #161b22;
  border-color: #6e7681;
  color: #f0f6fc;
}

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 40px;
}

.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  overflow: hidden;
}

.card-header {
  background: #0d1117;
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
}

.card-header .header-inner {
  padding: 0;
}

.card-body {
  padding: 28px;
}

.progress-container {
  margin: 16px 0 12px;
}

.progress-track {
  height: 8px;
  background: #21262d;
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #58a6ff, #79c0ff, #a5d6ff);
  border-radius: 100px;
  transition: width 0.1s linear;
  position: relative;
}

.status-text {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 12px 0 16px;
  transition: opacity 0.2s ease;
  min-height: 24px;
}

.buttons-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0;
  min-height: 52px;
}

.download-btn-container, .instruction-btn-container {
  display: none;
}

.download-btn-container.show, .instruction-btn-container.show {
  display: block;
}

.download-btn {
  background: var(--color-success);
  color: white;
  border: none;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.download-btn:hover {
  background: #2c974b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(63, 185, 80, 0.3);
}

.instruction-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.instruction-btn:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.password-notice {
  background: rgba(88,166,255,0.1);
  border: 1px solid rgba(88,166,255,0.25);
  border-radius: 10px;
  padding: 14px 20px;
  margin: 24px 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #79c0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.copy-btn {
  background: rgba(88,166,255,0.15);
  border: 1px solid rgba(88,166,255,0.35);
  color: #79c0ff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: rgba(88,166,255,0.25);
}

.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 28px;
  margin: 24px 0;
  font-size: 0.9rem;
}

.info-label {
  color: var(--color-text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-label i {
  width: 18px;
  color: var(--color-accent);
}

.info-value {
  color: var(--color-text);
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.75rem;
}

.text-gray-400 {
  color: var(--color-text-secondary);
}

.mt-8 {
  margin-top: 24px;
}

.github-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.github-modal.active {
  display: flex;
}

.modal-container {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0 8px;
}

.modal-close-btn:hover {
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

.instruction-step {
  margin-bottom: 24px;
}

.instruction-step:last-child {
  margin-bottom: 0;
}

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.step-desc {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.step-desc code {
  background: #21262d;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .github-header {
    width: calc(100% - 32px);
    margin-top: 16px;
    margin-bottom: 16px;
  }
  .header-inner {
    padding: 10px 16px;
  }
  .repo-name {
    font-size: 14px;
  }
  .header-btn span {
    display: none;
  }
  .card-body {
    padding: 20px;
  }
  .info-grid {
    gap: 10px 16px;
    font-size: 0.8rem;
  }
  .buttons-container {
    flex-direction: column;
    gap: 12px;
  }
  .download-btn, .instruction-btn {
    justify-content: center;
    width: 100%;
  }
  .modal-container {
    max-width: 95%;
  }
}