@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap");

.font-mono {
  font-family: "JetBrains Mono", monospace;
}
.font-sans {
  font-family: "Inter", sans-serif;
}

.hero-bg {
  background-image: linear-gradient(
      rgba(15, 23, 42, 0.85),
      rgba(30, 41, 59, 0.85)
    ),
    url("/img/background.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Mobile-first background */
@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
    padding: 1rem 0;
  }
}

.code-window {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 28rem; /* 448px */
}

/* Mobile adjustments for code window */
@media (max-width: 640px) {
  .code-window {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  }
}

.terminal-header {
  background: linear-gradient(90deg, #374151, #4b5563);
  border-bottom: 1px solid #6b7280;
  padding: 0.75rem 1rem;
}

/* Mobile terminal header */
@media (max-width: 640px) {
  .terminal-header {
    padding: 0.5rem 0.75rem;
  }
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* Responsive dots for mobile */
@media (max-width: 640px) {
  .dot {
    width: 8px;
    height: 8px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .dot {
    width: 6px;
    height: 6px;
  }
}

.glow-text {
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.neon-border {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.tab-active {
  background-color: #374151;
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.success-glow {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.error-glow {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* Responsive ASCII art */
.ascii-logo {
  font-size: 0.6rem;
  line-height: 1.1;
  overflow-x: auto;
  white-space: pre;
}

@media (min-width: 480px) {
  .ascii-logo {
    font-size: 0.75rem;
    line-height: 1.2;
  }
}

@media (min-width: 640px) {
  .ascii-logo {
    font-size: 0.875rem;
    line-height: 1.25;
  }
}



/* Form input focus states */
.form-input {
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Mobile-specific form adjustments */
@media (max-width: 640px) {
  .mobile-container {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .mobile-form-spacing {
    gap: 1rem;
  }
  
  .mobile-text-sm {
    font-size: 0.875rem;
  }
  
  /* Larger touch targets for mobile */
  .tab-button {
    min-height: 44px;
    font-size: 0.875rem;
  }
  
  /* Better spacing for form elements */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  /* Improved button sizing */
  .mobile-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  /* OAuth button adjustments */
  .oauth-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
}

/* Prevent zoom on iOS */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="email"] {
    font-size: 16px;
    -webkit-appearance: none;
    border-radius: 0.5rem;
  }
}

/* Extra small devices (portrait phones, less than 380px) */
@media (max-width: 380px) {
  .mobile-container {
    padding: 0.75rem;
    margin: 0.25rem;
  }
  
  .ascii-logo {
    font-size: 0.5rem;
    line-height: 1;
  }
  
  .tab-button {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .mobile-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
  
  .oauth-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
  }
  
  /* Smaller terminal header text */
  .terminal-header .text-sm {
    font-size: 0.75rem;
  }
}

/* Landscape orientation fixes for mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero-bg {
    min-height: auto;
    padding: 0.5rem 0;
  }
  
  .ascii-logo {
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
  }
  
  .mobile-container {
    padding: 0.5rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .code-window {
    border: 2px solid #fff;
  }
  
  .tab-active {
    background-color: #22c55e;
    color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .form-input,
  .tab-button,
  .mobile-btn,
  .oauth-btn {
    transition: none;
  }
}

/* Focus styles for accessibility */
.tab-button:focus,
.mobile-btn:focus,
.oauth-btn:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* Improved text readability on small screens */
@media (max-width: 640px) {
  .text-responsive {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .text-responsive-sm {
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

/* Container max-width adjustments */
.auth-container {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .auth-container {
    max-width: calc(100vw - 1rem);
    margin: 0 0.5rem;
  }
}

/* Flexbox improvements for mobile layout */
.mobile-flex-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .mobile-flex-col {
    gap: 1.5rem;
  }
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
  button,
  .tab-button,
  a.oauth-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Safe area adjustments for devices with notches */
@supports (padding: max(0px)) {
  .mobile-container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}