<!DOCTYPE html>
<html lang="en">
  {% load static %}

  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Terms of Service & Privacy Policy - Tayapromediverse</title>

    <link rel="stylesheet" href="{% static 'css/signin.css' %}" />

    <link
      href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
      rel="stylesheet"
    />

    <!-- Toastify CSS -->
    <link
      rel="stylesheet"
      type="text/css"
      href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"
    />
  </head>

  <body>
    <div class="container">
      <!-- Left side -->
      <div class="left-side">
        <img
          src="{% static 'images/logo-desktop.png' %}"
          alt="Tayapromediverse Logo"
        />
      </div>

      <!-- Right side -->
      <div class="right-side">
        <div class="mobile-logo">
          <img
            src="{% static 'images/logo-mobile.png' %}"
            alt="Tayapromediverse Mobile Logo"
            style="max-width: 180px"
          />
        </div>

        <div class="form-container">
          <h2>Terms of Service & Privacy Policy</h2>

          <!-- Navigation Buttons -->

          <!-- Content Container -->
          <div
            style="
              text-align: left;
              max-height: 400px;
              overflow-y: auto;
              padding: 20px;
              background: #f9f9f9;
              border-radius: 8px;
              margin-bottom: 20px;
              font-family: 'Inter', sans-serif;
              line-height: 1.6;
              color: #333;
            "
          >
            <h3 style="color: #667eea; margin-bottom: 15px; font-size: 18px">
              OVERVIEW
            </h3>
            <p style="margin-bottom: 15px">
              Lorem Ipsum is simply dummy text of the printing and typesetting
              industry. Lorem Ipsum has been the industry's standard dummy text
              ever since the 1500s, when an unknown printer took a galley of
              type and scrambled it to make a type specimen book. It has
              survived not only five centuries, but also the leap into
              electronic typesetting, remaining essentially unchanged. It was
              popularised in the 1960s with the release of Letraset sheets
              containing Lorem Ipsum passages, and more recently with desktop
              publishing software like Aldus PageMaker including versions of
              Lorem Ipsum.
            </p>

            <p style="margin-bottom: 15px">
              It is a long established fact that a reader will be distracted by
              the readable content of a page when looking at its layout. The
              point of using Lorem Ipsum is that it has a more-or-less normal
              distribution of letters, as opposed to using 'Content here,
              content here', making it look like readable English. Many desktop
              publishing packages and web page editors now use Lorem Ipsum as
              their default model text.
            </p>

            <p style="margin-bottom: 25px">
              Contrary to popular belief, Lorem Ipsum is not simply random text.
              It has roots in a piece of classical Latin literature from 45 BC,
              making it over 2000 years old. Richard McClintock, a Latin
              professor at Hampden-Sydney College in Virginia, looked up one of
              the more obscure Latin words, consectetur, from a Lorem Ipsum
              passage, and going through the cites of the word in classical
              literature, discovered the undoubtable source. Lorem Ipsum comes
              from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et
              Malorum" (The Extremes of Good and Evil) by Cicero, written in 45
              BC. This book is a treatise on the theory of ethics, very popular
              during the Renaissance. The first line of Lorem Ipsum, "Lorem
              ipsum dolor sit amet..", comes from a line in section 1.10.32.
            </p>

            <h3 style="color: #667eea; margin-bottom: 15px; font-size: 18px">
              GENERAL CONDITIONS
            </h3>
            <p style="margin-bottom: 25px">
              Lorem Ipsum is simply dummy text of the printing and typesetting
              industry. Lorem Ipsum has been the industry's standard dummy text
              ever since the 1500s, when an unknown printer took a galley of
              type and scrambled it to make a type specimen book. It has
              survived not only five centuries, but also the leap into
              electronic typesetting, remaining essentially unchanged. It was
              popularised in the 1960s with the release of Letraset sheets
              containing Lorem Ipsum passages, and more recently with desktop
              publishing software like Aldus PageMaker including versions of
              Lorem Ipsum.
            </p>

            <h3 style="color: #667eea; margin-bottom: 15px; font-size: 18px">
              USE OF THE SITE AND SERVICE
            </h3>
            <p style="margin-bottom: 15px">
              Lorem Ipsum is simply dummy text of the printing and typesetting
              industry. Lorem Ipsum has been the industry's standard dummy text
              ever since the 1500s, when an unknown printer took a galley of
              type and scrambled it to make a type specimen book. It has
              survived not only five centuries, but also the leap into
              electronic typesetting, remaining essentially unchanged. It was
              popularised in the 1960s with the release of Letraset sheets
              containing Lorem Ipsum passages, and more recently with desktop
              publishing software like Aldus PageMaker including versions of
              Lorem Ipsum.
            </p>
          </div>
          <div class="button-container" style="margin-bottom: 30px">
            <a href="{% url 'login' %}" class="login-btn">Login</a>
            <a href="{% url 'signup' %}" class="signup-btn">Sign Up</a>
          </div>

          <div class="terms">
            By using <b>Tayapromediverse</b>, you agree to our
            <a href="{% url 'term' %}">Terms of Service</a> and
            <a href="{% url 'term' %}">Privacy Policy</a>.
          </div>
        </div>
      </div>
    </div>

    <!-- Toastify JS -->
    <script
      type="text/javascript"
      src="https://cdn.jsdelivr.net/npm/toastify-js"
    ></script>

    <!-- Toastify Utils -->
    <script src="{% static 'js/toastify-utils.js' %}"></script>

    <!-- Django Messages with Toastify -->
    {% if messages %}
    <div id="django-messages" style="display: none">
      {% for message in messages %}
      <div
        data-type="{{ message.tags }}"
        data-message="{{ message|escapejs }}"
      ></div>
      {% endfor %}
    </div>
    {% endif %}

    <script>
      // Responsive logo toggle
      function handleLogo() {
        const mobileLogo = document.querySelector(".mobile-logo");
        const leftSide = document.querySelector(".left-side");
        if (window.innerWidth <= 768) {
          mobileLogo.style.display = "block";
          leftSide.style.display = "none";
        } else {
          mobileLogo.style.display = "none";
          leftSide.style.display = "block";
        }
      }
      window.addEventListener("resize", handleLogo);
      window.addEventListener("load", handleLogo);

      // Handle Django messages with Toastify
      document.addEventListener("DOMContentLoaded", function () {
        const messageContainer = document.getElementById("django-messages");
        if (messageContainer) {
          const messages = messageContainer.querySelectorAll(
            "div[data-type][data-message]"
          );
          messages.forEach(function (msgDiv) {
            const type = msgDiv.getAttribute("data-type") || "info";
            const message = msgDiv.getAttribute("data-message");
            if (window.ToastifyUtils) {
              window.ToastifyUtils.show(message, type);
            }
          });
        }
      });

      // Add smooth scroll behavior for better UX
      document.documentElement.style.scrollBehavior = "smooth";

      // Optional: Add loading state for buttons
      function addLoadingState(button) {
        button.style.opacity = "0.7";
        button.style.pointerEvents = "none";

        setTimeout(() => {
          button.style.opacity = "1";
          button.style.pointerEvents = "auto";
        }, 1000);
      }

      // Add click effects
      document.querySelectorAll(".login-btn, .signup-btn").forEach((btn) => {
        btn.addEventListener("click", function () {
          addLoadingState(this);
        });
      });
    </script>
  </body>
</html>
