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

      body {
          background: url("../images/kitchen.d7e18ae08615.jpg") no-repeat center center fixed;
          background-size: cover;
          font-family: "Georgia", serif;
          line-height: 1.8;
          color: #2c3e50;
      }

      /* Overlay for readability */
      body::before {
          content: "";
          position: fixed;
          inset: 0;
          background: rgba(244, 246, 245, 0.806);
          z-index: -1;
      }

      /* Navigation Bar */
      .navbar {
          padding: 1.5rem 5%;
          display: flex;
          justify-content: space-between;
          align-items: center;

      }

      .logo {
          font-size: 1.8rem;
          font-weight: normal;
          color: #d35400;
          letter-spacing: 1px;
          display: flex;
          align-items: center;
          gap: 0.5rem;
      }

      .nav-links {
          display: flex;
          gap: 2.5rem;
          list-style: none;
      }

      .nav-links a {
          text-decoration: none;
          color: #5a5a5a;
          font-size: 1.1rem;
          transition: color 0.3s;
      }

      .nav-links a:hover {
          color: #d35400;
      }

      .messages {
          display: flex;
          justify-content: center;
          /* centers the message horizontally */
          /* spacing from top of the page/form */
      }

      .alert {
          padding: 15px 20px;
          border-radius: 8px;
          font-weight: 500;
          box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
          text-align: center;
          max-width: 500px;
          /* limit the width */
          width: 100%;
          /* allow it to shrink on small screens */
      }

      .alert-success,
      .alert-info {
          background-color: #d4edda;
          color: #155724;
          border-left: 4px solid #2ecc71;
      }

      .alert-error {
          background-color: #f8d7da;
          color: #721c24;
          border-left: 4px solid #e74c3c;
      }


      /* Login */

      .login-container,
      .signup-container {
          background: rgba(250, 248, 245, 0.95);
          width: 100%;
          max-width: 420px;
          margin: 4rem auto;
          padding: 2.5rem 2rem;
          border-radius: 5px;
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
          transition: all 0.3s ease;
          box-sizing: border-box;
      }

      .login-container:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      }

      .login-container h1,
      .login-container h2,
      .signup-container h1 {
          font-size: 2rem;
          font-weight: 400;
          margin-bottom: 1.5rem;
          color: #2c3e50;
          text-align: center;
      }

      .error p {
          color: #d35400;
          text-align: center;
      }

      form {
          display: flex;
          flex-direction: column;
          gap: 1.2rem;
      }

      form p {
          margin: 0;
          font-size: 0.95rem;
          line-height: 1.6;
          color: #5a5a5a;
      }

      .form-group {
          margin-bottom: 1.2rem;
          position: relative;
      }

      .form-group label {
          display: block;
          margin-bottom: 0.5rem;
          color: #2c3e50;
          font-size: 0.95rem;
          font-weight: 400;
      }

      .form-group input {
          width: 100%;
          padding: 0.8rem 1rem;
          border: 1px solid #f0e6dc;
          border-radius: 3px;
          font-size: 0.95rem;
          font-family: "Segoe UI", sans-serif;
          transition: border-color 0.3s;
          box-sizing: border-box;
      }

      .form-group input:focus {
          outline: none;
          border-color: #d35400;
      }

      .help,
      .helptext {
          position: absolute;
          top: 100%;
          /* just below the input */
          left: 0;
          width: 100%;
          background: #f4f6f5;
          /* light background */
          border: 1px solid #ddd;
          padding: 8px 10px;
          border-radius: 8px;
          font-size: 12px;
          color: #333;
          box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
          opacity: 0;
          pointer-events: none;
          transition: opacity 0.3s ease, transform 0.3s ease;
          transform: translateY(-5px);
          /* start slightly up */
          z-index: 10;
          /* ensure it floats above other elements */
      }

      .form-group input[type="password"]:hover+.help,
      .form-group input[type="password"]:focus+.help {
          opacity: 1;
          pointer-events: auto;
          transform: translateY(0);
          /* animate down into place */
      }


      .btn-submit {
          display: inline-block;
          padding: 0.9rem 2rem;
          background: #d35400;
          color: white;
          text-decoration: none;
          border: none;
          border-radius: 3px;
          font-size: 1rem;
          transition: background 0.3s;
          font-family: "Segoe UI", sans-serif;
          cursor: pointer;
          width: 100%;
          margin-top: 0.5rem;
      }

      .btn-submit:hover {
          background: #b84700;
      }

      .signup-link {
          text-align: center;
          margin-top: 1.5rem;
          color: #5a5a5a;
          font-size: 0.95rem;
      }

      .signup-link a {
          color: #d35400;
          text-decoration: none;
          font-weight: 500;
      }

      .signup-link a:hover {
          text-decoration: underline;
      }

      .error-message {
          color: #e74c3c;
          font-size: 0.9rem;
          margin-top: 0.3rem;
      }

      /* Hero section */
      .hero {
          padding: 8rem 5% 6rem;
          max-width: 900px;
          margin: 0 auto;
          text-align: center;
      }

      .hero h1 {
          font-size: 3.5rem;
          font-weight: 400;
          margin-bottom: 1.5rem;
          color: #2c3e50;
          line-height: 1.2;
      }

      .hero p {
          font-size: 1.2rem;
          color: #666;
          margin-bottom: 3rem;
          font-family: "Segoe UI", sans-serif;
      }

      /* Homepage */
      .cta-button {
          display: inline-block;
          padding: 1rem 3rem;
          background: #d35400;
          color: white;
          text-decoration: none;
          border-radius: 3px;
          font-size: 1rem;
          transition: background 0.3s;
          font-family: "Segoe UI", sans-serif;
      }

      .cta-button:hover {
          background: #b84700;
      }

      .divider {
          width: 60px;
          height: 1px;
          background: #d35400;
          margin: 1rem auto;
      }


      .popular-recipes {
          padding: 3rem;
          background: #faf8f5;
          margin-top: 4rem;
      }

      .popular-recipes h2 {
          text-align: center;
          font-size: 2rem;
          font-weight: 400;
          margin-bottom: 3rem;
          color: #2c3e50;
      }

      /* All recipes */
      .recipe-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
          gap: 2rem;
          max-width: 1000px;
          margin: 0 auto;
      }

      .recipe-card {
          background: white;
          text-decoration: none;
          color: inherit;
          display: block;
          max-width: 312px;
          transition: transform 0.2s, box-shadow 0.2s;
          box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
      }

      .recipe-card:hover {
          transform: translateY(-5px);
          box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      }

      .recipe-img {
          width: 100%;
          height: 220px;
          background: #f5f5f5;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 3.5rem;
          overflow: hidden;
          margin-bottom: 1rem;
      }

      .recipe-info {
          margin: auto;
          padding: 0 1rem 1rem 1rem;
      }

      .recipe-img img {
          width: 100%;
          height: 100%;
          object-fit: cover;
      }

      .recipe-info h3 {
          font-size: 1.2rem;
          font-weight: 400;
          margin-bottom: 0.5rem;
          color: #2c3e50;
      }

      .recipe-info p {
          font-size: 0.9rem;
          color: #777;
          font-family: "Segoe UI", sans-serif;
          line-height: 1.5;
          margin-bottom: 0.8rem;
      }

      .btn-primary {
          display: inline-block;
          padding: 0.6rem 1.3rem;
          background: #d35400;
          color: white;
          text-decoration: none;
          border-radius: 3px;
          font-size: 0.85rem;
          transition: background 0.3s;
          font-family: "Segoe UI", sans-serif;
      }

      .btn-primary:hover {
          background: #b84700;
      }

      /* Recipe Details */
      .recipe-detail-container {
          max-width: 1000px;
          margin: 2rem auto;
          padding: 0 5%;
      }

      .recipe-main-section {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 2rem;
          margin-bottom: 2rem;
          background: white;
          padding: 1.5rem;
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      }

      .recipe-image-container {
          width: 100%;
          height: 100%;
          min-height: 300px;
          max-height: 400px;
          overflow: hidden;
          border-radius: 5px;
      }

      .recipe-image-container img {
          width: 100%;
          height: 100%;
          object-fit: cover;
      }

      .recipe-image-placeholder {
          width: 100%;
          height: 100%;
          background: #f5f5f5;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 6rem;
      }

      .recipe-info-section h1 {
          font-size: 2rem;
          font-weight: 400;
          margin-bottom: 0.8rem;
          color: #2c3e50;
      }

      .recipe-stats {
          display: flex;
          gap: 1.5rem;
          margin-bottom: 1.5rem;
          padding-bottom: 1rem;
          border-bottom: 2px solid #f0e6dc;
          flex-wrap: wrap;
          font-size: 0.9rem;
      }

      .recipe-stats span {
          color: #5a5a5a;
      }

      .recipe-info-section h2 {
          font-size: 1.3rem;
          font-weight: 400;
          margin-bottom: 0.8rem;
          color: #d35400;
      }

      .ingredients-list {
          list-style: none;
          padding: 0;
          margin-bottom: 1.5rem;
      }

      .ingredients-list li {
          padding: 0.4rem 0;
          color: #5a5a5a;
          border-bottom: 1px solid #f5f5f5;
          font-size: 0.95rem;
      }

      .like-form {
          margin-top: 1rem;
      }

      .like-button {
          border: none;
          cursor: pointer;
          width: 100%;
      }

      .like-button.unliked {
          background: #e74c3c;
      }

      .like-link {
          display: block;
          text-align: center;
          width: 100%;
      }

      .cooking-method-section {
          background: #faf8f5;
          padding: 2rem;
          border-left: 4px solid #d35400;
          margin-bottom: 1.5rem;
      }

      .cooking-method-section h2 {
          font-size: 1.5rem;
          font-weight: 400;
          margin-bottom: 1rem;
          color: #2c3e50;
      }

      .cooking-method-text {
          color: #5a5a5a;
          line-height: 1.8;
          white-space: pre-line;
      }

      .back-button-container {
          text-align: center;
      }

      .btn-back {
          background: #5a5a5a;
      }

      .footer {
          padding: 3rem 5%;
          text-align: center;
          color: #999;
          font-size: 0.9rem;
          margin-top: 4rem;
      }

      /* Search Recipe Page */
      .search-section {
          min-height: 60vh;
          max-width: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 4rem 5%;
      }

      .search-container {
          background: rgba(250, 248, 245, 0.95);
          padding: 2.5rem;
          border-radius: 5px;
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
          width: 100%;
          max-width: 900px;
      }

      .search-container h1 {
          text-align: center;
          font-size: 2.2rem;
          font-weight: 400;
          margin-bottom: 0.5rem;
          color: #2c3e50;
      }

      .search-form {
          margin-top: 2rem;
      }

      .search-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 1.5rem;
          margin-bottom: 1.5rem;
      }

      .search-grid .form-group {
          margin-bottom: 0;
      }

      .search-grid .form-group input,
      .search-grid .form-group select {
          width: 100%;
          padding: 0.8rem 1rem;
          border: 1px solid #f0e6dc;
          border-radius: 3px;
          font-size: 0.95rem;
          font-family: "Segoe UI", sans-serif;
          transition: border-color 0.3s;
          box-sizing: border-box;
          background: white;
      }

      .search-grid .form-group input:focus,
      .search-grid .form-group select:focus {
          outline: none;
          border-color: #d35400;
      }

      .search-btn {
          margin-top: 0.5rem;
          width: 25%;
      }

      /* Chart Section */
      .chart-section {
          padding: 3rem;
          background: #faf8f5;
          margin-top: 4rem;
      }

      .chart-section h2 {
          text-align: center;
          font-size: 2.2rem;
          font-weight: 400;
          margin-bottom: 0.5rem;
          color: #2c3e50;
      }

      .chart-section img {
          width: 100%;
          max-width: 900px;
          height: auto;
          border-radius: 5px;
          object-fit: contain;
          background: white;
      }

      .chart-item {
          text-align: center;
          margin-top: 2rem;
          margin-bottom: 1.5rem;
          padding: 10px;
      }

      .chart-item img {
          padding: 5px;
      }

      .chart-item h3 {
          margin-bottom: 1rem;
      }

      /* Paginator */
      .pagination {
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 0.5rem;
          margin-top: 2rem;
          padding: 1rem 0;
      }

      .page-info {
          text-align: center;
          justify-content: center;
      }

      .pagination a,
      .pagination .btn-disabled {
          padding: 0.5rem 1rem;
          background: #d35400;
          color: white;
          text-decoration: none;
          border-radius: 3px;
          transition: background 0.3s;
          min-width: 40px;
          text-align: center;
          font-size: 1.2rem;
      }

      .pagination a:hover {
          background: #b84700;
      }

      .pagination .btn-disabled {
          background: #ccc;
          color: #999;
          cursor: not-allowed;
      }

      .pagination .page-info {
          color: #5a5a5a;
          font-weight: 500;
          padding: 0 1rem;
      }

      .pagination .btn-primary {
          padding: 0.3rem 0.8rem;
          background: #d35400;
          color: white;
          text-decoration: none;
          border-radius: 3px;
          transition: background 0.3s;
          min-width: 40px;
          text-align: center;
          font-size: 0.8rem;
      }

      @media (max-width: 768px) {
          .hero h1 {
              font-size: 2.5rem;
          }

          .navbar {
              flex-direction: column;
              gap: 1rem;
          }

          .nav-links {
              gap: 1.5rem;
          }

          section>div:first-child {
              grid-template-columns: 1fr;
          }

          .recipe-main-section {
              grid-template-columns: 1fr;
          }

          .recipe-detail-container {
              margin: 2rem auto;
          }

          .recipe-info-section h1 {
              font-size: 2rem;
          }

          .login-container {
              margin: 2rem auto;
              padding: 2rem 1.5rem;
              max-width: 90%;
          }

          .search-grid {
              grid-template-columns: 1fr;
          }

          .search-container {
              padding: 2rem 1.5rem;
          }

          .search-container h1 {
              font-size: 1.8rem;
          }
      }