/* FormatForAI Styles - Based on New Design */

/* Global Styles */
:root {
  --primary-color: #333333;
  --accent-color: #5d35e1;
  --text-color: #333333;
  --border-color: #e2e8f0;
  --background-color: #ffffff;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --border-radius: 6px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
  margin-bottom: 0.5em;
  font-weight: 700;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header and Navigation */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  filter: invert(100%);
  width: 130px;
}

.menu-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  gap: 5px;
}

.burger-menu-icon {
  filter: invert(100%);
  width: 30px;
}

/* Main App Styles */
.scan-header {
  text-align: center;
  margin: 40px auto 20px;
  max-width: 800px;
}

.scan-header h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.scan-subtitle {
  font-size: 18px;
  color: #64748b;
  margin: 0;
}

.input-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 30px;
  margin: 20px auto 40px;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  column-gap: 15px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .input-section {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.privacy-notice {
  font-size: 13px;
  color: #64748b;
  margin: 18px 0 0 0;
  text-align: center;
  width: 100%;
  line-height: 1.4;
}

.error-message-inline {
  font-size: 13px;
  color: #ef4444;
  min-height: 18px;
  display: block;
  margin-top: 4px;
}

.error-message-inline:empty {
  display: none;
}

input[type='text'],
input[type='email'] {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-color);
  border-radius: var(--border-radius);
  outline: none;
  transition: all 0.3s ease;
}

input[type='text']::placeholder,
input[type='email']::placeholder {
  color: #a0aec0;
}

input[type='text']:focus,
input[type='email']:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(93, 53, 225, 0.1);
}

button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

button:hover {
  box-shadow: 0 4px 8px rgba(93, 53, 225, 0.2);
}

button:hover:not(.menu-btn) {
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Score Section */
#scoreSection {
  max-width: 1000px;
  margin: 30px auto;
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

#scoreSection h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

#scoreSection details {
  margin-top: 16px;
}

#scoreSection summary {
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  user-select: none;
  color: var(--accent-color);
}

#scoreSection ul {
  list-style: none;
  margin-left: 0;
}

#scoreSection li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
  border-left: 2px solid var(--accent-color);
  padding-left: 15px;
}

#scoreSection strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Viewer Section */
.viewer {
  display: none;
  max-width: 1200px;
  margin: 30px auto 40px auto;
  gap: 30px;
}

.viewer.active {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .viewer.active {
    grid-template-columns: 1fr 1fr;
  }
}

.pane {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  min-height: 600px;
  overflow-y: auto;
  box-shadow: var(--box-shadow);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.pane h2 {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--primary-color);
}

.pane img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* LLM View Specific Styling */
#llmView {
  font-family: sans-serif;
}

#llmView h1,
#llmView h2,
#llmView h3,
#llmView h4,
#llmView h5,
#llmView h6 {
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 16px;
}

#llmView h1.template-header {
  font-size: 24px;
}

#llmView h2.template-header {
  font-size: 20px;
  border: none;
  padding: 0;
}

#llmView h3.template-header {
  font-size: 18px;
}

#llmView pre {
  background: #f8fafc;
  padding: 15px;
  overflow-x: auto;
  margin: 15px 0;
  border-radius: 4px;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 14px;
  border: 1px solid #edf2f7;
}

#llmView code {
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 14px;
}

#llmView ul,
#llmView ol {
  margin-left: 25px;
  margin-bottom: 15px;
}

#llmView li {
  margin-bottom: 2px;
}

#llmView strong {
  font-weight: 600;
  color: #333;
}

#llmView hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 25px 0;
}

/* JSON Tree Styling */
.json-tree-container {
  margin: 20px 0;
  background: #f8fafc;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #edf2f7;
  overflow-x: scroll;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #a0aec0;
  font-size: 16px;
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif !important;
}

.loading:before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s linear infinite;
}

.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #e53e3e;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  background-color: #fff5f5;
  border-radius: 4px;
  border: 1px solid #fed7d7;
  margin: 20px 0;
  font-family: sans-serif;
}

.page-header-structure + ul {
  font-size: 14px;
  font-weight: 400;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Lottie Loading Animation */
.lottie-loading-container {
  display: none;
  max-width: 600px;
  margin: 60px auto;
  padding: 40px;
  text-align: center;
}

.lottie-loading-container.active {
  display: block;
}

#lottieAnimation {
  width: 100%;
  max-width: 400px;
  height: 300px;
  margin: 0 auto;
}

.lottie-loading-text {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-top: 20px;
  margin-bottom: 12px;
}

.lottie-loading-subtext {
  font-size: 15px;
  color: #64748b;
}

/* Footer */
footer {
  margin-top: 60px;
  padding: 80px 20px;
  text-align: center;
  font-size: 14px;
  color: #718096;
  border-top: 1px solid var(--border-color);
  background-image: url(https://cdn.prod.website-files.com/68dda91fc1fe7c7e159bc18d/68e018ac74364c0dda8ccf74_ChatGPT%20Image%20Oct%203%2C%202025%2C%2001_40_28%20PM.avif);
  background-position: 0 0, 50%;
  background-size: cover;
  font-family: 'DM Sans', sans-serif;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.footer-logo {
  width: 150px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: #718096;
  text-decoration: none;
  transition: color 0.2s ease;
  text-transform: uppercase;
  color: #fffc;
  font-size: 18px;
  font-weight: 500;
}

.footer-bottom {
  margin-top: 20px;
  color: #a0aec0;
  font-size: 16px;
  font-weight: 500;
}

.image-icon {
  height: 14px;
  width: 14px;
  display: inline-block;
  background-image: url(image-icon.svg);
  background-size: 14px 14px;
  margin-right: 5px;
}

.pane.llm {
  font-size: 14px;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 432px;
  height: 100%;
  max-height: calc(100% - 20px);
  margin: 10px 0;
  background-color: white;
  z-index: 1000;
  padding: 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
  border-radius: 4px;
}

.mobile-menu.active {
  right: 30px; /* Space on the right */
}

/* Close button - X icon */
.menu-close-container {
  position: absolute;
  top: 0;
  right: 0;
}

.close-menu-btn {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 16px;
  background-color: #f6f6f6;
  border-radius: 0;
}

.close-menu-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Navigation links styling */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mobile-nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 36px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.nav-item-wrapper {
  position: relative;
  display: block;
  width: fit-content;
}

.mobile-nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 36px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.2s ease;
  display: inline-block;
}

.mobile-nav-link:hover {
  text-decoration: none;
}

/* Underline animation */
.nav-item-wrapper::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3.5px;
  background-color: #17236a;
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item-wrapper:hover::after {
  width: 100%;
}

/* Star icon - positioned on the right */
.nav-item-wrapper::before {
  content: '';
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='17' height='17' viewBox='0 0 17 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 9.94212H12.002L15.572 13.505L13.498 15.507L9.962 11.978V17L7.072 16.9661V11.978L3.502 15.5409L1.496 13.4711L5.032 9.94212H0V7.05788H5.032L1.462 3.49501L3.502 1.45908L7.072 5.02196V0H9.962V5.02196L13.532 1.45908L15.572 3.49501L12.002 7.05788H17V9.94212Z' fill='%231C26E6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.5s ease;
  opacity: 0;
}

.nav-item-wrapper:hover::before {
  width: 16px;
  height: 16px;
  opacity: 1;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.05);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scrolling when menu is open */
body.menu-open {
  overflow: hidden;
}

.page-header-list {
  list-style-type: none;
}
.indent-h1::before {
  content: '•';
  margin-right: 8px;
}
.indent-h2::before {
  content: '◦';
  margin-right: 8px;
}
.indent-h3::before {
  content: '▪';
  margin-right: 8px;
}
.indent-h4::before {
  content: '▫';
  margin-right: 8px;
}
.indent-h5::before {
  content: '●';
  margin-right: 8px;
}
.indent-h6::before {
  content: '○';
  margin-right: 8px;
}

.indent-h1 {
  margin-left: 0px;
}
.indent-h2 {
  margin-left: 12px;
}
.indent-h3 {
  margin-left: 24px;
}
.indent-h4 {
  margin-left: 36px;
}
.indent-h5 {
  margin-left: 48px;
}
.indent-h6 {
  margin-left: 60px;
}

@media (max-width: 767px) {
  /* Mobile menu styling */
  .mobile-menu {
    max-width: 100%;
    width: 100%;
    right: -100%;
    margin: 0;
    border-radius: 0;
    height: 100%;
    max-height: 100%;
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-nav {
    gap: 22px;
  }

  .mobile-nav-link {
    font-size: 22px;
  }

  .nav-item-wrapper::before {
    right: -20px;
    width: 0;
    height: 0;
  }

  .nav-item-wrapper:hover::before,
  .nav-item-wrapper.active::before {
    width: 14px;
    height: 14px;
  }

  .menu-close-container {
    top: 0;
    right: 0;
  }

  .close-menu-btn {
    padding: 12px;
  }

  .input-section {
    margin-bottom: 0;
  }

  #urlInput {
    margin-bottom: 15px;
  }

  #emailInput {
    margin-bottom: 15px;
  }

  #lottieLoadingContainer {
    margin: 0 auto;
    padding-top: 0;
  }
}
