{{> header}}

<style>
  .auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    position: relative;
  }
  .auth-page::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    pointer-events: none;
  }
  .auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
  }
  .auth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
  }
  .auth-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  .auth-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
  }
  .auth-header h1 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  .auth-header p {
    color: #64748b;
    margin: 0;
  }
  .benefits {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }
  .benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
  }
  .benefit .check {
    color: #10b981;
  }
  .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
  }
  .form-group {
    margin-bottom: 1.25rem;
  }
  .form-label {
    display: block;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  .form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
  }
  .form-input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
  }
  .form-input::placeholder {
    color: #64748b;
  }
  .form-hint {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.4rem;
  }
  .btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
  }
  .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  }
  .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
  }
  .auth-footer a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
  }
  .auth-footer a:hover {
    text-decoration: underline;
  }

  /* Mobile Styles */
  @media (max-width: 600px) {
    .auth-page { padding: 40px 15px; }
    .auth-card { padding: 2rem 1.5rem; border-radius: 16px; }
    .auth-icon { width: 56px; height: 56px; font-size: 1.5rem; }
    .auth-header h1 { font-size: 1.5rem; }
    .benefits { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .form-input { padding: 12px 14px; }
    .btn-submit { padding: 14px 20px; }
  }
</style>

<section class="auth-page">
  <div class="auth-container">
    <div class="auth-card">
      <div class="auth-header">
        <div class="auth-icon">🚀</div>
        <h1>Create Account</h1>
        <p>Join WordPress Node and start building</p>
      </div>

      <div class="benefits">
        <div class="benefit"><span class="check">✓</span> Access all courses</div>
        <div class="benefit"><span class="check">✓</span> Manage content</div>
        <div class="benefit"><span class="check">✓</span> Admin panel access</div>
      </div>

      {{#if error}}
      <div class="alert-error">⚠️ {{error}}</div>
      {{/if}}

      <form method="POST" action="/register">
        <div class="form-group">
          <label class="form-label">Full Name</label>
          <input type="text" name="name" class="form-input" required placeholder="John Doe" autocomplete="name">
        </div>
        <div class="form-group">
          <label class="form-label">Email Address</label>
          <input type="email" name="email" class="form-input" required placeholder="you@example.com" autocomplete="email">
        </div>
        <div class="form-group">
          <label class="form-label">Password</label>
          <input type="password" name="password" class="form-input" required placeholder="••••••••" minlength="8" autocomplete="new-password">
          <p class="form-hint">Must be at least 8 characters</p>
        </div>
        <button type="submit" class="btn-submit">Create Account</button>
      </form>

      <div class="auth-footer">
        <p>Already have an account? <a href="/login">Sign in</a></p>
      </div>
    </div>
  </div>
</section>

{{> footer}}

