:root {
  --bg-primary: #050510;
  --bg-radial: radial-gradient(circle at center, #1a1b2e 0%, #050510 100%);
  --accent-teal: #70d4d1;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-primary: #70d4d1;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(90deg, #70d4d1, #3b82f6, #8b5cf6);
  --accent-gradient-135: linear-gradient(135deg, #70d4d1 0%, #3b82f6 50%, #8b5cf6 100%);
  --text-primary: #ffffff;
  --text-secondary: #a6adc8;
  --text-subtext: #cdd6f4;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(30, 30, 46, 0.7);
  --glass-glow: rgba(112, 212, 209, 0.2);
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(112, 212, 209, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    radial-gradient(circle at center, #1a1b2e 0%, #050510 100%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Grid pattern background overlay */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

main {
  width: 100%;
  max-width: 720px;
  padding: 2rem;
  z-index: 1;
}

.hero-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  text-align: center;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(112, 212, 209, 0.12);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 55px rgba(112, 212, 209, 0.25);
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(30, 30, 46, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 1.75rem;
  box-shadow: 0 0 20px rgba(112, 212, 209, 0.25);
  animation: pulse-glow 2.5s ease-in-out infinite alternate;
}

.logo-icon {
  width: 44px;
  height: 44px;
  stroke: var(--accent-teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 15px rgba(112, 212, 209, 0.3);
    border-color: rgba(112, 212, 209, 0.3);
  }
  100% {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(112, 212, 209, 0.6);
    border-color: rgba(112, 212, 209, 0.6);
  }
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--accent-gradient-135);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.95rem 2.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(112, 212, 209, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #70d4d1 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button > * {
  position: relative;
  z-index: 2;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(112, 212, 209, 0.55);
}

.cta-button:active {
  transform: translateY(0);
}

.arrow-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.3s ease;
}

.cta-button:hover .arrow-icon {
  transform: translateX(4px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
  text-align: left;
}

.feature-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.25rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
  background: rgba(112, 212, 209, 0.05);
  border-color: rgba(112, 212, 209, 0.25);
  transform: translateY(-2px);
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

footer {
  margin-top: auto;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.6;
  text-align: center;
  z-index: 1;
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }
  
  .hero-card {
    padding: 2.5rem 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
  }
}

/* Authentication Card & Form Styles */
.auth-card {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 360px;
  margin: 0 auto;
  text-align: left;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-subtext);
  letter-spacing: 0.3px;
}

.input-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(18, 18, 30, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-group input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 14px rgba(112, 212, 209, 0.35);
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.error-banner {
  background: rgba(243, 139, 168, 0.15);
  border: 1px solid rgba(243, 139, 168, 0.4);
  color: #f38ba8;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.logged-in-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(112, 212, 209, 0.12);
  border: 1px solid rgba(112, 212, 209, 0.3);
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.user-icon {
  font-size: 1.1rem;
}

.form-footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.75rem;
}

.form-footer-link a {
  color: var(--accent-teal);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.form-footer-link a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(112, 212, 209, 0.6);
}

/* Try Editor divider */
.try-editor-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem auto 1rem;
  max-width: 360px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.7;
}

.try-editor-divider::before,
.try-editor-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Try Editor ghost button */
.try-editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(112, 212, 209, 0.35);
  border-radius: 12px;
  color: var(--accent-teal);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.try-editor-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(112, 212, 209, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.try-editor-btn:hover::before {
  opacity: 1;
}

.try-editor-btn:hover {
  border-color: rgba(112, 212, 209, 0.7);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(112, 212, 209, 0.22);
  transform: translateY(-1px);
}

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

.flask-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.try-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.try-editor-btn:hover .try-badge {
  color: var(--accent-teal);
  border-color: rgba(112, 212, 209, 0.3);
}
