body {
    font-family: sans-serif;
    background-color: #f8f9fa;
    margin: 20px; /* Add some margin around the whole page */
}

.dashboard-container {
    display: flex;
    gap: 20px; /* Space between the two main columns */
}

.input-column {
    flex: 0 0 300px; /* Fixed width for the input column */
    background-color: #e9ecef; /* Light grey background */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.chart-column {
    flex-grow: 1; /* Allow the chart column to take remaining space */
    background-color: #e9ecef; /* Light grey background */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Ensure some minimum height for the chart area */
}

h1 {
    text-align: center;
    margin-bottom: 20px; /* Reduced margin for better spacing */
}

h4 {
    margin-top: 0; /* Remove default top margin for form section */
    margin-bottom: 15px;
}

#chart {
    display: flex;
     justify-content: flex-start; 
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 40px;
    position: relative;
    flex-grow: 1;
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: auto;
    
    /* 🔥 ADD these lines: */
    max-height: 400px;
    overflow-y: hidden;
}

.chart-section {
    background-color: transparent; /* Make the inner section transparent */
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;  /* Ensure full height */
    width: 100%;   /* Ensure full width */
}

.chart-wrapper {
    display: flex;
    align-items: flex-end;
    overflow-x: auto;
    padding: 00px 0;
    border-bottom: 2px solid #ccc;
    background-image: linear-gradient(to top, rgba(0,0,0,0.1) 1px, transparent 1px),
                      linear-gradient(to top, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 100% calc(10px * 1.5), 100% calc(10px * 1.5 * 10);
    background-position: bottom;
    flex-grow: 1; /* Make the chart wrapper grow to fill vertical space */
    width: 100%;   /* Ensure it takes all available width */
}
#scale {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-right: 10px;
    font-size: 10px;
    color: #333;
    position: relative;
    height: 100%;
    padding-right: 5px;
    
}

.tick {
    height: calc(10px * 1.5);
    display: flex;

    justify-content: center
}

.tick .label {
    margin-bottom: 0;
}

.figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 5;
 
}
.label {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    padding-bottom: 10px; /* Space for labels */
}

.figure.tallest .label {
    color: green;
    font-size: 14px;
}

.figure.tallest .image-container img {
    filter: drop-shadow(0 0 7px green);
}

.figure.smallest .label {
    color: rgb(255, 0, 212);
    font-size: 14px;
}

.figure.smallest .image-container img {
    filter: drop-shadow(0 0 7px rgb(255, 0, 212));
}

.image-container {
    width: 30px;
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}


.bottom-line {
    bottom: 0;
}

.tallest-height-line {
    position: absolute;
    left: 0;
    width: 100%;
    border-bottom: 2px solid green;
    z-index: -1;
}

.profession, .height-label {
    display: inline;
    font-size: 10px;
    font-style: italic;
    color: #555;
    margin-right: 5px;
}

.height-label {
    font-style: normal;
    font-weight: bold;
}

.badge {
    position: absolute;
    background-color: #007bff;
    color: white;
    font-size: 0.7em;
    padding: 5px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
}

.badge.tallest-badge {
    background-color: green;
}

.badge.smallest-badge {
    background-color: rgb(255, 0, 119);
}

.equal-height-badge {
    background-color: #4d4b4b;
}

.figure {
  margin: 0 !important;
}


.figure.user-height .label {
    color: orange;
    font-size: 14px;
}

.figure.user-height .image-container img {
    filter: drop-shadow(0 0 7px orange);
}

.badge.user-height-badge {
    background-color: orange;
}


.comparison-form {
    text-align: left; /* Align form elements to the left within the column */
}

.comparison-form label {
    display: block;
    margin-bottom: 5px; /* Reduced margin */
    font-weight: bold;
}

.comparison-form input[type="number"],
.comparison-form select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    width: calc(100% - 16px); /* Adjust width for padding and border */
    box-sizing: border-box; /* Ensure padding and border are inside the width */
}

.comparison-form button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%; /* Make the button full width */
    box-sizing: border-box; /* Ensure padding and border are inside the width */
}

.comparison-form button:hover {
    background-color: #0056b3;
}

#selectedCelebrityDisplay {
    margin-top: 15px;
    font-size: 0.9em;
    color: #555;
}

.autocomplete-list,
.autocomplete-suggestions {
    background-color: #fff !important;  /* ✅ Ensure white solid background */
    border: 1px solid #ccc;
    border-top: none;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: none; /* ✅ prevent blur on mobile */
}

.autocomplete-item {
    padding: 8px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background-color: #f0f0f0;
}

.dropdown-menu {
  background-color: #fff !important;
  z-index: 9999 !important;
  position: absolute !important;
  
}

.selected-celebrity-tag {
    background-color: #6c757d;
    color: white;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.8em;
}

.selected-celebrity-tag .remove {
    cursor: pointer;
    margin-left: 5px;
    font-weight: bold;
}
.user-figure {
    position: absolute;
    bottom: 0;
    left: 50%; /* Adjust to center */
    transform: translateX(-50%);
    color: white;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    font-size: 12px;
}

/* Animation for entering the chart */
.figure.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}
/* Animation for exiting the chart */
.figure.fade-out {
    animation: fadeOutDown 0.4s ease forwards;
}
.height-line {
    position: absolute;
    left: 0;
    width: 100%;
    border-bottom: 2px solid #e23c97ee;
    z-index: 1;
}
/* Style for the tallest line */
.tallest-line {
    border-top: 1px solid #2ecc3b;
}

/* Style for the shortest line */
.shortest-line {
    border-top: 1px solid #e23c97ee;
}

.gender-button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.gender-btn {
  flex: 1 1 auto;
  min-width: 120px; /* prevent shrinking too small */
  max-width: 48%;
  text-align: center;

  background-color: #dee2e6 !important;
  color: #333 !important;
  border: 1px solid #ccc;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.gender-btn.active {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-color: #0d6efd;
  transform: scale(1.05); /* Slight zoom effect when active */
}

.gender-btn:active {
  transform: scale(0.97); /* Shrink slightly when pressed */
}

#compareButton {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#compareButton:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#compareButton:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.watermark.permanent {
    position: absolute;
    bottom: 0px;
    right: 0px;
    font-size: 1em; /* ⬅️ increased from 0.75em */
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.watermark.permanent img {
    height: 28px; /* ⬅️ increased from 20px */
    margin-right: 8px;
}

.custom-text-button {
  border: 1px solid #ccc;
  background-color: transparent;
  color: #333;
  font-size: 0.75rem;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-text-button:hover {
  background-color: #f0f0f0;
  border-color: #888;
  color: #000;
  cursor: pointer;
}
.btn-primary {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.97);
}

.figure-actions {
    position: absolute;
    bottom: 5px;
    display: flex;
    gap: 6px;
    z-index: 15;
    transform: translateX(-50%);
    left: 50%;
}

.figure-action-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.7em;
    padding: 4px 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease;
}

.figure-action-btn:hover {
    background-color: #f0f0f0;
}

.avatar-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 5px;
    transition: border 0.2s ease;
    width: 80px;
}

.avatar-option:hover {
    border: 2px solid #007bff;
    background-color: #f8f9fa;
}

.share-button-wrapper {
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.9em;
}
.chart-scale-label {
    z-index: 10;
    font-family: monospace;
    opacity: 0.85;
    user-select: none;
}

.height-line.grid-line {
    border-bottom-style: dashed;
    border-bottom-width: 1px;
    opacity: 0.2;
}


@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeOutDown {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}
@media (max-width: 768px) {
    .autocomplete-list,
    .autocomplete-suggestions {
        background-color: #fff !important;
        position: absolute;
    }
}
