/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #f0f0f0;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ff3366;
}

h2 {
    margin-bottom: 20px;
    color: #ff3366;
}

/* Main Buttons on Index */
.main-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.main-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #ff3366;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: transform 0.2s, background-color 0.2s;
}

.main-btn:hover {
    background-color: #e61e4d;
    transform: translateY(-3px);
}

/* Navigation bar styling */
.navbar {
    background-color: #222;
    width: 100%;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 25px;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff3366;
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar-links a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.navbar-links a:hover {
    background-color: #333;
    color: #ff3366;
}

/* Category Sections */
.category-section {
    width: fit-content; /* Expand to fit content */
    min-width: 90%; /* At minimum, take up most of the container width */
    max-width: 100%; /* Don't exceed container width */
    margin: 0 auto 60px auto; /* Center horizontally with bottom margin */
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-section:not(:last-child) {
    margin-bottom: 40px;
}

.category-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #ff3366;
    padding: 10px 0;
    border-bottom: 2px solid #444;
}

/* Updated Image Gallery - Force images to stay in a single row with horizontal scrolling */
.image-gallery {
    display: flex;
    flex-wrap: nowrap; /* Keep images in a single row */
    justify-content: center; /* Center images horizontally */
    gap: 20px;
    margin: 30px auto; /* Center with auto margins */
    padding: 15px 5px;
    width: fit-content; /* Expand to fit content */
    overflow-x: visible; /* Remove scrollbar */
}

.container {
    padding-top: 10px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: visible; /* Allow content to expand beyond container */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
}

/* Style scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.image-gallery::-webkit-scrollbar {
    display: none;
}

.image-gallery::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.image-gallery::-webkit-scrollbar-thumb {
    background-color: #ff3366;
    border-radius: 4px;
}

.category-section {
    width: 100%; /* Take up full width of container */
    margin: 0 auto 60px auto; /* Center with bottom margin */
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children vertically */
}

.image-container {
    flex: 0 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    display: block;
    border-radius: 8px;
    height: 250px; /* Fixed height for consistency */
    width: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the whole image is visible */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* For very small screens */
@media (max-width: 480px) {
    .image-container img {
        height: 180px;
    }
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #f0f0f0;
    overflow-x: auto; /* Allow horizontal scrolling of entire page if needed */
}

.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background-color: #333;
    border-radius: 8px;
}

/* Rating Stars */
.rating {
    margin: 30px 0;
    text-align: center;
}

.stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-top: 10px;
}

.stars input {
    display: none;
}

.stars label {
    font-size: 40px;
    padding: 5px;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
    color: #ffcc00;
}

/* Submit Button */
.submit-container {
    text-align: center;
    margin: 40px 0;
}

.submit-btn {
    padding: 15px 40px;
    background-color: #ff3366;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.submit-btn:hover {
    background-color: #e61e4d;
    transform: translateY(-3px);
}

/* Results Page */
.results-container {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.total-score,
.average-score {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-weight: bold;
    font-size: 18px;
    color: #ff3366;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.next-btn,
.leaderboard-btn {
    flex: 1;
    display: inline-block;
    padding: 15px 20px;
    text-align: center;
    background-color: #444;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.next-btn:hover,
.leaderboard-btn:hover {
    background-color: #555;
}

.next-btn {
    background-color: #ff3366;
}

.next-btn:hover {
    background-color: #e61e4d;
}

/* Leaderboard Page */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px;
    text-align: left;
}

.leaderboard-table th {
    background-color: #ff3366;
    color: white;
}

.leaderboard-table tr:nth-child(even) {
    background-color: #333;
}

.leaderboard-link {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #ff3366;
    text-decoration: none;
    font-weight: bold;
}

.leaderboard-link:hover {
    text-decoration: underline;
}

.view-more-container {
    text-align: center;
    margin: 18px 0 12px;
    width: 100%;
}

.view-more-btn {
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    border: 1px solid #444;
}

.view-more-btn:hover {
    background-color: #444;
    border-color: #ff3366;
    color: #ff3366;
    transform: translateY(-2px);
}

.view-more-btn:active {
    transform: translateY(0);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #ff3366;
    text-align: center;
}

/* Add a special class for pornstar names */
.pornstar-name {
    font-size: 2.2rem;
    font-weight: bold;
    color: #ff3366;
    display: inline-block;
    margin: 0;
}

/* Make pornstar names larger in the leaderboard */
.leaderboard-table .pornstar-col {
    font-size: 1.4rem;
    font-weight: bold;
}

/* Enlarge pornstar names on the results page */
.results-header {
    text-align: center;
    margin-bottom: 25px;
}

.results-header .pornstar-name {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 10px;
}

.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 20px 0;
}

.subnav-link {
    padding: 8px 12px;
    background: #333;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #444;
    transition: background-color 0.2s;
}

.subnav-link:hover {
    background: #444;
}

.subnav-link.active {
    background: #ff3366;
    border-color: #ff3366;
    color: #fff;
}

h1 { font-size: clamp(1.6rem, 2vw + 1.1rem, 2.5rem); }
.pornstar-name { font-size: clamp(1.6rem, 2vw + 0.9rem, 2.8rem); }
.category-title { font-size: clamp(1.2rem, 1.5vw + 0.9rem, 2rem); }

/* Mobile/layout improvements */
@media (max-width: 768px) {
  .container { width: 100%; max-width: 100%; padding: 12px; }
  .navbar-container { width: 100%; padding: 0 12px; }
  .navbar-links { gap: 10px; flex-wrap: wrap; }

  /* Let the gray box use full width on phones and reduce padding */
  .category-section { width: 100%; min-width: 0; padding: 16px; margin: 0 0 24px; }

  /* Make GIF rows swipeable with snap, hide scrollbar visuals */
  .image-gallery {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .image-gallery::-webkit-scrollbar { display: none; }
  .image-container { scroll-snap-align: center; }
  .image-container img { height: 170px; } /* smaller images on phones */

  /* Touch-friendly controls */
  .stars label { font-size: 32px; padding: 8px; }
  .submit-btn { width: 100%; font-size: 16px; padding: 14px 18px; }

  /* Compact results/leaderboard text */
  .results-container, .leaderboard-table { font-size: 14px; }
  .leaderboard-table th, .leaderboard-table td { padding: 10px; }
  .subnav { gap: 6px; }
}

/* Prevent stray horizontal overflow on narrow screens */
@media (max-width: 768px) {
  body { overflow-x: hidden; }
}

/* Allow horizontal scroll on very narrow screens for tables */
@media (max-width: 600px) {
  .leaderboard-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 768px) {
  .category-section {
    width: 100%;
    min-width: 0;
    padding: 16px;
    margin-bottom: 24px;
  }

  .image-gallery {
    width: 100%;
    flex-direction: column;   /* stack vertically */
    flex-wrap: nowrap;
    align-items: center;      /* center each image */
    justify-content: flex-start;
    gap: 12px;
    overflow-x: visible;      /* no horizontal scroll */
    margin: 16px 0;
    padding: 0;
  }

  .image-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .image-container img {
    max-width: 100%;          /* fit within screen width */
    height: auto;             /* keep aspect ratio */
  }
}

.leaderboard-table .pornstar-col {
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: bold;
    line-height: 1.2;
}

@media (max-width: 768px) {
  .leaderboard-table .pornstar-col {
    font-size: 0.95rem;
  }
}

.navbar-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.navbar-links a {
  display: inline-flex;
  white-space: nowrap;
}

/* Mobile: don't wrap, tighten spacing */
@media (max-width: 768px) {
  .navbar-links { flex-wrap: nowrap; gap: 12px; }
  .navbar-links a { font-size: 0.95rem; padding: 8px 10px; }
}

@media (max-width: 768px) {
  .navbar { padding: 10px 0; }

  .navbar-container { width: 100%; padding: 0 8px; }

  .navbar-logo {
    font-size: 1.05rem;     /* smaller text */
    line-height: 1.1;
    max-width: 45vw;        /* prevent pushing links to next line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate if needed */
  }

  .navbar-links a {
    font-size: 0.92rem;
    padding: 6px 8px;
  }
}
// ...existing code...
```// filepath: a:\scripts\pornLeaderboard\static\style.css
// ...existing code...

/* Mobile: smaller logo/home button so navbar fits */
@media (max-width: 768px) {
  .navbar { padding: 10px 0; }

  .navbar-container { width: 100%; padding: 0 8px; }

  .navbar-logo {
    font-size: 1.05rem;     /* smaller text */
    line-height: 1.1;
    max-width: 45vw;        /* prevent pushing links to next line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate if needed */
  }

  .navbar-links a {
    font-size: 0.92rem;
    padding: 6px 8px;
  }
}

.rating-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.rating-buttons input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-btn {
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 8px;
  background: #333;
  color: #fff;
  border: 1px solid #444;
  transition: background-color 0.15s, transform 0.05s, border-color 0.15s;
  user-select: none;
  font-size: 1.05rem;
}

.rating-btn:active {
  transform: translateY(1px);
}

.rating-btn:hover,
.rating-btn:focus-visible {
  background: #2e2e2e;
  border-color: #ff3366;
  color: #ff3366; /* match navbar logo pink */
}

.rating-buttons input[type="radio"]:checked + .rating-btn {
  background: #ff3366;
  border-color: #ff3366;
  color: #fff;
}

@media (max-width: 768px) {
  .rating-btn {
    padding: 11px 14px;
    font-size: 1rem;
  }
}

.ratings-col .short-text {
    display: none;
}

/* On mobile, swap the text */
@media (max-width: 768px) {
    .ratings-col .full-text {
        display: none;
    }
    
    .ratings-col .short-text {
        display: inline;
    }
}