.pinball-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
}

.pinball-button {
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    min-width: 150px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pinball-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.pinball-button:hover:before {
    left: 100%;
}

.pinball-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
    text-decoration: none;
    color: white;
}

.pinball-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(238, 90, 36, 0.4);
}

.pinball-button.score {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.pinball-button.score:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.pinball-button.issue {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.pinball-button.issue:hover {
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6);
}

.pinball-button.pintips {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.4);
}

.pinball-button.pintips:hover {
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.6);
}

/* Pingolf Scores Block Styles */
.pingolf-scores-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: white;
}

.pingolf-scores-title {
    color: white !important;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pingolf-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pingolf-score-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pingolf-score-label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    opacity: 0.9;
}

.pingolf-score-value {
    font-size: 18px;
    font-weight: bold;
    display: block;
}

/* Pingolf Score Formatting */
.pingolf-score-value .score-number {
    color: #4ade80;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pingolf-score-value .score-tbd {
    color: #fbbf24;
    font-weight: 600;
    font-style: italic;
    opacity: 0.9;
}

.pingolf-score-value .score-text {
    color: #e5e7eb;
    font-weight: 500;
}

/* Machine Information Block Styles */
.machine-info-container {
    background: linear-gradient(135deg, rgb(43, 12, 63) 0%, rgb(65, 20, 95) 50%, rgb(85, 30, 120) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(43, 12, 63, 0.4);
    color: white;
    border: 2px solid #fbbf24;
}

.machine-info-title {
    color: white !important;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.machine-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.machine-info-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.machine-info-label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    opacity: 0.9;
}

.machine-info-value {
    font-size: 16px;
    font-weight: 500;
    display: block;
}

/* Price styling */
.machine-info-value.machine-price {
    color: #4ade80;
    font-weight: bold;
    font-size: 18px;
}

/* Status-specific styling */
.machine-info-value.status-working {
    color: #4ade80;
    font-weight: bold;
}

.machine-info-value.status-repairs-in-progress {
    color: #fbbf24;
    font-weight: bold;
}

.machine-info-value.status-out-of-order {
    color: #f87171;
    font-weight: bold;
}

/* Permission styling */
.machine-info-value.permission-allowed {
    color: #4ade80;
}

.machine-info-value.permission-not-allowed {
    color: #f87171;
}

/* Game Setup Block Styles */
.game-setup-container {
    background: linear-gradient(135deg, #4A1A5C 0%, #6B2275 50%, #8B2F8E 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(74, 26, 92, 0.6);
    color: white;
    border: 2px solid #fbbf24;
}

.game-setup-title {
    color: white !important;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.game-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.game-setup-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-setup-label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    opacity: 0.9;
}

.game-setup-value {
    font-size: 16px;
    font-weight: 500;
    display: block;
}

.custom-settings-section {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 16px;
    margin-top: 16px;
}

.custom-settings-title {
    color: white !important;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: bold;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.custom-settings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-setting-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-left: 4px solid #fbbf24;
    font-size: 14px;
    line-height: 1.4;
}

.custom-setting-item strong {
    color: #fbbf24;
}

/* Open Issues Block Styles */
.open-issues-container {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
    color: white;
    border: 2px solid #fbbf24;
}

.open-issues-title {
    color: white !important;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.open-issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.open-issue-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.open-issue-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.open-issue-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.open-issue-date {
    font-size: 13px;
    font-weight: 500;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.open-issue-priority {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.priority-high {
    background-color: #f87171;
    color: white;
}

.priority-medium {
    background-color: #fbbf24;
    color: white;
}

.priority-low {
    background-color: #4ade80;
    color: white;
}

.open-issue-content {
    margin-top: 8px;
}

.open-issue-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #f3f4f6;
    padding: 8px 0;
}

/* Mobile responsive improvements for issues */
@media (max-width: 768px) {
    .open-issue-header {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 8px;
    }
    
    .open-issue-date {
        font-size: 12px;
        order: 2;
    }
    
    .open-issue-priority {
        order: 1;
        align-self: flex-end;
    }
    
    .open-issue-description {
        font-size: 13px;
    }
}

.open-issues-setup {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.open-issues-setup p {
    margin: 0 0 12px 0;
}

.open-issues-setup ol {
    text-align: left;
    display: inline-block;
    margin: 8px 0;
    padding-left: 20px;
}

.open-issues-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.open-issues-error p {
    margin: 0 0 8px 0;
}

.no-open-issues {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.no-open-issues p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Open Issues Preview Styling (Block Editor) */
.open-issues-preview {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.8) 0%, rgba(59, 130, 246, 0.8) 50%, rgba(96, 165, 250, 0.8) 100%);
    color: white;
}

.open-issues-preview .open-issues-setup {
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    border-color: #d1d5db;
}

/* Responsive design for Open Issues */
@media (max-width: 768px) {
    .open-issue-header {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 6px;
    }
    
    .open-issue-priority {
        align-self: flex-start;
    }
}

.iscored-scores-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: white;
}

.iscored-scores-title {
    color: white !important;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.iscored-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.iscored-score-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Matchplay Events Styles */
.matchplay-events-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.matchplay-events-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.matchplay-event-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.matchplay-event-type {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.matchplay-event-id {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    font-family: monospace;
}

.matchplay-events-table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.matchplay-events-table {
    width: 100%;
    min-width: 600px; /* Ensure minimum width for readability */
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    color: #333;
    table-layout: auto; /* Allow flexible column sizing */
}

.matchplay-events-table th {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matchplay-events-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

/* Alternate row colors like Matchplay */
.matchplay-events-table tr:nth-child(odd) {
    background: #ffffff;
}

.matchplay-events-table tr:nth-child(even) {
    background: #f8f9fa;
}

.matchplay-events-table tr:hover {
    background: #e3f2fd !important;
}

/* Position column styling */
.matchplay-events-table td:first-child {
    text-align: center;
    font-weight: bold;
    color: #495057;
    width: 50px;
}

/* Player name column */
.matchplay-events-table td:nth-child(2) {
    text-align: left;
    font-weight: 500;
    min-width: 150px;
}

/* Score/points columns */
.matchplay-events-table td:not(:nth-child(1)):not(:nth-child(2)) {
    text-align: center;
    font-family: monospace;
    font-size: 13px;
}

/* Result column (adjusted points in series) */
.matchplay-events-table td:nth-child(3) {
    background: rgba(34, 197, 94, 0.1) !important;
    font-weight: bold;
    color: #059669;
}

/* Total column styling */
.matchplay-events-table td:last-child {
    font-weight: bold;
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb;
}

/* Special row highlighting for finalists cutoff */
.matchplay-events-table .finals-cutoff {
    background: #ef4444 !important;
    color: white;
    text-align: center;
    font-weight: bold;
}

.matchplay-events-table .finals-cutoff td {
    background: transparent !important;
    color: white;
    padding: 8px;
}

/* Player row highlighting (you could add classes for specific players) */
.matchplay-events-table .highlighted-player {
    background: rgba(251, 191, 36, 0.2) !important;
}

.matchplay-events-table .qualified-player td:first-child {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
}

.matchplay-events-table .eliminated-player td:first-child {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.matchplay-events-footer {
    margin-top: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 6px;
}

/* Responsive table handling */
@media (max-width: 768px) {
    .matchplay-events-table {
        min-width: 500px; /* Smaller minimum width on mobile */
        font-size: 12px;
    }
    
    .matchplay-events-table th,
    .matchplay-events-table td {
        padding: 8px 6px; /* Reduced padding on mobile */
    }
    
    .matchplay-events-container {
        padding: 15px; /* Reduced container padding on mobile */
    }
}

@media (max-width: 480px) {
    .matchplay-events-table {
        min-width: 400px; /* Even smaller minimum width on very small screens */
        font-size: 11px;
    }
    
    .matchplay-events-table th,
    .matchplay-events-table td {
        padding: 6px 4px; /* Further reduced padding */
    }
    
    .matchplay-events-container {
        padding: 10px; /* Minimal container padding on small screens */
        margin: 10px 0; /* Reduced margins */
    }
}

.matchplay-events-error {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.matchplay-events-error p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

.matchplay-events-empty {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.matchplay-events-empty p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Block Editor Preview Styles */
.matchplay-events-preview {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.matchplay-events-preview .matchplay-events-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-align: center;
}

.matchplay-events-preview .matchplay-event-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.matchplay-events-preview .matchplay-event-type {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.matchplay-events-preview .matchplay-event-id {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    font-family: monospace;
}

/* Responsive design for Matchplay Events */
@media (max-width: 768px) {
    .matchplay-events-container {
        padding: 15px;
    }
    
    .matchplay-event-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .matchplay-events-table th,
    .matchplay-events-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .matchplay-events-table {
        font-size: 12px;
    }
}

/* Tournament column styling for series standings */
.matchplay-events-table th a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.matchplay-events-table th a:hover {
    color: #007cba;
    text-decoration: underline;
}

/* Make tournament columns more compact */
.matchplay-events-table th:not(:nth-child(1)):not(:nth-child(2)) {
    min-width: 60px;
    font-size: 12px;
    padding: 8px 4px;
    white-space: nowrap;
}

/* Tournament score cells in data rows */
.matchplay-events-table td:not(:nth-child(1)):not(:nth-child(2)) {
    font-size: 11px;
    padding: 6px 4px;
    text-align: center;
}

/* Responsive tournament columns - allow horizontal scrolling for many tournaments */
@media (max-width: 768px) {
    .matchplay-events-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .matchplay-events-table {
        min-width: 100%;
        width: auto;
    }
    
    /* Keep position and player columns visible */
    .matchplay-events-table th:nth-child(1),
    .matchplay-events-table th:nth-child(2),
    .matchplay-events-table td:nth-child(1),
    .matchplay-events-table td:nth-child(2) {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 2;
    }
    
    .matchplay-events-table th:nth-child(1),
    .matchplay-events-table td:nth-child(1) {
        left: 0;
    }
    
    .matchplay-events-table th:nth-child(2),
    .matchplay-events-table td:nth-child(2) {
        left: 40px; /* Adjust based on position column width */
    }
}

/* Responsive behavior for series with many tournaments */
@media (max-width: 768px) {
    .matchplay-events-table {
        font-size: 12px;
        min-width: 100%;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .matchplay-events-table thead,
    .matchplay-events-table tbody,
    .matchplay-events-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .matchplay-events-table th,
    .matchplay-events-table td {
        padding: 6px 3px;
    }
    
    .matchplay-events-table th:nth-child(1),
    .matchplay-events-table td:nth-child(1) {
        width: 40px; /* Position */
    }
    
    .matchplay-events-table th:nth-child(2),
    .matchplay-events-table td:nth-child(2) {
        width: 120px; /* Player name */
        text-align: left;
    }
    
    .matchplay-events-table th:not(:nth-child(1)):not(:nth-child(2)),
    .matchplay-events-table td:not(:nth-child(1)):not(:nth-child(2)) {
        width: 50px; /* Tournament columns and totals */
        text-align: center;
    }
}

/* Add horizontal scroll indicator for wide tables */
.matchplay-events-container {
    position: relative;
}

@media (max-width: 768px) {
    .pinball-buttons-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pinball-button {
        width: 100%;
        margin-bottom: 8px;
    }

    .pingolf-scores-grid,
    .iscored-scores-grid,
    .machine-info-grid,
    .game-setup-grid {
        grid-template-columns: 1fr;
    }
}

