<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Jeet Ka Adda - Register</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- Bootstrap CDN -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">

  <!-- FontAwesome for icons -->
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
  <style>
    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: linear-gradient(to bottom, #006377, #002B36);
      color: #fff;
    }

    .container {
      max-width: 400px;
      width: 90%;
      margin: 60px auto;
      background: #fff;
      color: #000;
      padding: 25px 30px;
      border-radius: 10px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      text-align: center;
    }

    .container h2 {
      margin-bottom: 25px;
      color: #006377;
    }

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

    .form-group input,
    .form-group select {
      width: 100%;
      padding: 12px 40px 12px 15px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-size: 16px;
      outline: none;
    }

    .form-group .icon {
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 18px;
      color: #555;
      pointer-events: none;
    }

    .btn {
      width: 100%;
      background-color: #006377;
      color: white;
      border: none;
      padding: 12px;
      font-size: 16px;
      cursor: pointer;
      border-radius: 6px;
      transition: background-color 0.3s;
    }

    .btn:hover {
      background-color: #004d5a;
    }

    .login-link {
      margin-top: 15px;
      font-size: 14px;
    }

    .login-link a {
      color: #006377;
      text-decoration: none;
      font-weight: bold;
    }

    .footer {
      text-align: center;
      font-size: 12px;
      margin-top: 20px;
      color: #ccc;
    }

    img.logo {
      width: 160px;
      margin-bottom: 15px;
    }
  </style>
</head>
<body>
         @if ($errors->any())
            <div class="alert alert-danger">
                <ul class="mb-0">
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif    
  <div class="container">
    <img src="{{asset('/')}}images/new-img/logo.png" alt="Logo" class="logo">
    <h2>Register</h2>
    <form action="{{ route('register.store') }}" method="POST">
            @csrf
      <div class="form-group">
        <input type="text" name="username" placeholder="Username" value="{{ old('username') }}" required>
        <span class="icon">👤</span>
      </div>
      <div class="form-group">
        <input type="password" name="password" placeholder="Password" required>
        <span class="icon">🔒</span>
      </div>
      <div class="form-group">
        <input type="password" name="password_confirmation" placeholder="Confirm Password" required>
        <span class="icon">🔒</span>
      </div>
      <div class="form-group">
        <select name="country_code" required>
    <option value="IN" {{ old('country_code') == 'IN' ? 'selected' : '' }}>IN (+91)</option>
    <option value="US" {{ old('country_code') == 'US' ? 'selected' : '' }}>US (+1)</option>
</select>
        <span class="icon">🌐</span>
      </div>
      <div class="form-group">
        <input type="text" name="mobile" placeholder="Mobile Number (+91)" value="{{ old('mobile') }}" required>
        <span class="icon">📞</span>
      </div>
      <div class="form-group">
        <input type="text" name="referral_code" placeholder="Referral Code (Optional)" value="{{ old('referral_code') }}">
        <span class="icon">🎁</span>
      </div>
      <button type="submit" class="btn">Register Now</button>
    </form>
    <div class="login-link">
      ALREADY REGISTERED? <a href="{{url('/')}}">LOGIN HERE</a>
    </div>
    <div class="footer">
      This site is protected by reCAPTCHA and the Google Privacy Policy.
    </div>
  </div>
  <script>
    setTimeout(function () {
        let alerts = document.querySelectorAll('.alert');
        alerts.forEach(function(alert) {
            alert.style.transition = "opacity 0.5s ease";
            alert.style.opacity = "0";
            setTimeout(() => alert.remove(), 500);
        });
    }, 5000);
</script>
</body>
</html>
