/* Import existing styles */

/* Import component styles */

/* Import FontAwesome */

/* Next.js specific global styles */
html,
body {
  padding: 0;
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    Fira Sans,
    Droid Sans,
    Helvetica Neue,
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

* {
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

html {
  color-scheme: light;
}

body {
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(
      to bottom,
      transparent,
      rgb(var(--background-end-rgb))
    )
    rgb(var(--background-start-rgb));
}

/* Landing Page Styles */
/* Ensure landing page can scroll - override any hidden overflow */
body:not(.chat-page-body) {
  overflow: auto !important;
  height: auto !important;
}

html:not(.chat-page-html) {
  overflow: auto !important;
  height: auto !important;
}

/* Prevent scrolling on chat page - more compatible approach */
.chat-page-body {
  overflow: hidden !important;
  height: 100vh !important;
}

.chat-page-html {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Ensure landing page can scroll properly */
.landing-container {
  display: flex;
  flex-direction: column;
  background-color: white;
  min-height: 100vh;
  box-sizing: border-box;
  overflow: visible;
  height: auto;
}

/* Hero Section Styles */
.hero-section {
  text-align: center;
  padding: 50px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-button {
  background-color: #26b4b4;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 16px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 50px;
}

.hero-button:hover {
  background-color: #1e9999;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 180, 180, 0.3);
}

.hero-image-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: white;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

/* What is REX Section */
.what-is-rex-section {
  padding: 60px 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 30px;
}

.section-content {
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

.section-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #5a6c7d;
  margin-bottom: 20px;
}

/* How it Works Section */
.how-it-works-section {
  padding: 60px 20px;
}

.how-it-works-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 50px 30px;
}

.steps-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-icon {
  width: 80px;
  height: 80px;
  background-color: #26b4b4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.step-icon i {
  font-size: 2rem;
  color: white;
}

.step-icon:hover {
  background-color: #1e9999;
  transform: scale(1.05);
}

.step-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  max-width: 150px;
}

.step-arrow {
  color: #26b4b4;
  font-size: 1.5rem;
  transform: rotate(90deg);
}

/* Mobile First Responsive Design */
@media (max-width: 480px) {
  .hero-section {
    padding: 30px 15px 40px;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
  }

  .hero-button {
    font-size: 1rem;
    padding: 14px 28px;
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .what-is-rex-section,
  .how-it-works-section {
    padding: 40px 15px;
  }

  .how-it-works-container {
    padding: 30px 20px;
    margin: 0 15px;
  }

  .section-content p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .step-label {
    font-size: 1rem;
    max-width: 120px;
  }

  .step-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }

  .step-icon i {
    font-size: 1.5rem;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 2.3rem;
  }

  .hero-section {
    padding: 40px 20px 50px;
  }

  .what-is-rex-section,
  .how-it-works-section {
    padding: 50px 20px;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .steps-container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
  }

  .step-arrow {
    transform: rotate(0deg);
  }

  .step {
    flex: 0 0 200px;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding: 70px 20px 80px;
  }

  .hero-title {
    font-size: 4rem;
  }

  .section-content p {
    font-size: 1.15rem;
  }

  .how-it-works-container {
    padding: 60px 50px;
  }
}

/* Responsive Utility Classes */
.responsive-text {
  font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  line-height: 1.6;
}

.responsive-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .responsive-container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .responsive-container {
    padding: 0 12px;
  }
}

/* Responsive Form Elements */
.responsive-form {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.responsive-input,
.responsive-textarea,
.responsive-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px; /* Prevents zoom on iOS */
  line-height: 1.5;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.responsive-input:focus,
.responsive-textarea:focus,
.responsive-select:focus {
  outline: none;
  border-color: #26b4b4;
  box-shadow: 0 0 0 3px rgba(38, 180, 180, 0.1);
}

.responsive-button {
  width: 100%;
  max-width: 300px;
  padding: 12px 24px;
  background-color: #26b4b4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
  box-sizing: border-box;
}

.responsive-button:hover {
  background-color: #1e9999;
}

.responsive-button:active {
  transform: translateY(1px);
}

.responsive-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .responsive-input,
  .responsive-textarea,
  .responsive-select {
    padding: 14px 16px;
    font-size: 16px;
  }

  .responsive-button {
    padding: 14px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .responsive-input,
  .responsive-textarea,
  .responsive-select {
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
  }

  .responsive-button {
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
  }
}

/* Responsive Grid System */
.responsive-grid {
  display: grid;
  grid-gap: 20px;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .responsive-grid.two-columns {
    grid-template-columns: 1fr 1fr;
  }

  .responsive-grid.three-columns {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .responsive-grid.four-columns {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .responsive-button,
  .navbar-mobile-toggle,
  .send-button,
  .paperclip-button,
  .delete-chat-button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Improve scrolling on mobile */
.smooth-scroll {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Hide elements on mobile when needed */
@media (max-width: 768px) {
  .mobile-hidden {
    display: none !important;
  }

  .mobile-visible {
    display: block !important;
  }
}

/* Desktop only elements */
@media (min-width: 769px) {
  .desktop-hidden {
    display: none !important;
  }

  .desktop-visible {
    display: block !important;
  }
}

