body {
    background: #f4f7fc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    padding-bottom: 100px;
    /* Removed text-align: center to stop forcing everything centered */
}

.logo-image {
    max-width: 400px;
    height: auto;
    margin-bottom: 0rem;
}

.container {
    background: white;
    padding: 1px 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    width: 100%;
    text-align: center;
}

h1 {
    margin-bottom: 1rem;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-align: left;
    margin-top: 1rem;
}

input.form-control {
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
}

.buttons-row {
    margin-top: 1.8rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#output-section {
    margin-top: 2rem;
    min-height: 80px;
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 1rem;
    background: #e9f1ff;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin: 0 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider Base */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

/* Slider knob */
.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Checked state */
.switch input:checked + .slider {
    background-color: #5cb85c;
}

.switch input:checked + .slider:before {
    transform: translateX(30px);
}

/* --- Reset unwanted navbar overrides --- */
.navbar {
  background-color: #198754 !important; /* Bootstrap bg-success green */
}

.navbar .container {
  background: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.navbar-collapse {
  background: none !important;
}
/* Match navbar style across all pages */
.navbar {
  background-color: #198754 !important; /* Same dark green */
}

.navbar .nav-link {
  color: #fff !important;         /* White text */
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: #dcdcdc !important;      /* Light grey on hover */
}

.navbar .nav-link.active {
  color: #fff !important;
  background: none !important;    /* Remove Bootstrap's green box */
  font-weight: 700;               /* Bold active link */
}

.card, 
.group-card {
  background-color: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}


.group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.group-card .group-label {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.group-card .name-pill {
    display: inline-block;
    margin: 5px 4px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- Recommended: small left nudge + keep cards centered --- */
main.container-fluid > .container {
  padding-left: 12px !important;   /* move content a little left */
  padding-right: 12px !important;
}

/* make the results area and card grid behave as a centered flex layout */
#output-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding-left: 0;
  padding-right: 0;
}

/* If you used a .card-grid class: ensure it centers */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* center the cards horizontally */
  gap: 1rem;
  margin: 0 auto;
  padding: 0;
}

/* card sizing and auto-centering so single cards don't hug the container edge */
.group-card,
.card {
  width: 280px;
  max-width: calc(100% - 24px);
  margin: 0.5rem auto;
}
