:root {
  --php-purple: #8892bf;
  --php-dark: #4f5b93;
  --php-blue: #6188b5;
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-input: #243044;
  --text: #e8ecf1;
  --text-muted: #8b9cb3;
  --border: #2d3a4f;
  --accent: #8892bf;
  --accent-hover: #a0a8d4;
  --qq-blue: #12b7f5;
  --success: #3ecf8e;
  --error: #f56565;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

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

/* Header */
.header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 29, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--php-dark), var(--php-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--php-dark), var(--php-purple));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(136, 146, 191, 0.4);
  color: white;
}

.btn-qq {
  background: var(--qq-blue);
  color: white;
}

.btn-qq:hover {
  background: #0ea5d9;
  color: white;
}

.qq-icon {
  width: 24px;
  height: 24px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(136, 146, 191, 0.15);
  border: 1px solid rgba(136, 146, 191, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--php-purple);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text), var(--php-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features {
  padding: 60px 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--php-purple);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(136, 146, 191, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Code block */
.code-section {
  padding: 60px 0;
}

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
}

.code-block pre {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--php-purple);
}

.code-block .keyword { color: #c678dd; }
.code-block .string { color: #98c379; }
.code-block .comment { color: #5c6370; }
.code-block .function { color: #61afef; }

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer p + p {
  margin-top: 8px;
}

.footer-icp a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-icp a:hover {
  color: var(--text);
}

.footer-auth {
  padding: 24px 0;
  border-top: none;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-actions {
  margin-top: 24px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(245, 101, 101, 0.15);
  border: 1px solid rgba(245, 101, 101, 0.3);
  color: var(--error);
}

.alert-success {
  background: rgba(62, 207, 142, 0.15);
  border: 1px solid rgba(62, 207, 142, 0.3);
  color: var(--success);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--php-purple);
}

.user-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.user-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .nav {
    gap: 12px;
  }

  .auth-card {
    padding: 28px;
  }
}
