/* ===========================================
   MODERN LOGIN PAGE - COMPLETELY NEW DESIGN
   Professional Gaming Login Interface
   =========================================== */

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables for Modern Theme */
:root {
  /* Primary Colors */
  --primary-blue: #3B82F6;
  --primary-purple: #8B5CF6;
  --primary-pink: #EC4899;
  --primary-green: #10B981;
  --primary-orange: #F59E0B;
  
  /* Dark Theme */
  --bg-primary: #0F0F23;
  --bg-secondary: #1A1A2E;
  --bg-tertiary: #16213E;
  --bg-card: rgba(26, 26, 46, 0.8);
  
  /* Text Colors - Enhanced for Better Visibility */
  --text-primary: #FFFFFF;
  --text-secondary: #E4E4E7;
  --text-muted: #A1A1AA;
  --text-accent: #3B82F6;
  --text-dark: #1F2937;
  --text-light: #F9FAFB;
  
  /* Borders & Effects */
  --border-primary: rgba(59, 130, 246, 0.3);
  --border-secondary: rgba(255, 255, 255, 0.1);
  --shadow-primary: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-secondary: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --gradient-secondary: linear-gradient(135deg, #EC4899 0%, #F59E0B 100%);
  --gradient-bg: linear-gradient(135deg, #0F0F23 0%, #1A1A2E 50%, #16213E 100%);
  
  /* Animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  animation: backgroundFloat 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes backgroundFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* Floating Particles */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--primary-blue), transparent),
    radial-gradient(2px 2px at 40px 70px, var(--primary-purple), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--primary-pink), transparent),
    radial-gradient(1px 1px at 130px 80px, var(--primary-green), transparent),
    radial-gradient(2px 2px at 160px 30px, var(--primary-orange), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particleFloat 15s linear infinite;
  z-index: -1;
  opacity: 0.4;
}

@keyframes particleFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-100px) rotate(360deg); }
}

/* Main Container */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Login Card */
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  box-shadow: var(--shadow-primary);
  padding: 48px;
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
  animation: cardSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card Border Animation */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  padding: 2px;
  background: var(--gradient-primary);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  animation: borderGlow 3s ease-in-out infinite alternate;
  opacity: 0.6;
}

@keyframes borderGlow {
  0% { opacity: 0.4; }
  100% { opacity: 0.8; }
}

/* Logo Section */
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo img {
  max-width: 80px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
  animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-5px) scale(1.05); }
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 20px 0 8px 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Form Elements */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-label {
  display: block;
  color: var(--text-light);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-label i {
  color: var(--primary-blue);
  font-size: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 16px;
  font-weight: 500;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.form-control::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Checkbox - Fixed */
.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.form-check-input {
  width: 20px !important;
  height: 20px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid var(--border-secondary) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all var(--transition-normal) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.form-check-input:checked {
  background: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.form-check-input:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

.form-check-label {
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  margin-left: 8px !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-secondary);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Button Shine Effect */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Links */
.login-links {
  margin-top: 32px;
  text-align: center;
}

.login-links a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-normal);
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 0 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-links a:hover {
  color: var(--text-light);
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 4px;
  left: 50%;
  background: var(--primary-blue);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.login-links a:hover::after {
  width: calc(100% - 32px);
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 600;
  border: 1px solid;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #FCD34D;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6EE7B7;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Captcha Container */
.captcha-container {
  margin: 24px 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-secondary);
}

/* Google Login Button */
.google-login-btn {
  background: rgba(66, 133, 244, 0.1);
  border: 1px solid rgba(66, 133, 244, 0.3);
  color: var(--text-primary);
  margin-top: 16px;
  width: 100%;
}

.google-login-btn:hover {
  background: rgba(66, 133, 244, 0.2);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    padding: 16px;
  }
  
  .login-card {
    padding: 32px 24px;
    max-width: 100%;
    border-radius: 20px;
  }
  
  .login-logo h1 {
    font-size: 24px;
  }
  
  .login-logo p {
    font-size: 14px;
  }
  
  .form-control {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .btn {
    padding: 14px 24px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .login-logo img {
    max-width: 60px;
  }
  
  .login-logo h1 {
    font-size: 20px;
  }
  
  .form-control {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .login-links a {
    font-size: 13px;
    margin: 0 4px;
  }
}

/* Loading Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  animation: spin 1s linear infinite;
}

/* Focus States */
.form-control:focus,
.btn:focus,
.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Smooth Transitions */
* {
  transition: all var(--transition-normal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple);
}

/* Enhanced Typography for Better Text Visibility */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.025em;
}

/* Additional text improvements */
.text-center {
  color: var(--text-secondary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.text-muted {
  color: var(--text-muted) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced form check labels for radio buttons */
.form-check-label {
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.form-check-label i {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Radio Buttons - Fixed */
.form-check-input[type="radio"] {
  width: 20px !important;
  height: 20px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid var(--border-secondary) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all var(--transition-normal) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.form-check-input[type="radio"]:checked {
  background: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.form-check-input[type="radio"]:checked::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 8px !important;
  height: 8px !important;
  background: white !important;
  border-radius: 50% !important;
}

/* Enhanced button text */
.btn {
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
}

/* Enhanced captcha container text */
.captcha-container {
  color: var(--text-secondary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.captcha-container img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Login Divider */
.login-divider {
  margin: 5px 0;
  text-align: center;
  position: relative;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-secondary);
}

.login-divider span {
  background: var(--bg-card);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Google Login Wrapper */
.google-login-wrapper {
  margin: 0 0 5px 0;
  text-align: center;
}

/* Google Login Button Styling */
.google-login-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--border-secondary) !important;
  color: var(--text-primary) !important;
  padding: 16px 32px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  transition: all var(--transition-normal) !important;
  width: 100% !important;
  max-width: 300px !important;
  margin: 0 auto !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.google-login-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--primary-blue) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-secondary) !important;
  color: var(--text-light) !important;
}

.google-login-btn:active {
  transform: translateY(0) !important;
}

.google-login-btn i {
  font-size: 18px !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) !important;
}

/* Force form elements to be interactive */
input, button, select, textarea, .form-control, .form-check-input {
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.form-check-input {
  display: inline-block !important;
}

/* Ensure form submission works */
form {
  display: block !important;
  pointer-events: auto !important;
}

/* Fix any potential z-index issues */
.login-card {
  z-index: 1;
  position: relative;
}

/* Ensure buttons are clickable */
.btn, button {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
