/* Global Reset */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* Body with Gradient Background */
body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #1b1d29 0%, #161722 20%, #1a1b2f 40%, #23243d 60%, #2a2b45 80%, #1f2036 100%);
  color: #f8fafc;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Blurred Icons/Shapes in Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(129, 140, 248, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(96, 165, 250, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 25%),
    linear-gradient(45deg, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  z-index: -1;
}

/* Animated floating elements */
.floating-element {
  position: fixed;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(96, 165, 250, 0.05));
  filter: blur(40px);
  z-index: -1;
  animation: float 15s infinite ease-in-out;
}

.floating-element:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  width: 450px;
  height: 450px;
  top: 60%;
  right: -5%;
  animation-delay: -5s;
}

.floating-element:nth-child(3) {
  width: 250px;
  height: 250px;
  bottom: 10%;
  left: 20%;
  animation-delay: -10s;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 24, 39, 0.85);
  padding: 1.1rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.navbar .logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, #818cf8 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar .logo::before {
  content: "✦";
  font-size: 1.4rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #818cf8 0%, #60a5fa 100%);
  transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-links li a:hover {
  color: #818cf8;
}

.nav-links li a:hover::after {
  width: 100%;
}

/* Mobile menu button (hidden by default) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  width: 2rem;
  height: 0.25rem;
  background: #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  transform-origin: 1px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Hero Heading */
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #e6e6e6, #bdbcbc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.hero h1:hover {
  transform: scale(1.01);
}

/* Hero Paragraph */
.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
  background: linear-gradient(90deg, #67a9ff, #66a6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.hero p:hover {
  transform: translateY(-2px);
}

/* Gradient accent */
.gradient-text {
  background: linear-gradient(90deg, #818cf8 0%, #60a5fa 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Form Section */
.form-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 2rem 5rem;
  position: relative;
  z-index: 1;
}

.form-section h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #ffffff;
  font-weight: 700;
}

form {
  background: rgba(37, 43, 90, 0.7);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(17, 21, 29, 0.5);
  width: 100%;
  max-width: 450px;
  transition: transform 0.35s ease-in-out, box-shadow 0.35s ease-in-out;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(24, 29, 39, 0.1);
}

form:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #e2e8f0;
  font-size: 1rem;
}

form input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(30, 38, 49, 0.89);
  outline: none;
  background: rgba(22, 29, 43, 0.6);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

form input:focus {
  background: rgba(22, 24, 37, 0.8);
  border-color: rgba(25, 28, 54, 0.5);
  box-shadow: 0 0 0 4px rgba(41, 59, 216, 0.2);
}

form button {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #207dff 0%, rgb(0, 105, 224) 100%);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.75rem;
  box-shadow: 0 5px 15px rgba(23, 25, 27, 0.3);
}

form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(28, 30, 32, 0.4);
  background: linear-gradient(90deg, #006aff 0%, #006aff 100%);
}

/* Popup Styling */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: #1e293b;
  padding: 2rem 2.5rem;
  border-radius: 15px;
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  max-width: 90%;
  margin: 0 1rem;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2);
  color: #ff4c4c;
}

.log-container {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 350px;
  background: rgba(20, 25, 45, 0.95);
  border-radius: 12px;
  padding: 1rem;
  color: #fff;
  font-family: "Helvetica", Arial, sans-serif;
  font-size: 0.95rem;
  display: none;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  z-index: 1000;
  max-width: calc(100% - 40px);
}

.log-entry {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}

/* Loader spinner */
.loader {
  width: 14px;
  height: 14px;
  border: 2px solid rgb(78, 78, 255);
  border-top: 2px solid transparent;
  border-radius: 50%;
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Perfectly Centered Professional Checkmark */
.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #007BFF;
  position: relative;
  margin-right: 8px;
}

.checkmark::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* Slide form */
form.slide-left {
  transform: translateX(-30%);
  transition: transform 0.5s ease-in-out;
}

/* Error Message */
.error {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Page Sections */
.page {
  padding: 3rem;
  max-width: 850px;
  margin: 3rem auto;
  background: rgba(36, 38, 54, 0.7);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.7s ease-out;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.page h1 {
  margin-bottom: 1.75rem;
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 700;
}

.page p {
  margin-bottom: 1.25rem;
  color: #d1d5db;
  line-height: 1.7;
  font-size: 1.1rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: rgba(17, 24, 39, 0.9);
  color: #9ca3af;
  margin-top: auto;
  font-size: 1rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 1;
}

/* Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-10px); }
  30%, 60%, 90% { transform: translateX(10px); }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) rotate(0deg); 
  }
  33% { 
    transform: translateY(-20px) rotate(5deg); 
  }
  66% { 
    transform: translateY(20px) rotate(-5deg); 
  }
}

/* ==================== RESPONSIVE IMPROVEMENTS ==================== */

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
  .hero {
    max-width: 1000px;
    padding: 6rem 2rem 4rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .page {
    max-width: 1000px;
  }
}

/* Tablets and small desktops (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .navbar {
    padding: 1rem 1.5rem;
  }
  
  .hero {
    padding: 4rem 2rem 3rem;
  }
  
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .page {
    margin: 3rem 2rem;
  }
}

/* Mobile and tablet (768px and below) */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.98);
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 1.75rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero {
    padding: 3rem 1.5rem 2rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .page {
    padding: 2rem;
    margin: 2rem 1.5rem;
  }
  
  .form-section h2 {
    font-size: 1.75rem;
  }
  
  form {
    padding: 2rem;
  }
  
  .floating-element {
    display: none; /* Hide floating elements on mobile for better performance */
  }
  
  .log-container {
    top: 70px;
    right: 10px;
    width: 300px;
    max-width: calc(100% - 20px);
  }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .form-section h2 {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .page {
    padding: 1.5rem;
    margin: 1.5rem 1rem;
  }
  
  .page h1 {
    font-size: 1.75rem;
  }
  
  form {
    padding: 1.5rem;
  }
  
  footer {
    padding: 1.5rem;
    font-size: 0.9rem;
  }
  
  .navbar .logo {
    font-size: 1.4rem;
  }
  
  .popup-content {
    padding: 1.5rem;
    font-size: 1rem;
  }
  
  .log-container {
    width: 280px;
    font-size: 0.85rem;
  }
}

/* Very small mobile devices (360px and below) */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  form {
    padding: 1.25rem;
  }
  
  form input, form button {
    padding: 0.875rem;
  }
  
  .navbar {
    padding: 0.875rem;
  }
  
  .navbar .logo {
    font-size: 1.2rem;
  }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .hero h1 {
    margin-bottom: 1rem;
  }
  
  .form-section {
    padding: 1.5rem 2rem 3rem;
  }
}

/* High DPI (Retina) displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar {
    border-bottom-width: 0.5px;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Your existing dark colors work well */
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Loading animation for buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  top: 50%;
  left: 50%;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Smooth transitions for all interactive elements */
a, button, input, .nav-links {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}