/* ==========================
   🔷 CSS Variables
   Define primary colors and text colors for consistent branding
========================== */
:root {
  --primary: #f97316;          /* Deep orange primary */
  --secondary: #f43f5e;        /* Pinkish secondary */
  --text-dark: #1e293b;        /* Dark text color */
  --brand-dark: #1e3a8a;       /* Dark blue for brand accents */
  --light-bg: #f1f5f9;         /* Light background for panels */
  --genz-bg: #fff7ed;          /* Light cream background for GenZ panel */
}

/* ==========================
   🔷 General Styles
   Reset box sizing and body font/colors
========================== */
* {
  box-sizing: border-box;      /* Include padding and border in element's total width */
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #fff;      /* White page background */
  color: var(--text-dark);     /* Default text color */
  overflow-x: hidden;          /* Prevent horizontal scroll */
}

.container {
  max-width: 1200px;           /* Limit content width */
  margin: 0 auto;              /* Center container horizontally */
  padding: 0 20px;             /* Side padding */
}

/* ==========================
   🔷 Header & Navbar
   Gradient background and flex layout for nav links
========================== */
.header {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 15px 0;             /* Reduced from 10px 0 for compact header */
  border-radius: 0 0 20px 20px;
}

.container.navbar {
  padding: 15px 20px;         /* Reduced from 20px 40px for tighter spacing */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;           /* Ensure logo and hamburger stay in one line */
}

.logo {
  font-size: 25px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

.logo a:hover {
  color: inherit;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;                    /* Reduced from 1px for tighter spacing */
  margin-left: auto;         /* Push nav-links to extreme right */
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;        /* Reduced from 8px 12px for compact links */
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffeb3b;            /* Yellow highlight on hover */
}

.btn-primary {
  background-color: var(--brand-dark);
  color: white;
  padding: 6px 16px;        /* Slightly reduced from 8px 18px */
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
}

.btn-secondary {
  background-color: white;
  color: var(--brand-dark);
  padding: 6px 16px;        /* Slightly reduced from 8px 18px */
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
}

/* Hamburger icon - hidden on desktop */
.hamburger {
  display: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* ==========================
   🔷 Input Panel
========================== */
#input-panel label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  color: var(--brand-dark);
}

.input-box {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.input-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* Range slider styling */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #ddd;
  outline: none;
  margin-top: 6px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid var(--secondary);
  transition: background-color 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--secondary);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid var(--secondary);
  transition: background-color 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  background: var(--secondary);
}

/* ==========================
   🔷 Output Panel
========================== */
#output-panel {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#output-panel .bg-gray-100 {
  background-color: var(--light-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

#output-panel h2, #output-panel h3 {
  color: var(--brand-dark);
}

#output-panel p {
  font-size: 16px;
  margin: 6px 0;
}

/* Progress Bars */
#output-panel label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  color: var(--brand-dark);
}

.w-full.bg-gray-200 {
  background-color: #e2e8f0 !important; /* Tailwind gray-200 override */
  height: 16px !important; /* Slightly taller progress bars */
  border-radius: 8px !important;
  overflow: hidden;
}

#wantsBar, #needsBar, #savingsBar {
  height: 16px !important;
  border-radius: 8px !important;
}

/* Colors for progress bars */
#needsBar {
  background-color: #2563eb; /* Tailwind blue-600 */
}

#wantsBar {
  background-color: #16a34a; /* Tailwind green-600 */
}

#savingsBar {
  background-color: #ca8a04; /* Tailwind yellow-500 */
}

/* Charts Container */
#output-panel .flex.gap-4.justify-between {
  gap: 1rem;
  margin-top: 1rem;
}

#output-panel canvas {
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  background-color: white;
  max-width: 100%;
  height: auto !important;
}

/* Smart Suggestions Box */
.bg-blue-50 {
  background-color: #eff6ff !important; /* Tailwind blue-50 */
}

#output-panel .shadow-md {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#suggestion {
  font-size: 16px;
  color: var(--brand-dark);
}

/* ==========================
   🔷 Footer
========================== */
footer {
  background-color: var(--brand-dark);
  color: white;
  padding: 40px 20px;
  text-align: center;
  border-radius: 20px 20px 0 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-follow,
.footer-links {
  width: 45%;
}

/* Default icon color and size */
.social-icon .x-icon {
  fill: white;
  width: 15px;
  height: 15px;
  transition: fill 0.3s ease;
  margin-right: 8px;
}

.social-icon:hover .x-icon {
  fill: #FF4500;
}

.social-icon:hover {
  outline: none;
  color: #FF4500;
}

h3 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

ul {
  list-style-type: none;
  padding: 0;
}

ul li {
  margin-bottom: 10px;
}

ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

ul li a:hover {
  color: var(--primary);
}

.footer-disclaimer,
.footer-copyright {
  font-size: 14px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ==========================
   🔷 Media Queries
========================== */
@media (max-width: 768px) {
  .container.navbar {
    padding: 15px 20px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 20px 0;

  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    margin: 15px 0;
  
  }

  .hamburger {
    display: block;
  }
}

@media (max-width: 480px) {

  .left-panel input,
  .left-panel button,
  .results p {
    font-size: 0.8rem;
  }

  .left-panel button {
    padding: 0.5rem;
    min-height: 40px;
  }

  .result-heading {
    font-size: 1.1rem;
  }
}
