/* SkyChat - Login/Signup Page Styles - Blue Theme */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  --gradient-3: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
  height: 100%; 
  overflow-x: hidden; 
}
body { 
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Container */
.container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   LEFT SECTION - AUTH FORMS
═══════════════════════════════════════════════════════════════ */
.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--card);
  position: relative;
  overflow: hidden;
}

/* Decorative elements */
.left-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 50%);
  opacity: 0.5;
  z-index: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  z-index: 1;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: var(--gradient-2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.35);
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Auth Box */
.auth-box {
  width: 100%;
  max-width: 400px;
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 15px;
  color: var(--text-light);
}

/* Form Container */
.form-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

/* Hidden Forms */
#login-form, #signup-form {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

#login-form.active, #signup-form.active {
  display: block;
}

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

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group input::placeholder {
  color: #9ca3af;
}

/* Input with icon */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap input {
  padding-left: 46px;
  flex: 1;
}

.input-icon-wrap > i:first-child {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
  transition: color 0.2s;
  pointer-events: none;
}

.input-icon-wrap:focus-within > i:first-child {
  color: var(--primary);
}

/* Eye button for password toggle */
.eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  transition: color 0.2s;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eye-btn:hover {
  color: var(--primary);
}

.input-icon-wrap input[type="password"],
.input-icon-wrap input[type="text"] {
  padding-right: 48px;
}

/* Password match hint */
.pwd-match-hint {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  padding-left: 4px;
  min-height: 16px;
}

.pwd-match-hint.match {
  color: #059669;
}

.pwd-match-hint.no-match {
  color: #dc2626;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-2);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.35);
  margin-top: 24px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 115, 232, 0.5);
}

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

.submit-btn i {
  font-size: 18px;
}

/* Form Toggle */
.form-toggle {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.form-toggle p {
  font-size: 14px;
  color: var(--text-light);
}

.form-toggle button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.form-toggle button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Message Box */
.message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
  animation: shake 0.3s ease-out;
}

.message.show {
  display: flex;
}

.message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.message.success {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ═══════════════════════════════════════════════════════════════
   RIGHT SECTION - FEATURES
═══════════════════════════════════════════════════════════════ */
.right-section {
  flex: 1.2;
  background: var(--gradient-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

/* Animated BG */
.right-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect fill="url(%23grid)" width="100" height="100"/></svg>');
  background-size: 40px 40px;
  animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
  from { background-position: 0 0; }
  to { background-position: 40px 40px; }
}

/* Floating bubbles */
.bubble-1, .bubble-2, .bubble-3 {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.bubble-1 { width: 200px; height: 200px; top: 10%; left: -5%; animation-delay: 0s; }
.bubble-2 { width: 150px; height: 150px; bottom: 15%; right: -3%; animation-delay: 2s; }
.bubble-3 { width: 100px; height: 100px; top: 50%; right: 20%; animation-delay: 4s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* Features Content */
.features-content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  max-width: 600px;
}

.features-content h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.features-content > p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 50px;
  line-height: 1.7;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  transition: all 0.3s;
}

.feature-card:hover .feature-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }
  
  .left-section {
    padding: 32px 24px 48px;
    order: 1;
  }
  
  .right-section {
    padding: 48px 24px;
    order: 0;
  }
  
  .features-content h2 {
    font-size: 28px;
  }
  
  .features-content > p {
    font-size: 15px;
    margin-bottom: 32px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .feature-card {
    padding: 20px 16px;
  }
  
  .stats {
    gap: 30px;
    margin-top: 32px;
    padding-top: 28px;
  }
  
  .stat-num {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .left-section {
    padding: 24px 20px 40px;
  }
  
  .logo {
    margin-bottom: 28px;
  }
  
  .auth-header h1 {
    font-size: 24px;
  }
  
  .form-container {
    padding: 24px 20px;
  }
  
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .feature-card {
    padding: 16px 12px;
  }
  
  .feature-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    margin-bottom: 12px;
  }
  
  .feature-card h3 {
    font-size: 14px;
  }
  
  .feature-card p {
    font-size: 11px;
  }
  
  .stats {
    gap: 20px;
  }
}
