/**
 * Demo Signup Page Styles
 * Styled to match the login page aesthetic
 */

:root {
  /* Match login page color scheme */
  --primary-navy: #0A2A43;
  --fresh-green: #4CAF50;
  --aqua-blue: #2EB5E5;
  --coral-orange: #FF7043;
  --light-grey: #F5F7FA;
  --dark-grey: #333333;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  min-height: 100vh;
}

.demo-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Match login page background */
  background:
    radial-gradient(circle at top left, rgba(46, 181, 229, 0.18), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(255, 112, 67, 0.18), transparent 50%),
    linear-gradient(120deg, #f9fbfd 0%, #eef3f8 50%, #f7f9fc 100%);
  position: relative;
  overflow-x: hidden;
}

/* Geometric shapes - matching login page */
.demo-page::before {
  content: "";
  position: fixed;
  top: 8%;
  right: 6%;
  width: 200px;
  height: 200px;
  background: rgba(76, 175, 80, 0.10);
  border-radius: 24px;
  transform: rotate(18deg);
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
}

.demo-page::after {
  content: "";
  position: fixed;
  bottom: 10%;
  left: 8%;
  width: 160px;
  height: 160px;
  background: rgba(10, 42, 67, 0.10);
  border-radius: 32px;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.demo-header {
  padding: 1rem 2rem;
  background: transparent;
  position: relative;
  z-index: 1;
}

.demo-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary-navy);
  font-weight: 700;
  font-size: 1.25rem;
}

.demo-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 0.6rem;
  box-shadow: 0 10px 24px rgba(10, 42, 67, 0.15);
}

/* Main content */
.demo-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.demo-container {
  width: 100%;
  max-width: 1000px;
  animation: fadeUp 0.6s ease both;
}

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

.demo-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: stretch;
}

/* Form section - styled like login-card */
.demo-form-section {
  background:
    linear-gradient(135deg, rgba(46, 181, 229, 0.01), rgba(255, 112, 67, 0.01)),
    linear-gradient(180deg, rgba(10, 42, 67, 0.02), rgba(10, 42, 67, 0));
  background-color: var(--white);
  border-radius: 22px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(46, 181, 229, 0.05);
  position: relative;
}

/* Gradient accent bar at top - matching login card */
.demo-form-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, rgba(46, 181, 229, 0.65), rgba(255, 112, 67, 0.65));
}

.demo-title {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--primary-navy);
}

.demo-subtitle {
  font-size: 1rem;
  color: var(--dark-grey);
  margin: 0 0 1.75rem 0;
  line-height: 1.5;
}

.demo-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.demo-form .form-group {
  margin-bottom: 1.25rem;
}

.demo-form .form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--primary-navy);
}

.demo-form .form-control {
  border-radius: 12px;
  border: 1px solid rgba(10, 42, 67, 0.15);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--light-grey);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.demo-form .form-control:focus {
  border-color: var(--aqua-blue);
  box-shadow: 0 0 0 0.2rem rgba(46, 181, 229, 0.2);
  background: var(--white);
  outline: none;
}

.demo-form .form-control::placeholder {
  color: #9ca3af;
}

/* Password toggle button */
.demo-form .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.demo-form .input-group .btn-outline-secondary {
  border-radius: 0 12px 12px 0;
  border: 1px solid rgba(10, 42, 67, 0.15);
  border-left: none;
  background: var(--light-grey);
  color: var(--dark-grey);
  padding: 0 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.demo-form .input-group .btn-outline-secondary:hover {
  background: rgba(10, 42, 67, 0.08);
  color: var(--primary-navy);
}

.demo-form .input-group .btn-outline-secondary:focus {
  box-shadow: 0 0 0 0.2rem rgba(46, 181, 229, 0.2);
  outline: none;
}

.demo-form .btn-primary {
  background: linear-gradient(135deg, var(--primary-navy), #13496f);
  border: none;
  border-radius: 12px;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 10px 18px rgba(10, 42, 67, 0.2);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.demo-form .btn-primary:hover {
  background: linear-gradient(135deg, #13496f, var(--primary-navy));
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(10, 42, 67, 0.25);
}

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

.demo-form .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.demo-form .btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.demo-terms {
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  margin: 1.5rem 0 1rem;
  line-height: 1.6;
}

.demo-terms a {
  color: var(--aqua-blue);
  text-decoration: none;
  font-weight: 600;
}

.demo-terms a:hover {
  color: var(--coral-orange);
}

.demo-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
}

.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: rgba(10, 42, 67, 0.12);
}

.demo-divider span {
  padding: 0 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.demo-login-link {
  text-align: center;
  font-size: 0.9rem;
  color: var(--dark-grey);
  margin: 0;
}

.demo-login-link a {
  color: var(--aqua-blue);
  font-weight: 600;
  text-decoration: none;
}

.demo-login-link a:hover {
  color: var(--coral-orange);
}

/* Features section - styled like login-panel */
.demo-features-section {
  background: linear-gradient(160deg, var(--primary-navy), #0e3a5c);
  color: var(--white);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 18px 40px rgba(10, 42, 67, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.features-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--white);
}

.features-intro {
  font-size: 0.95rem;
  color: rgba(245, 247, 250, 0.9);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.features-intro strong {
  color: var(--white);
}

.features-try {
  margin-bottom: 1.5rem;
}

.try-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.75rem 0;
}

.try-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.try-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 500;
  transition: background 0.2s ease;
}

.try-list li:hover {
  background: rgba(255, 255, 255, 0.12);
}

.try-list li strong {
  color: var(--white);
}

.try-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.features-note {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.features-note p {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
  color: rgba(245, 247, 250, 0.9);
}

.features-note strong {
  color: var(--white);
}

/* Footer */
.demo-footer {
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  background: transparent;
  position: relative;
  z-index: 1;
}

.demo-footer p {
  margin: 0;
}

/* Error message */
.alert-danger {
  border-radius: 12px;
  font-size: 0.875rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
  .demo-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .demo-features-section {
    order: -1;
  }
}

@media (max-width: 640px) {
  .demo-main {
    padding: 1.25rem 1rem;
  }

  .demo-form-section,
  .demo-features-section {
    padding: 1.75rem 1.5rem;
  }

  .demo-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .demo-title {
    font-size: 1.6rem;
  }

  .demo-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .demo-page::before,
  .demo-page::after {
    display: none;
  }

  .try-list li {
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* Demo banner styles (for main app) */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: linear-gradient(90deg, var(--primary-navy) 0%, #13496f 100%);
  color: white;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px rgba(10, 42, 67, 0.15);
}

.demo-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.demo-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.demo-text {
  font-size: 0.875rem;
}

.demo-guarantee {
  font-size: 0.75rem;
  opacity: 0.9;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  margin-left: 0.75rem;
}

.demo-cta {
  background: var(--coral-orange);
  color: white;
  padding: 0.375rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 112, 67, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.demo-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 112, 67, 0.35);
  color: white;
  text-decoration: none;
}

/* Adjust main app when demo banner is showing */
body.has-demo-banner {
  padding-top: 48px;
}

body.has-demo-banner .navbar {
  top: 48px;
}
