* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #60A5FA;
  --secondary: #6366F1;
  --success: #10B981;
  --background: #F0F9FF;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: #F0F9FF;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #1E293B;
}

/* Animated background */
.magic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 64px;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #64748B;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo svg {
  flex-shrink: 0;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.logo p {
  font-size: 0.875rem;
  color: #64748B;
  margin: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  color: #3B82F6;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Hero Content */
.hero-content {
  max-width: 800px;
  margin: 0 auto 64px;
}

.hero-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero-text p {
  font-size: 1.125rem;
  color: #64748B;
  line-height: 1.7;
}

/* Connection Card */
.connection-card {
  max-width: 600px;
  margin: 0 auto 64px;
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
  animation: slideUp 0.8s ease-out;
}

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

.card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.card-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E293B;
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1E293B;
  font-size: 0.9375rem;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #F8FAFC;
}

.input-group input:focus {
  outline: none;
  border-color: #3B82F6;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-group small {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: #64748B;
}

.btn-connect {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-connect:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

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

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.feature-card {
  background: white;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 12px;
}

.feature-card p {
  color: #64748B;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Status Banner */
.status-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-banner strong {
  font-size: 1rem;
  color: #1E293B;
  margin-bottom: 4px;
  display: block;
}

.status-banner p {
  color: #475569;
  font-size: 0.875rem;
  margin: 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 48px 20px;
  color: #64748B;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-links a {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #2563EB;
}

/* Error message */
.error-message {
  background: #FEE2E2;
  border: 2px solid #EF4444;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #991B1B;
  font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-content {
    margin-bottom: 32px;
  }
  
  .connection-card {
    padding: 32px 24px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    flex-direction: column;
    gap: 16px;
  }
}
