/*
  This CSS provides a comprehensive dark and light mode theme for the Chat Universe website.
  It uses CSS variables for easy management of colors and smooth transitions between modes.
  This version incorporates the new styles and animations provided by the user.
*/

/* 1. Base Styles and CSS Variables for Light Mode */
:root {
  --background-color: #ffffff;
  --text-color: #333;
  --heading-color: #212529;
  --card-bg: #fff;
  --accent-color: #007bff;
  --accent-hover: #0056b3;
  --border-color: #ccc;
  --section-bg: #fff;
  --section-alt-bg: #f9f9f9;
  --footer-bg: #212529;
  --footer-text-color: #f8f9fa;
  --modal-bg: #fefefe;
  --modal-text-color: #333;
  --card-border-top: #000;
  --social-icon-bg: #000000;
  --social-icon-color: #ffffff;
}

/* 2. Dark Mode Overrides */
html[data-theme="dark"] {
  --background-color: #1f2937;
  --text-color: #d1d5db;
  --heading-color: #f3f4f6;
  --card-bg: #374151;
  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;
  --border-color: #4b5563;
  --section-bg: #111827;
  --section-alt-bg: #111827;
  --footer-bg: #111827;
  --footer-text-color: #d1d5db;
  --modal-bg: #2d3748;
  --modal-text-color: #d1d5db;
  --card-border-top: #60a5fa;
  --social-icon-bg: #d1d5db;
  --social-icon-color: #1f2937;
}

/*
  3. General Styling for the entire page
  These styles apply the variables and set up the overall layout and typography.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}

h1, h2, h3 {
  color: var(--heading-color);
  transition: color 0.5s ease-in-out;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 4. Canvas Styling */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

/* 5. Navbar Styling */
.navbar {
  position: fixed;
  top: 10px;
  left: 12px;
  width: 98%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border: solid 1px var(--border-color);
  border-radius: 20px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: background-color 0.5s ease;
}

html[data-theme="dark"] .navbar {
  background-color: rgba(31, 41, 55, 0.5); /* Semi-transparent dark gray */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: var(--heading-color);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-buttons button {
  background-color: var(--background-color);
  color: var(--heading-color);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.nav-buttons .signup-btn {
  background-color: var(--heading-color);
  color: var(--background-color);
  border: none;
}

.nav-buttons button:hover {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.theme-btn {
  position: fixed;
  right: 10px;
  bottom: 30px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.8s ease-in-out, background-color 0.5s ease;
  z-index: 100;
}

.theme-btn i {
  color: var(--text-color);
  font-size: 1.25rem;
}

.theme-btn:hover {
  transform: translateY(-0.2rem);
}

/* 6. Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.5rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-color);
}

.main-signup-btn {
  background-color: var(--accent-color);
  color: #fff;
  padding: 18px 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
}

.main-signup-btn:hover {
  background-color: var(--accent-hover);
}

/* 7. Section Styling */
.problem-section, .solution-section, .integrations-section, .advantages-section, .cta-section {
  padding: 100px 5%;
  text-align: center;
}

.problem-section, .advantages-section {
  background-color: var(--background-color);
}

.integrations-section {
  background-color: var(--section-alt-bg);
}

.cta-section {
  background-color: var(--accent-color);
  color: #fff;
}

h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.cta-section h2 {
  color: #fff;
}

/* 8. Card Sections */
.problem-points, .advantage-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 2rem;
}

.point-card, .advantage-card {
  background-color: var(--card-bg);
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: left;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.5s ease;
  cursor: pointer;
  max-width: 300px;
}

.point-card {
  border-top: 5px solid var(--card-border-top);
}

.advantage-card {
  border-bottom: 5px solid var(--accent-color);
}

.point-card:hover, .advantage-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.point-card h3, .advantage-card h3 {
  font-size: 1.6rem;
  margin-bottom: 5px;
  color: var(--heading-color);
  font-weight: 600;
}

.point-card h2 {
  font-size: 1.6rem;
  margin-bottom: 5px;
  color: var(--heading-color);
  font-weight: 600;
}

.icon-problem {
  font-size: 1.5rem;
  margin-right: 15px;
  padding: 10px;
  border: solid 2px rgba(0, 0, 0, 0.25);
  background-color: var(--accent-color);
  border-radius: 50px;
  box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, 0.25);
  color: #fff;
}

/* 9. Solution and Integration Sections */
.solution-section {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  z-index: 10;
  position: relative;
}

.solution-content {
  max-width: 500px;
  text-align: left;
  flex-basis: 40%;
  min-width: 300px;
}

.solution-visual {
  flex-basis: 50%;
  min-width: 300px;
  text-align: center;
}

.solution-visual img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.integrations-section p {
  font-size: 1.2rem;
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto 50px;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 30px;
  max-width: 90vw;
  margin: 0 auto;
}

.logo-grid i {
  font-size: 40px;
  color: var(--social-icon-color);
  background-color: var(--social-icon-bg);
  width: 80px;
  height: 80px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: solid 5px var(--accent-color);
  border-radius: 50%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.logo-grid i:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 10. Footer Styling */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text-color);
  padding: 60px 5% 20px;
  position: relative;
  z-index: 10;
  transition: background-color 0.5s ease-in-out;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 40px;
  gap: 40px;
}

.footer-brand {
  flex: 1;
  min-width: 200px;
}

.footer-brand .logo {
  color: #fff;
}

.footer-brand .tagline {
  font-size: 1rem;
  color: #adb5bd;
  margin-top: 10px;
}

.footer-links h4, .footer-social h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a, .footer-social a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover, .footer-social a:hover {
  color: var(--accent-color);
}

.footer-social .social-icons i {
  font-size: 24px;
  margin-right: 20px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.footer-bottom p {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* 11. Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  padding-top: 5px;
}

.modal-content {
  background-color: var(--modal-bg);
  margin: 2% auto;
  padding: 5px 20px 20px 20px;
  border-radius: 10px;
  width: 50%;
  max-width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation-name: animatetop;
  animation-duration: 0.4s;
}

@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

.close-btn {
  color: var(--modal-text-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
  text-decoration: none;
}

.modal-content h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--modal-text-color);
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--modal-text-color);
}

.form-group input {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.8rem;
  background-color: var(--background-color);
  color: var(--text-color);
}

.modal-btn {
  width: 100%;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-btn:hover {
  background-color: var(--accent-hover);
}

/* 12. Responsive Design */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
    margin: 0;
  }

  .hero {
    height: auto;
    padding: 100px 10px 50px;
    box-sizing: border-box;
  }

  .navbar {
    width: 95%;
    left: 2.5%;
    padding: 8px 10px;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 12px;
  }

  .logo {
    font-size: 1.2rem;
    order: 1;
  }

  .nav-links {
    display: none;
  }

  .nav-buttons {
    display: flex;
    gap: 8px;
    order: 2;
  }

  .nav-buttons button {
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .hero-content {
    padding-top: 20px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .hero-content p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .main-signup-btn {
    font-size: 1rem;
    padding: 12px 25px;
  }

  .problem-section,
  .solution-section,
  .integrations-section,
  .advantages-section,
  .cta-section {
    padding: 40px 15px;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .problem-points,
  .advantage-points,
  .solution-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .point-card,
  .advantage-card,
  .solution-content,
  .solution-visual {
    width: 80%;
    max-width: 100%;
    text-align: center;
  }

  .point-card h3, .point-card p,
  .advantage-card h3, .advantage-card p {
    text-align: left;
  }

  .solution-visual img {
    max-width: 90%;
  }

  .integrations-section p {
    font-size: 1rem;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .logo-grid i {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border: solid 3px var(--accent-color);
  }

  .cta-section {
    padding: 50px 15px;
  }

  .cta-section p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .main-cta-btn {
    font-size: 1rem;
    padding: 15px 30px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-links,
  .footer-social {
    width: 100%;
    min-width: unset;
  }

  .footer-social .social-icons i {
    margin: 0 10px;
  }

  .modal-content {
    width: 90%;
    margin: 5% auto;
  }
}
