/* -----------------------------
   GLOBAL RESET & BOX SIZING
----------------------------- */
* {
    box-sizing: border-box;
  }
  
  /* Reset margins and paddings */
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;    /* Prevent horizontal scroll */
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    background: #f5efe4;
    color: #333;
    line-height: 1.6;
  }
  
  /* -----------------------------
     HEADER
  ----------------------------- */
  .header {
    text-align: center;
    background: linear-gradient(to bottom, #8B3E2F, #6C2E23);
    color: #fff;
    padding: 20px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .header h1 {
    font-size: 2rem;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .header p {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #F9E6D7;
  }
  
  /* -----------------------------
     DESCRIPTION SECTION
  ----------------------------- */
  .description-frame {
    max-width: 900px;
    margin: 20px auto;
    background: #fefbf5;
    border: 1px solid #ede8df;
    border-radius: 10px;
    padding: 20px;
    color: #655b4a;
    font-size: 1.1rem;
    line-height: 1.8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* -----------------------------
     MAIN CONTAINER
  ----------------------------- */
  .main-container {
    display: flex;
    flex-direction: row; /* Desktop layout: side by side */
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 1200px;
    justify-content: center;
    gap: 20px;
    padding-bottom: 60px; /* Space for footer if it's fixed */
  }
  
  /* ANALYSIS & RESULTS WRAPPER */
  .analysis-results-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1 1 600px;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
  }
  
  /* ANALYSIS FRAME */
  .analysis-frame {
    flex: 1 1 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
  }
  
  .analysis-frame h2 {
    margin-top: 0;
    color: #8B3E2F;
  }
  
  .analysis-instructions {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #555;
  }
  
  .inline-example {
    color: #8B3E2F;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
  }
  
  .inline-example:hover {
    color: #C0392B;
  }
  
  textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    resize: none;
    height: 120px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  textarea:focus {
    background-color: #ffffff;
    outline: none;
    border-color: #B5654F;
    box-shadow: 0 0 8px rgba(181, 101, 79, 0.2);
  }
  
  /* BUTTONS */
  .buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }
  
  .analyze-btn {
    padding: 10px 20px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    background-color: #8B3E2F;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .analyze-btn:hover {
    background-color: #6C2E23;
    transform: translateY(-2px);
  }
  
  .analyze-btn:active {
    transform: translateY(1px);
    box-shadow: none;
  }
  
  .reset-btn {
    background-color: #E74C3C;
  }
  
  .reset-btn:hover {
    background-color: #C0392B;
  }
  
  /* RESULTS FRAME */
  .results-frame {
    flex: 1 1 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    max-height: 580px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .results-frame h4 {
    margin-top: 0;
    color: #8B3E2F;
  }
  
  #output {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #333;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
  }
  
  #output ul {
    list-style: disc;
    padding-left: 20px;
  }
  
  .chart-container {
    margin-top: 15px;
    text-align: center;
  }
  
  canvas {
    max-width: 100%;
    height: 300px;
    margin: 0 auto;
  }
  
  /* DID YOU KNOW */
  .did-you-know {
    flex: 1 1 300px;
    background-color: #FFF5EB;
    border-radius: 12px;
    margin: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
  }
  
  .did-you-know h2 {
    font-size: 1.4rem;
    color: #8B3E2F;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .did-you-know ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #555;
    line-height: 1.6;
  }
  
  .did-you-know li {
    margin-bottom: 5px;
  }
  
  /* PHOTO GALLERY */
  .photo-gallery {
    flex: 1 1 300px;
    background-color: #FFF5EB;
    border-radius: 12px;
    margin: 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
  }
  
  .photo-gallery h2 {
    font-size: 1.4rem;
    color: #8B3E2F;
    margin-bottom: 15px;
    text-transform: capitalize;
  }
  
  .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }
  
  .gallery-item {
    max-width: 200px;
    text-align: center;
  }
  
  .gallery-image {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  }
  
  .gallery-image:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
  }
  
  .gallery-item p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #655b4a;
  }
  
  /* FOOTER */
  .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #8B3E2F, #6C2E23);
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
  }
  
  .footer-left p {
    margin: 0;
    white-space: nowrap; /* If needed to prevent text wrapping */
  }
  
  .footer-center {
    gap: 15px;
  }
  
  .footer-links a {
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .footer-links a:hover {
    color: #f1c40f;
    transform: scale(1.1);
  }
  
  .footer-right p {
    margin: 0;
  }
  
  .footer-right a {
    color: #f1c40f;
    text-decoration: none;
    margin: 0 6px; /* small gap if desired */
  }
  
  .footer-right a:hover {
    color: #f39c12;
  }
  
  /* MODAL */
  .modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  .modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    text-align: center;
  }
  
  .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
  }
  
  .close:hover {
    color: #000;
  }
  
  /* MEDIA QUERIES - RESPONSIVE */
  @media (max-width: 768px) {
    .main-container {
      flex-direction: column;
      align-items: center;
      max-width: 600px;
      margin: 0 auto;
      padding: 10px;
    }
  
    .analysis-results-wrapper {
      flex-direction: column;
      width: 100%;
    }
  
    .analysis-frame, .results-frame {
      width: 100%;
      margin-bottom: 20px;
    }
  
    .did-you-know, .photo-gallery {
      width: 100%;
      margin-bottom: 20px;
    }
  
    textarea {
      height: 100px;
    }
  
    .buttons {
      justify-content: center;
    }
  
    .analyze-btn {
      font-size: 0.9rem;
      padding: 10px 15px;
    }
  
    .chart-container {
      height: auto;
    }

    .footer {
        flex-direction: column;        /* Stack items vertically */
        text-align: center;           /* Center everything */
      }

    .footer-left,
    .footer-center,
    .footer-right {
    justify-content: center;      /* Center each section */
    margin: 10px 0;               /* Space them out vertically */
    }

    .footer-right p,
    .footer-left p {
      text-align: center;
      white-space: normal;          /* Allow text to wrap if needed */
    }

    .footer-links {
        gap: 10px;                    /* Slightly reduce gap on mobile */
      }
  }
  
  @media (max-width: 480px) {
    .header h1 {
      font-size: 1.5rem;
    }
    .header p {
      font-size: 1rem;
    }
  }
  