/* --- Main Table Styles (user_browse, admin_manage_people) --- */
.people-table,
.user-table {
    width: 100%;
    border-collapse: collapse;
}

.people-table th, .people-table td,
.user-table th, .user-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.people-table th,
.user-table th {
    background-color: #f4f4f4;
}

.deceased {
    background-color: #f0f0f0;
}

.new-person {
    background-color: #e6ffe6;
}

#user-db-people-table th.sortable {
    position: relative;
    user-select: none;
    padding-right: 18px;
}
#user-db-people-table th.sortable a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    width: 100%;
}
#user-db-people-table th.sortable::after {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    content: '\25B4';
    opacity: 0.35;
}
#user-db-people-table th.sortable[aria-sort="ascending"]::after { content: '\25B2'; opacity: 0.8; }
#user-db-people-table th.sortable[aria-sort="descending"]::after { content: '\25BC'; opacity: 0.8; }
#user-db-people-table { table-layout: auto; width: 100%; }


/* --- Control Bar & Pagination Styles --- */
.controls-bar {
    background-color: #ddd;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-controls label {
    margin-right: 0;
}
.filter-controls select,
.form-section select {
    width: auto;
    padding: 8px;
    margin-top: 0;
    box-sizing: border-box;
    font-family: inherit;
}

.dashboard-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.count-display {
    text-align: center;
    flex-grow: 1;
    color: #666;
}

.pagination-controls-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}
.pagination-links a,
.pagination-links span.disabled {
    font-size: 1em;
    font-weight: 600; /* BOLD */
    margin: 0 5px;
    color: #007bff;
}
.pagination-links span.disabled {
    color: #ccc;
    cursor: not-allowed;
}
.pagination-per-page {
    flex-shrink: 0;
}
.pagination-per-page label {
    margin-right: 5px;
}

/* --- User Browse Page Search Controls --- */
.browse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.browse-controls-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.browse-controls-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    max-width: 400px;
}

.search-input-container {
    position: relative;
    width: 100%;
}

.browse-search-input {
    width: 100%;
    padding: 8px 35px 8px 15px; /* Make room for the button */
    font-size: 1em;
    border: 1px solid #aaa;
    border-radius: 20px;
    box-sizing: border-box;
}

.search-radio-group {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
}

.search-radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.browse-controls-right {
    display: flex;
    align-items: center;
}

.controls-bar .count-display {
    flex-grow: 0; /* prevent it from taking extra space */
    text-align: left;
    font-weight: 600; /* BOLD */
}

/* --- Landing Page Styles --- */
body.landing-page {
    background-color: black;
    color: #efe8dd; /* Set default text color for the page */
}

@keyframes pulse-text {
    0% { color: #efe8dd; }
    50% { color: #555; }
    100% { color: #efe8dd; }
}

.pulsing-link {
    color: inherit;
    text-decoration: none;
    animation: pulse-text 3s infinite;
}

.landing-text {
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: 600; /* BOLD */
}

.info-section {
    padding: 2rem 0;
    line-height: 1.6;
    max-width: 800px;
}

.info-section h2, .info-section h3 {
    color: #efe8dd; /* Make headers match body text color */
    font-weight: 600; /* BOLD */
    margin-top: 0;
}

.info-section h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-section p {
    font-size: 1.1rem;
    color: #c9c3b8;
    margin-top: 0;
}

.intro-text, .outro-text {
    margin-bottom: 4rem;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Reduced gap */
    margin-bottom: 4rem;
}

.info-image-container {
    flex: 0 0 150px; /* Give image a fixed width */
    text-align: center;
}

.info-image {
    max-width: 150px; /* Control image size */
    height: auto;
}

.info-text {
    flex: 1; /* Allow text to take remaining space */
}

.golden-glow-text {
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.7), 0 0 12px rgba(255, 165, 0, 0.5);
}

.golden-glow-image {
    filter: drop-shadow(0 0 48px rgba(255, 215, 0, 1.0));
}

.outro-text p:last-of-type {
    font-size: 1.3rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .info-section {
        text-align: center;
    }
    .info-block {
        flex-direction: column;
    }
}

/* --- Static Page Styles (About, History, etc.) --- */
.standard-page-content {
    background-color: #f9f9f9;
    padding: 20px 40px 40px 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 300;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.page-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.standard-page-content p, .standard-page-content li {
    line-height: 1.7;
    color: #333;
}

.standard-page-content ul {
    list-style-position: inside;
    padding-left: 20px;
}

.contact-email {
    text-align: center;
    margin-top: 30px;
}

.contact-email a {
    color: #007bff;
    font-size: 1.2em;
    text-decoration: none;
    border-bottom: 1px dotted #007bff;
    padding-bottom: 2px;
}
.contact-email a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.history-intro {
    font-style: italic;
    color: #555;
    border-left: 3px solid #ccc;
    padding-left: 20px;
    margin-bottom: 40px;
}

.history-timeline dt {
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
    margin-top: 20px;
}
.history-timeline dd {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* --- User Profile Page Styles --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar-main {
    width: 200px;
    height: 200px;
    border-radius: 0;
    object-fit: cover;
    border: 2px solid #444444;
    flex-shrink: 0; /* Prevents avatar from shrinking */
}

.profile-header-info h1 {
    margin: 0 0 10px 0;
    font-size: 6em; /* Increased font size */
}
.profile-location {
    color: #555;
    margin: 0 0 15px 0;
    font-size: 1.2em; /* Increased font size */

}

.profile-quote {
    font-style: italic;
    font-size: 2em;
    color: #333;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 5px solid #ccc;
    margin: 30px 0;
}

.profile-section {
    margin-top: 40px;
}

.picks-history-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.history-month-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    background-color: #fdfdfd;
    width: 215px;
    box-sizing: border-box;
}

.history-month-block h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.hit-points {
    font-weight: 700;
    color: #2e8b57;
}

.picks-history-list {
    list-style-type: decimal;
    padding-left: 25px;
}
.picks-history-list li {
    padding: 5px 0;
}
.picks-history-list li.hit {
    font-weight: 700;
}

/* --- Account Page Styles --- */
.account-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

/* --- Admin Email Preview Page Styles --- */
.content-container-wide {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
}

.scrollable-list-box {
    height: 250px; /* Roughly 10 lines */
    overflow-y: auto;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.scrollable-list-box ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.scrollable-list-box li {
    padding: 4px 0;
}

.email-preview-box {
    height: 500px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* --- Monthly Results Page Styles --- */
.results-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}
.results-title-bar .nav-link {
    font-size: 1.2em;
    font-weight: 600;
}
.results-title-bar .page-title-main {
    font-size: 2em;
    font-weight: 700;
    text-align: center;
}
.results-widgets-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.results-widgets-row .widget-box {
    width: calc(50% - 10px);
    padding: 0; /* Remove padding for sticky header to work edge-to-edge */
}

.results-top-picks-widget {
    max-height: 200px; /* Approx 5 rows + header padding */
}

.results-widgets-row .top-picks-table {
    table-layout: fixed;
    width: 100%;
}

.results-widgets-row .top-picks-table td:first-child {
    width: auto;
}

/* --- Monthly Results Page - User Cards --- */
.user-score-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    border-top: 2px solid #333;
    padding-top: 20px;
}

.user-score-card {
    display: flex;
    gap: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fdfdfd;
    width: calc(33.333% - 14px); /* 3 cards per row, accounting for gap */
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-score-card .card-left {
    flex: 0 0 100px; /* Fixed width for the left column */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-score-card .card-left a {
    text-decoration: none;
    color: inherit;
    display: block; /* Make the whole area clickable */
}

.user-score-card .card-left a:hover .card-username {
    text-decoration: underline;
}

.user-score-card .card-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
}

.user-score-card .card-username {
    font-weight: 600; /* BOLD */
    display: block;
    margin-bottom: 10px;
    word-break: break-all; /* Prevents long usernames from breaking layout */
}

.user-score-card .card-right {
    flex: 1;
    min-width: 0; /* Flexbox fix for long content */
}

.user-score-card .card-picks-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.user-score-card .card-picks-list li {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments for cards */
@media (max-width: 960px) {
    .user-score-card {
        width: calc(50% - 10px); /* 2 cards per row */
    }
}

@media (max-width: 600px) {
    .user-score-card {
        width: 100%; /* 1 card per row */
    }
}