@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for Color Palette */
:root {
  --dark-navy: #0B0F19;
  --deep-gray: #1A1F2B;
  --neon-purple: #7C3AED;
  --electric-blue: #3B82F6;
  --aqua-accent: #22D3EE;
  --gradient-1: linear-gradient(135deg, var(--dark-navy) 0%, var(--deep-gray) 100%);
  --gradient-2: linear-gradient(135deg, var(--neon-purple) 0%, var(--electric-blue) 100%);
  --gradient-3: linear-gradient(135deg, var(--electric-blue) 0%, var(--aqua-accent) 100%);
  --gradient-border: linear-gradient(135deg, var(--neon-purple), var(--electric-blue), var(--aqua-accent));
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif; /* Using Poppins as specified */
  background: var(--gradient-1); /* Using gradient from variables */
  color: #e0e0e0; /* Light gray for better readability */
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; /* Bold for headings */
  margin-bottom: 1rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p {
  font-family: 'Poppins', sans-serif;
  font-weight: 400; /* Regular for body text */
  margin-bottom: 1rem;
}

.subtitle {
  font-family: 'Poppins', sans-serif;
  font-weight: 500; /* Medium for subtitles */
}

/* Floating Card UI */
.card {
  background: rgba(26, 31, 43, 0.7); /* Semi-transparent deep gray */
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(124, 58, 237, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(124, 58, 237, 0.4);
}

/* Gradient Borders */
.gradient-border {
  position: relative;
  border-radius: 16px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 2px;
  background: var(--gradient-border);
  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;
  z-index: -1;
}

/* Soft Neon Glow */
.neon-glow {
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.neon-glow:hover {
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.7);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-2);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid var(--electric-blue);
}

.btn-accent {
  background: var(--gradient-3);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Form Elements */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: rgba(26, 31, 43, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 8px;
  color: white;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Modern Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--deep-gray);
  transition: 0.4s;
  border-radius: 30px;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: var(--gradient-2);
}

input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

/* Modern Progress Bar */
.progress-container {
  width: 100%;
  height: 10px;
  background-color: var(--deep-gray);
  border-radius: 5px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-2);
  border-radius: 5px;
  width: 0%;
  transition: width 1s ease-in-out;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.6s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-glass {
  background: rgba(26, 31, 43, 0.7);
  backdrop-filter: blur(10px);
}

.border-gradient {
  border: 1px solid transparent;
  background-image: var(--gradient-border);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Responsive Design */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-navy);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-purple);
}