/* Shared CSS styles for Match Manager pages */
/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
}

/* Home button */
.home-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s;
    z-index: 1000;
}

.home-button:hover {
    background: #2980b9;
}

/* Header styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 500;
}

.header p {
    margin: 10px 0 0 0;
    opacity: 0.8;
    font-size: 1.1em;
}

/* Navigation */
nav {
    background-color: #34495e;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #2980b9;
}

/* Layout containers */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Section styles */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 400;
}

.section h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 500;
}

/* Card layouts */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.card-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Button styles */
.btn {
    display: inline-block;
    background: #27ae60;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #229954;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.action-btn {
    display: inline-block;
    background: #27ae60;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
}

.action-btn:hover {
    background: #229954;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Match cards and grids */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.match-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.match-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.match-club {
    color: #27ae60;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.match-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    font-size: 0.85em;
    color: #666;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
}

.time-slots {
    margin-bottom: 15px;
}

.time-slot {
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.8em;
    color: #495057;
    border-left: 3px solid #3498db;
}

.match-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.75em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-actions {
    text-align: center;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-upcoming {
    background: #fff3cd;
    color: #856404;
}

.status-finalized {
    background: #d4edda;
    color: #155724;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-beta {
    background: #fff3cd;
    color: #856404;
}

.finalized-indicator {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 8px;
}

/* Special match states */
.finalized-match {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.finalized-match .match-title {
    color: #155724;
}

.finalized-slot {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.btn-finalized {
    background: #28a745;
}

.btn-finalized:hover {
    background: #218838;
}

.subscription-closed {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 0.85em;
    color: #856404;
}

.subscription-closed strong {
    color: #d68910;
}

/* Unconfirmed match styles */
.match-card.unconfirmed {
    opacity: 0.6;
    background: #f8f9fa;
    border-color: #adb5bd;
    cursor: not-allowed;
}

.match-card.unconfirmed:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.match-card.unconfirmed .match-title,
.match-card.unconfirmed .match-club,
.match-card.unconfirmed .detail-item {
    color: #6c757d;
}

.match-card.unconfirmed .status-badge {
    background: #e9ecef;
    color: #6c757d;
}

.match-card.unconfirmed .time-slot {
    background: #e9ecef;
    border-left-color: #adb5bd;
    color: #6c757d;
}

.match-card.unconfirmed .btn {
    background: #adb5bd;
    cursor: not-allowed;
}

.match-card.unconfirmed .btn:hover {
    background: #adb5bd;
}

/* Filter styles */
.filter-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9em;
}

.filter-group select,
.filter-group input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.match-count {
    font-size: 0.9em;
    color: #666;
    margin-left: auto;
}

/* No matches state */
.no-matches {
    text-align: center;
    color: #666;
    padding: 60px 20px;
}

.no-matches h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.modal-footer button {
    margin-left: 10px;
}

/* Info grids and sections */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.info-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

.value {
    font-family: monospace;
    background: white;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #ddd;
    word-break: break-all;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    color: #856404;
}

.warning-box strong {
    color: #d68910;
}

.url-section {
    margin: 20px 0;
}

.url-item {
    margin: 10px 0;
}

.url-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.url-value {
    font-family: monospace;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    word-break: break-all;
    color: #3498db;
}

/* Match management specific styles */
.match-section {
    margin-bottom: 30px;
}

.time-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slot-info {
    font-weight: 600;
    color: #2c3e50;
}

.slot-count {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.slot-count.full {
    background: #d4edda;
    color: #155724;
}

.slot-count.over {
    background: #f8d7da;
    color: #721c24;
}

.player-list {
    margin-top: 15px;
}

.player-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #3498db;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.player-details {
    font-size: 0.9em;
    color: #666;
}

.player-detail {
    margin-bottom: 4px;
}

.player-notes {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

.slot-participants {
    margin-top: 8px;
    padding: 6px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    font-size: 0.85em;
}

/* Form fieldsets */
fieldset {
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8f9ff;
}

legend {
    font-weight: bold;
    color: #3498db;
    padding: 0 10px;
    font-size: 16px;
}

/* Action buttons container */
.action-buttons {
    text-align: center;
    margin-top: 30px;
}

/* Responsive design */
@media (max-width: 768px) {
    /* Mobile-first adjustments */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        line-height: 1.5;
    }

    .home-button {
        position: fixed;
        top: 10px;
        right: 10px;
        padding: 12px 16px;
        font-size: 16px;
        z-index: 1001;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .header {
        padding: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
    }

    .header p {
        font-size: 1em;
        margin: 0;
    }

    .container, .content {
        margin: 10px auto;
        padding: 0 15px;
    }

    .section {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .section h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    /* Mobile-optimized card grids */
    .card-grid, .match-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }

    .match-card {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .match-card:hover {
        transform: none; /* Disable hover effects on touch devices */
    }

    .match-title {
        font-size: 1.2em;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .match-club {
        font-size: 0.9em;
        margin-bottom: 12px;
    }

    /* Mobile-optimized match details */
    .match-details {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }

    .detail-item {
        font-size: 0.85em;
        padding: 6px 8px;
        background: #f8f9fa;
        border-radius: 4px;
    }

    /* Mobile-optimized time slots */
    .time-slots {
        margin-bottom: 12px;
    }

    .time-slot {
        padding: 8px 12px;
        margin-bottom: 6px;
        font-size: 0.85em;
        border-radius: 6px;
    }

    /* Mobile-optimized stats */
    .match-stats {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
        align-items: stretch;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background: #f8f9fa;
        border-radius: 6px;
        text-align: left;
    }

    .stat-number {
        font-size: 1.1em;
        margin-bottom: 0;
    }

    .stat-label {
        font-size: 0.75em;
        margin-bottom: 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
    }

    /* Mobile-optimized buttons */
    .btn, .action-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 8px;
        margin: 4px 0;
        touch-action: manipulation;
    }

    .match-actions {
        margin-top: 16px;
    }

    /* Mobile-optimized filters */
    .filter-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .filter-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }

    .filter-group label {
        font-size: 0.9em;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border-radius: 6px;
        border: 2px solid #ddd;
        background: white;
        touch-action: manipulation;
    }

    .filter-group input:focus,
    .filter-group select:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

    .match-count {
        margin-left: 0;
        text-align: center;
        margin-top: 12px;
        font-size: 0.9em;
        padding: 8px;
        background: #e8f4fd;
        border-radius: 6px;
        font-weight: 600;
    }

    /* Mobile-optimized status badges */
    .status-badge {
        padding: 6px 12px;
        font-size: 0.8em;
        border-radius: 16px;
        margin-bottom: 12px;
        display: block;
        text-align: center;
    }

    /* Mobile-optimized modals */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
    }

    .modal-body {
        padding: 16px;
        max-height: 60vh;
    }

    /* Mobile-optimized info grids */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-item {
        padding: 12px;
        border-radius: 6px;
    }

    /* Mobile-optimized navigation */
    nav {
        padding: 12px;
    }

    nav a {
        display: block;
        margin: 6px 0;
        padding: 12px;
        font-size: 16px;
        border-radius: 6px;
    }

    /* Mobile-optimized forms */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 1em;
        margin-bottom: 8px;
    }

    .form-group input,
    .form-group select {
        padding: 14px;
        font-size: 16px;
        border-radius: 6px;
        border: 2px solid #ddd;
    }

    /* Mobile form grid */
    .mobile-form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }

    .form-section {
        width: 100%;
    }

    .form-section label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #2c3e50;
        font-size: 0.95em;
    }

    .form-section input,
    .form-section select {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border: 2px solid #ddd;
        border-radius: 8px;
        background: white;
        touch-action: manipulation;
        transition: border-color 0.3s;
    }

    .form-section input:focus,
    .form-section select:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        outline: none;
    }

    /* Mobile-optimized special elements */
    .subscription-closed {
        padding: 12px 16px;
        font-size: 0.9em;
        border-radius: 6px;
    }

    .no-matches {
        padding: 40px 20px;
    }

    .no-matches h3 {
        font-size: 1.3em;
    }

    /* Mobile-optimized player cards */
    .player-card {
        padding: 14px;
        margin-bottom: 10px;
        border-radius: 6px;
    }

    .slot-participants {
        padding: 8px;
        font-size: 0.9em;
        border-radius: 4px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .match-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 18px;
    }

    .filter-controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    .filter-group {
        flex: 1;
        min-width: 200px;
    }

    .match-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    /* Tablet form layouts */
    .mobile-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Large desktop optimizations */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .match-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 24px;
    }

    /* Desktop form layouts */
    .mobile-form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Mobile-specific enhancements for matchmanager */
@media (max-width: 768px) {
    /* Time slots mobile optimization */
    .time_slot {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #ddd;
    }

    .time_slot input[type="date"],
    .time_slot input[type="time"] {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border: 2px solid #ddd;
        border-radius: 6px;
        touch-action: manipulation;
    }

    .time_slot .remove_slot_btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        background: #e74c3c;
        color: white;
        border: none;
        border-radius: 6px;
        touch-action: manipulation;
        margin-top: 8px;
    }

    #add_slot_btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        margin-top: 12px;
        touch-action: manipulation;
    }

    /* Fieldset mobile optimization */
    fieldset {
        border-width: 1px;
        padding: 12px;
        margin-bottom: 16px;
        border-radius: 6px;
    }

    legend {
        font-size: 14px;
        padding: 0 8px;
    }

    /* Stats grid mobile optimization */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .stats-grid .stat-item {
        text-align: center;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e1e5e9;
    }

    /* Player list mobile optimization */
    .player-list {
        margin-top: 12px;
    }

    .player-card {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 6px;
    }

    /* Time slot header mobile optimization */
    .time-slot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .slot-info {
        font-size: 0.95em;
        font-weight: 600;
        color: #2c3e50;
    }

    .slot-count {
        padding: 6px 12px;
        border-radius: 16px;
        font-size: 0.85em;
        font-weight: 600;
        align-self: flex-start;
    }
}

/* Player token admin specific styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.token-result {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

.token-display {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
    margin: 10px 0;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Utility classes for common inline styles */
.text-muted {
    color: #666;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-8 {
    margin-bottom: 8px;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.gap-15 {
    gap: 15px;
}

.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.grid-auto-fit-250 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.text-left {
    text-align: left;
}

.font-bold {
    font-weight: bold;
}

.font-size-1-2 {
    font-size: 1.2em;
}

.color-success {
    color: #27ae60;
}

.font-size-1-8 {
    font-size: 1.8em;
}

.text-0-9 {
    font-size: 0.9em;
}

.word-break {
    word-break: break-word;
}

.bg-light {
    background: #f8f9fa;
}

.rounded {
    border-radius: 8px;
}

.p-20 {
    padding: 20px;
}

.p-15 {
    padding: 15px;
}

.p-8 {
    padding: 8px;
}

.w-100 {
    width: 100%;
}

.border-ddd {
    border: 1px solid #ddd;
}

.border-radius-4 {
    border-radius: 4px;
}

.header-subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    margin-top: 8px;
}

.ml-10 {
    margin-left: 10px;
}

.text-center {
    text-align: center;
}

.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #e67e22;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .match-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .btn:hover, .action-btn:hover {
        background-color: inherit;
    }

    .home-button:hover {
        background: #2980b9;
    }

    /* Ensure touch targets are large enough */
    button, .btn, .action-btn, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve touch scrolling */
    .modal-body, #participants_container {
        -webkit-overflow-scrolling: touch;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .match-card {
        border: 2px solid #000;
    }

    .btn, .action-btn {
        border: 2px solid #000;
    }

    .status-badge {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .match-card, .btn, .action-btn, .home-button {
        transition: none;
    }

    .match-card:hover {
        transform: none;
    }
}

/* Focus visible improvements for keyboard navigation */
.btn:focus-visible,
.action-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .home-button, .filter-section, .match-actions, nav {
        display: none !important;
    }

    .match-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 20px;
    }

    .header {
        background: white;
        color: black;
        border-bottom: 2px solid #000;
    }
}

/* Token validation status styles */
.token-status-valid {
    color: #27ae60;
    background: #d4edda;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.token-status-unconfirmed {
    color: #856404;
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.token-status-invalid {
    color: #721c24;
    background: #f8d7da;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.token-status-checking {
    color: #666;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}