/**
 * Pinball Monthly Score Challenge Site - Main Stylesheet
 * Mobile-first, QR code-friendly design
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #0b2d2b;
    padding: 1.25rem 0;
    margin-bottom: 0;
}

.header-logo-link {
    display: block;
    text-align: center;
    line-height: 0;
}

.header-logo {
    max-height: 110px;
    width: auto;
    display: inline-block;
}

@media (max-width: 768px) {
    .header-logo {
        max-height: 80px;
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding-bottom: 2rem;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #1a6b68;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

.button:hover {
    background-color: #125250;
}

.button-primary {
    background-color: #27ae60;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    font-weight: bold;
}

.button-primary:hover {
    background-color: #229954;
}

.button-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms */
.submit-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #0b2d2b;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00c5d4;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Collapsible submit form (home + standalone submit page) */
.submit-score-section h2 {
    cursor: default;
}

.submit-score-section h2:hover {
    color: inherit;
}

.submit-section-intro {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #555;
    line-height: 1.5;
}

.submit-score-reveal {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.submit-form-panel[hidden] {
    display: none !important;
}

.submit-form-panel:not([hidden]) {
    margin-top: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

/* Scores Grid */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.score-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.score-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.score-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.score-info {
    padding: 1rem;
}

.score-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #0b2d2b;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.player-name {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.score-date {
    color: #95a5a6;
    font-size: 0.85rem;
}

.score-photo-preview {
    border-top: 1px solid #ecf0f1;
    padding: 0.5rem;
}

.score-photo-preview a {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #00c5d4;
}

.score-photo-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

/* Filter */
.machine-filter {
    margin-bottom: 1.5rem;
}

.machine-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.machine-filter select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 400px;
}

.filter-info {
    background: #e0f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    background-color: #0b2d2b;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e74c3c;
}

.error-page p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.25rem;
    }
    
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .submit-form {
        padding: 1.5rem;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .button-primary {
        width: 100%;
    }
}

/* QR Code Optimization */
@media (max-width: 480px) {
    .button {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}


.page-section {
    margin-bottom: 4rem;
    scroll-margin-top: 80px;
}
.page-section h2 {
    border-bottom: 3px solid #00c5d4;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.page-section h2:hover {
    color: #00c5d4;
}

.page-section h2 .collapse-icon {
    font-size: 0.8em;
    transition: transform 0.3s;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.collapsible-content {
    overflow: hidden;
}
.quick-nav {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    margin-bottom: 2rem;
    margin-top: 0;
}

/* header margin already set above */

.quick-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 0.25rem .5rem .5rem .75rem;
    background: #1a6b68;
    border-radius: 4px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    min-width: 45px;
    transition: all 0.3s;
    margin-bottom: 0;
}

.hamburger-menu .hamburger-icon {
    display: block;
}

.hamburger-menu .close-icon {
    display: none;
}

.hamburger-menu.active {
    margin-top: 0.5rem;
    padding: 0.4rem .5rem .5rem 0.8rem;
}

.hamburger-menu.active .hamburger-icon {
    display: none;
}

.hamburger-menu.active .close-icon {
    display: block;
}

.hamburger-menu span {
    display: none;
}

.quick-nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.quick-nav li {
    margin: 0;
}

.quick-nav a {
    color: white;
    background-color: #1a6b68;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(26, 107, 104, 0.3);
}

.quick-nav a:hover {
    background-color: #125250;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 107, 104, 0.4);
}

.quick-nav a:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .quick-nav-header {
        flex-direction: column;
        align-items: center;
    }
    
    .hamburger-menu {
        display: flex;
        align-self: center;
    }
    
    .quick-nav ul {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .quick-nav ul.menu-open {
        display: flex;
    }
    
    .quick-nav a {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
}

/* Current High Scores Styles */
.leaderboard-section,
.by-machine-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.leaderboard-section h3,
.by-machine-section h3 {
    margin-bottom: 1.5rem;
    color: #0b2d2b;
}

.top-three {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border-color: #c0c0c0;
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a85c 100%);
    border-color: #cd7f32;
}

.rank {
    font-size: 2rem;
    font-weight: bold;
    color: #0b2d2b;
    min-width: 60px;
    text-align: center;
}

.score-details {
    flex: 1;
}

.machine-name {
    font-size: 1.00rem;
    font-weight: bold;
    color: #0b2d2b;
    margin-bottom: 0.5rem;
}

.rest-of-leaderboard {
    display: grid;
    gap: 1rem;
}

.machine-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.machine-score-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    padding: 1rem;
}

.machine-info {
    padding: 0;
}

.machine-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #0b2d2b;
}

/* Machine Rankings Table Styles */
.machine-rankings-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.machine-rankings-section h3 {
    margin-bottom: 1rem;
    color: #0b2d2b;
}

.machine-rankings-section > p {
    margin-bottom: 2rem;
    color: #7f8c8d;
}

.machine-ranking-table-container {
    margin-bottom: 3rem;
}

.machine-ranking-table-container:last-child {
    margin-bottom: 0;
}

.machine-ranking-table-container h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0b2d2b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00c5d4;
}

.machine-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    table-layout: fixed;
}

.machine-ranking-table thead {
    background: #f8f9fa;
}

.machine-ranking-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
    color: #0b2d2b;
    border-bottom: 2px solid #ddd;
}

.machine-ranking-table th:nth-child(1) {
    width: 10%;
}

.machine-ranking-table th:nth-child(2) {
    width: 40%;
}

.machine-ranking-table th:nth-child(3) {
    width: 25%;
}

.machine-ranking-table th:nth-child(4) {
    width: 25%;
}

.machine-ranking-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machine-ranking-table tbody tr:hover {
    background: #f8f9fa;
}

.machine-ranking-table tbody tr.clickable-score-row:hover {
    background: #e0f9fa;
    cursor: pointer;
}

.machine-ranking-table tbody tr.top-score {
    background: #e8f5e9;
    font-weight: bold;
}

.machine-ranking-table tbody tr.top-score .rank-cell {
    color: #27ae60;
}

.rank-cell {
    font-weight: bold;
    text-align: center;
}

.player-cell {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-cell {
    font-weight: bold;
    color: #27ae60;
    text-align: left;
}

.date-cell {
    color: #7f8c8d;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .machine-ranking-table {
        font-size: 0.9rem;
    }
    
    .machine-ranking-table th,
    .machine-ranking-table td {
        padding: 0.5rem;
    }
    
    .machine-ranking-table th:nth-child(1),
    .machine-ranking-table td:nth-child(1) {
        width: 15%;
    }
    
    .machine-ranking-table th:nth-child(2),
    .machine-ranking-table td:nth-child(2) {
        width: 35%;
    }
    
    .machine-ranking-table th:nth-child(3),
    .machine-ranking-table td:nth-child(3) {
        width: 25%;
    }
    
    .machine-ranking-table th:nth-child(4),
    .machine-ranking-table td:nth-child(4) {
        width: 25%;
    }
}

@media (max-width: 600px) {
    .machine-ranking-table th:nth-child(4),
    .machine-ranking-table td:nth-child(4) {
        display: none;
    }
    
    .machine-ranking-table th:nth-child(1),
    .machine-ranking-table td:nth-child(1) {
        width: 15%;
    }
    
    .machine-ranking-table th:nth-child(2),
    .machine-ranking-table td:nth-child(2) {
        width: 30%;
    }
    
    .machine-ranking-table th:nth-child(3),
    .machine-ranking-table td:nth-child(3) {
        width: 35%;
    }
}

/* Previous Winners Styles */
.previous-winners-month-container {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.previous-winners-month-container:last-child {
    margin-bottom: 0;
}

.previous-winners-month-container h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0b2d2b;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00c5d4;
}

.previous-winners-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.previous-winners-table thead {
    background: #f8f9fa;
}

.previous-winners-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
    color: #0b2d2b;
    border-bottom: 2px solid #ddd;
}

.previous-winners-table th:nth-child(1) {
    width: 40%;
}

.previous-winners-table th:nth-child(2) {
    width: 35%;
}

.previous-winners-table th:nth-child(3) {
    width: 25%;
}

.previous-winners-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.previous-winners-table tbody tr:hover {
    background: #f8f9fa;
}

.previous-winners-table tbody tr.clickable-score-row:hover {
    background: #e0f9fa;
    cursor: pointer;
}

.previous-winners-table .machine-cell {
    font-weight: 500;
}

.previous-winners-table .player-cell {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.previous-winners-table .score-cell {
    font-weight: bold;
    color: #27ae60;
    text-align: left;
}

@media (max-width: 768px) {
    .previous-winners-month-container {
        padding: 1.5rem;
    }
    
    .previous-winners-table {
        font-size: 0.9rem;
    }
    
    .previous-winners-table th,
    .previous-winners-table td {
        padding: 0.5rem;
    }
}

/* Events Styles */
.events-list {
    display: grid;
    gap: 1.5rem;
}

.event-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-date {
    background: #1a6b68;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.date-day {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.date-month {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.event-details {
    flex: 1;
}

.event-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.event-details strong {
    color: #0b2d2b;
}

.event-time,
.event-location {
    margin-bottom: 0.5rem;
    color: #7f8c8d;
}

.event-description {
    margin-top: 1rem;
    /* color: #555; */
    line-height: 1.6;
    color: #7f8c8d;
}

/* QR Code Styles */
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qr-code-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .page-section {
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rank {
        min-width: auto;
    }
    
    .machine-scores-grid {
        grid-template-columns: 1fr;
    }
    
    .events-list {
        gap: 1rem;
        padding: 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .event-card {
        flex-direction: column;
        padding: 0.75rem 1rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .event-details {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        padding-right: 0;
    }
    
    .event-details h3 {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding-right: 0;
    }
    
    .event-time,
    .event-location,
    .event-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding-right: 0;
    }
    
    .event-date {
        min-width: auto;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .date-day {
        font-size: 1.5rem;
    }
}

/* Machine Radio Group Styles */
.machine-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    background-color: #f8f9fa;
    border-color: #00c5d4;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: bold;
    color: #00c5d4;
}

.radio-option:has(input[type="radio"]:checked) {
    background-color: #e0f9fa;
    border-color: #00c5d4;
}

/* Submit Description Styles */
.submit-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    color: #555;
}

/* Challenge Schedule Styles */
.challenge-schedule-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.challenge-schedule-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-month {
    font-size: 1.25rem;
    color: #0b2d2b;
    margin-bottom: 0.5rem;
}

.schedule-machines {
    color: #7f8c8d;
}

.schedule-machine-item {
    margin-bottom: 0.5rem;
}

.schedule-machine-item:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .challenge-schedule-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .schedule-month {
        margin-bottom: 0;
        min-width: 150px;
        flex-shrink: 0;
    }
    
    .schedule-machines {
        flex: 1;
    }
}

/* Score Details Modal Styles */
#score-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

#score-details-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.score-card-modal {
    padding: 2rem;
}

.score-card-modal .score-info {
    margin-bottom: 1.5rem;
}

.score-card-modal .score-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #0b2d2b;
}

.score-card-modal .score-value {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.score-card-modal .player-name {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.score-card-modal .score-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.score-card-modal .score-comments {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #00c5d4;
}

.score-card-modal .score-comments strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #0b2d2b;
    font-size: 0.95rem;
}

.score-card-modal .score-comments p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.score-card-modal .score-photo-preview {
    margin-top: 1.5rem;
}

.score-card-modal .score-photo-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.score-card-modal .score-photo-preview a {
    display: block;
    text-align: center;
    color: #00c5d4;
    text-decoration: none;
    margin-top: 0.5rem;
}

.score-card-modal .score-photo-preview a:hover {
    text-decoration: underline;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s, transform 0.2s;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    #score-details-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .score-card-modal {
        padding: 1.5rem;
    }
}

/* Pinball Map Locations */
.locations-attribution {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.locations-attribution a {
    color: #00c5d4;
    text-decoration: none;
}

.locations-attribution a:hover {
    text-decoration: underline;
}

.pinball-location {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.pinball-location-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.pinball-location-header h3 {
    font-size: 1.1rem;
    color: #0b2d2b;
    margin: 0;
}

.pinball-location-header h3 a {
    color: #0b2d2b;
    text-decoration: none;
}

.pinball-location-header h3 a:hover {
    color: #00c5d4;
}

.machine-count-badge {
    background: #0b2d2b;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pinball-location-address {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
}

.machine-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.machine-list-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.machine-list-item:last-child {
    border-bottom: none;
}

.machine-name {
    font-weight: 300;
    color: #0b2d2b;
    text-decoration: none;
    flex-shrink: 0;
}

a.machine-name:hover {
    color: #00c5d4;
    text-decoration: underline;
}

.machine-meta {
    color: #95a5a6;
    font-size: 0.8rem;
}

/* Social Icons */
.socials-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

.social-link:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

.discord-icon,
.fb-icon,
.ig-icon {
    height: 100px;
    width: auto;
    display: block;
}

/** Monthly Challenge Styles */
.monthly-challenge-page {
    max-width: 1000px;
    margin: 0 auto;
}

.challenge-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #7f8c8d;
}

.leaderboard-section,
.by-machine-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.leaderboard-section h3,
.by-machine-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.top-three {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border-color: #c0c0c0;
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a85c 100%);
    border-color: #cd7f32;
}

.rank {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    min-width: 60px;
    text-align: center;
}

.score-details {
    flex: 1;
}

/* .machine-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
} */

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.25rem;
}

.player-name {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.rest-of-leaderboard {
    display: grid;
    gap: 1rem;
}

.machine-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.machine-score-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.machine-info {
    padding: 1rem;
}

.machine-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rank {
        min-width: auto;
    }
    
    .machine-scores-grid {
        grid-template-columns: 1fr;
    }
}