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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header h1 {
    color: #2c3e50;
    font-weight: 600;
}

.header h1 i {
    color: #e74c3c;
    margin-right: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn i {
    pointer-events: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, var(--club-primary, #667eea), var(--club-secondary, #764ba2));
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-small {
    padding: 12px 18px;
    font-size: 13px;
    border-radius: 8px;
    min-width: 80px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Screens */
.screen {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
    color: white;
}

.welcome-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-content p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Dashboard */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    color: white;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Rink Results */
.rink-results {
    margin: 20px 0;
}

.rink-result {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.rink-result h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.rink-result .form-row {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Navigation Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.nav-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    color: #333;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-card:hover {
    transform: translateY(-10px);
    border-color: #667eea;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.nav-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.nav-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.nav-card p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.5;
}

/* Competition Info Banner */
.competition-info-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-card i {
    font-size: 2rem;
    opacity: 0.8;
}

.info-card h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.info-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Data Lists */
.data-list {
    display: grid;
    gap: 20px;
}

.data-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.data-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}



.data-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.data-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-swatches {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.data-item-actions {
    display: flex;
    gap: 10px;
}

.data-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 4px;
}

.info-value {
    font-weight: 600;
    color: #2c3e50;
}

/* League Tables */
.league-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.league-table th,
.league-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.league-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.league-table tr:hover {
    background: #f8f9fa;
}

/* Team Format Badges */
.format-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #667eea;
    color: white;
    margin-left: 8px;
}

/* Role Badges */
.format-badge.admin {
    background: #e74c3c;
    color: white;
}

.format-badge.league_manager {
    background: #f39c12;
    color: white;
}

.format-badge.player {
    background: #27ae60;
    color: white;
}

/* Level Badges */
.format-badge.national {
    background: #8e44ad;
    color: white;
}

.format-badge.county {
    background: #3498db;
    color: white;
}

.format-badge.club {
    background: #2ecc71;
    color: white;
}

.format-badge.season {
    background: #17a2b8;
    color: white;
}

.format-badge.available {
    background: #27ae60;
    color: white;
}

.format-badge.unavailable {
    background: #e74c3c;
    color: white;
}

/* Calendar Styles */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-grid {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #667eea;
}

.calendar-day-header {
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border: 1px solid #e9ecef;
    background: white;
    position: relative;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #6c757d;
}

.calendar-day.today {
    background: #e3f2fd;
    border-color: #2196f3;
}

.day-number {
    font-weight: 600;
    margin-bottom: 5px;
}

.game-item {
    background: #667eea;
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 10px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.game-item:hover {
    background: #5a6fd8;
}

/* View Filters */
.view-filters {
    display: flex;
    gap: 10px;
}

/* My Game Highlighting */
.data-item.my-game {
    border-left: 4px solid #27ae60;
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.05) 0%, transparent 100%);
}

/* Availability Count Styles */
.availability-count {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.availability-count.available {
    background: #d4edda;
    color: #155724;
}

.availability-count.unavailable {
    background: #f8d7da;
    color: #721c24;
}

/* Poll Results Styles */
.poll-results {
    margin-top: 20px;
}

.poll-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.summary-item.available {
    color: #27ae60;
}

.summary-item.unavailable {
    color: #e74c3c;
}

.summary-item.pending {
    color: #f39c12;
}

.response-list {
    margin-top: 20px;
}

.response-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
}

.response-item.available {
    border-left: 4px solid #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.response-item.unavailable {
    border-left: 4px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.player-name {
    font-weight: 600;
}

.response-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.response-time {
    font-size: 12px;
    color: #6c757d;
}

.rink-count {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
    margin-left: 5px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-active {
    background: #d1ecf1;
    color: #0c5460;
}

.status-registration_open {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.status-draw_ready {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #e2e3e5;
    color: #383d41;
}

.status-schedule {
    background: #e2e3e5;
    color: #383d41;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .container {
        padding: 0 10px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .screen {
        overflow-x: hidden;
    }

    .header .container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .nav {
        width: 100%;
        max-width: 100% !important;
        justify-content: space-between;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 11px;
        min-width: auto;
    }

    .dashboard-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
        padding-bottom: 10px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 12px;
        white-space: nowrap;
    }

    .tab-content {
        padding: 15px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .section-header h3 {
        font-size: 1.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .rink-result .form-row {
        grid-template-columns: 1fr;
    }

    .data-item {
        padding: 8px;
        overflow: hidden;
        max-width: 100%;
        word-wrap: break-word;
    }

    .data-item-header {
        flex-direction: row;
        gap: 6px;
        align-items: flex-start;
        cursor: pointer;
        max-width: 100%;
        flex-wrap: wrap;
    }

    .data-item-title {
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
        overflow: visible;
        text-overflow: clip;
        display: flex;
        align-items: flex-start;
        gap: 6px;
    }

    .data-item:not(.expanded) .data-item-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .data-item.expanded .data-item-title {
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
    }

    .data-item-title .format-badge,
    .data-item-title .status-badge {
        font-size: 7px;
        padding: 1px 3px;
        white-space: nowrap;
        display: inline-block;
        margin: 0 2px;
    }

    .data-item-actions {
        display: none;
    }

    .data-item-info {
        display: none;
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e9ecef;
        max-width: 100%;
        overflow: hidden;
    }

    .info-value {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .data-item.expanded .data-item-info {
        display: grid;
        order: 5;
    }

    .data-item.expanded .data-item-actions {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px;
        order: 10;
    }

    .data-item-header::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 10px;
        color: #6c757d;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .data-item.expanded .data-item-header::after {
        content: '\f077';
    }

    .welcome-content h2 {
        font-size: 1.8rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .nav-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }

    .league-table {
        font-size: 12px;
    }

    .league-table th,
    .league-table td {
        padding: 8px 4px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .calendar-grid {
        font-size: 10px;
        width: 100%;
        overflow-x: auto;
    }

    .calendar-day-header {
        padding: 8px 2px;
        font-size: 10px;
    }

    .calendar-day {
        min-height: 50px;
        padding: 2px;
        font-size: 10px;
    }

    .day-number {
        font-size: 11px;
    }

    .game-item {
        font-size: 8px;
        padding: 1px 2px;
        margin-bottom: 1px;
    }

    .format-badge {
        font-size: 8px;
        padding: 2px 4px;
        white-space: nowrap;
    }

    .calendar-game {
        font-size: 8px;
        padding: 2px;
        margin: 1px 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dashboard-card.calendar-card {
        grid-column: span 1;
    }

    .card-content {
        padding: 15px;
        max-height: 250px;
    }

    .player-selection-panels {
        grid-template-columns: 1fr;
    }

    .competition-info-banner {
        grid-template-columns: 1fr;
    }

    .bracket-container {
        gap: 15px;
    }

    .bracket-round {
        min-width: 180px;
    }

    .match-card {
        padding: 10px;
    }

    .lineup-container {
        grid-template-columns: 1fr;
    }

    .score-entry {
        flex-direction: column;
        gap: 10px;
    }

    .participant-score input {
        width: 60px;
        font-size: 1.2rem;
        padding: 10px;
    }

    .wizard-steps {
        flex-direction: column;
        gap: 8px;
    }

    .wizard-steps::before {
        display: none;
    }

    .wizard-actions {
        flex-direction: column;
        gap: 10px;
    }

    .wizard-actions .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .pagination {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        align-items: stretch !important;
    }

    .pagination button,
    .pagination select,
    .pagination span {
        width: 100%;
        text-align: center;
        padding: 8px;
    }

    .pagination select {
        max-width: 100%;
    }

    .data-list {
        max-width: 100%;
        overflow: hidden;
    }
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #27ae60;
    color: white;
}

.notification.error {
    background: #e74c3c;
    color: white;
}

.notification.warning {
    background: #f39c12;
    color: white;
}

/* Custom Format Styles */
.rink-config {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rink-config-item {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rink-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rink-header label {
    min-width: 150px;
    margin-bottom: 0;
    font-weight: 500;
}

.rink-header select {
    flex: 1;
    margin-bottom: 0;
}

.rink-woods {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.rink-woods label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #856404;
    font-weight: 500;
}

.rink-woods select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    background: white;
}

.rink-roles {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.roles-header {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 8px;
}

.roles-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-lead {
    background: #28a745;
    color: white;
}

.role-badge.role-two {
    background: #17a2b8;
    color: white;
}

.role-badge.role-three {
    background: #ffc107;
    color: #212529;
}

.role-badge.role-skip {
    background: #dc3545;
    color: white;
}

.format-summary {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #2196f3;
}

.format-summary h4 {
    margin-bottom: 10px;
    color: #1976d2;
}

.format-info {
    color: #0d47a1;
}

.format-info ul {
    margin: 10px 0 0 20px;
}

.format-info li {
    margin-bottom: 5px;
}

/* Competition Management Styles */
.competition-info-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card i {
    font-size: 1.5rem;
    color: #667eea;
}

.info-card h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.info-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Format Details */
.format-details {
    animation: fadeIn 0.3s ease;
}

/* Scoring Method Display */
.scoring-method-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #17a2b8;
    color: white;
    margin-left: 8px;
}

.format-info .info-grid {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 10px;
}

/* Bracket Styles */
.bracket-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.bracket-header h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.bracket-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.bracket-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.control-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tournament-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.participants-count {
    font-weight: 500;
    color: #6c757d;
}

/* Knockout Bracket */
.knockout-bracket {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 0;
    min-height: 400px;
}

.bracket-round {
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.round-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
}

.round-matches {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
    justify-content: space-around;
}

/* Match Cards */
.match-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.match-card.completed {
    border-color: #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff8 100%);
}

.match-card.scheduled {
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-number {
    font-weight: 600;
    color: #2c3e50;
}

.match-participants {
    margin-bottom: 15px;
}

.participant {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.participant.winner {
    background: #d4edda;
    border: 2px solid #27ae60;
    font-weight: 600;
}

.participant-name {
    flex: 1;
}

.participant-score {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.vs-divider {
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    margin: 5px 0;
}

.match-details {
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
}

.match-info {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.match-info small {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.match-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Empty States */
.empty-bracket {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-bracket i {
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state-small {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Participant Management */
.participant-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.participant-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.participant-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease;
}

.participant-item:hover {
    background: #f8f9fa;
}

.participant-item.selected {
    background: #e3f2fd;
    border: 1px solid #2196f3;
}

.participant-item input[type="checkbox"] {
    width: auto;
}

.participant-item label {
    cursor: pointer;
    margin-bottom: 0;
}

.current-list {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.current-participant {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 5px;
}

.current-participant .seed {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.current-participant .name {
    flex: 1;
}

/* Result Entry Styles */
.match-info-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.match-info-header h3 {
    margin-bottom: 10px;
}

.result-entry-section {
    margin-bottom: 25px;
}

.score-entry {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.participant-score {
    text-align: center;
}

.participant-score label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.participant-score input {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px;
    border: 3px solid #e9ecef;
    border-radius: 8px;
}

.participant-score input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vs-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
}

/* Team Lineups */
.team-lineups {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.lineup-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.team-lineup h5 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.position-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.position-entry label {
    min-width: 80px;
    font-weight: 500;
    margin-bottom: 0;
}

.position-entry input {
    flex: 1;
}

/* Warning Box */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 10px;
}

.warning-box ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

/* Modal Adjustments */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Tournament Bracket Styles */
.tournament-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.bracket-container {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 0;
    min-height: 400px;
}

.bracket-round {
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.bracket-round h3 {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #667eea;
    color: white;
    border-radius: 8px;
}

.match-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.match-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.match-player.winner {
    background: #d4edda;
    border-color: #27ae60;
    font-weight: bold;
}

.vs {
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    margin: 5px 0;
}

.score {
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.players-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

.players-grid {
    display: grid;
    gap: 10px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* Player Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: none !important;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.club-badge {
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.player-details h2 {
    margin: 0;
    font-size: 1.8rem;
}

.club-name {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-weight: 500;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: none !important;
}

.preload * {
    transition: none !important;
    animation: none !important;
}

.dashboard-card.calendar-card {
    grid-column: span 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--club-primary, #667eea) 0%, var(--club-secondary, #764ba2) 100%);
    color: white;
    transition: all 0.3s ease;
}

.card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.game-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border-left: 4px solid var(--club-primary, #667eea);
}

.game-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-teams {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.game-details {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.game-details span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6c757d;
    font-size: 0.9rem;
}

.game-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.poll-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    background: rgba(var(--club-primary-rgb, 102, 126, 234), 0.1);
    border-left: 4px solid var(--club-primary, #f39c12);
}

.poll-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.poll-details {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.poll-details span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #856404;
    font-size: 0.9rem;
}

.poll-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.empty-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Mini Calendar Styles */
.mini-calendar {
    background: white;
}

.mini-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--club-primary, #667eea);
}

.mini-day-header {
    padding: 8px;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.mini-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.mini-calendar-day {
    min-height: 35px;
    padding: 4px;
    border: 1px solid #e9ecef;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-calendar-day.other-month {
    background: #f8f9fa;
    color: #6c757d;
}

.mini-calendar-day.today {
    background: #e3f2fd;
    border-color: #2196f3;
    font-weight: bold;
}

.mini-calendar-day.has-games {
    background: #fff3e0;
    border-color: #ff9800;
}

.mini-day-number {
    font-size: 12px;
    font-weight: 500;
}

.game-dot {
    width: 6px;
    height: 6px;
    background: #ff9800;
    border-radius: 50%;
    margin-top: 2px;
}

.logo-preview {
    margin-top: 10px;
    text-align: center;
}

.logo-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.banner-preview {
    margin-top: 10px;
    text-align: center;
}

.banner-preview img {
    max-width: 300px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    object-fit: cover;
}

.county-logo, .club-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.data-item-header .county-logo,
.data-item-header .club-logo {
    width: 30px;
    height: 30px;
}

.club-banner {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.club-banner img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}



.data-item-title {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
    width: 100%;
}

.data-item-title > div:first-of-type {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.county-logo, .club-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.club-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.club-contact {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Responsive Design for Player Dashboard */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.calendar-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .game-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .game-actions {
        justify-content: flex-start;
    }
    
    .poll-actions {
        justify-content: flex-start;
    }
}

/* Responsive Design for Competition Features */
@media (max-width: 768px) {
    .rink-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rink-header label {
        min-width: auto;
    }
    
    .bracket-container {
        gap: 20px;
    }
    
    .bracket-round {
        min-width: 200px;
    }
    
    .tournament-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .competition-info-banner {
        grid-template-columns: 1fr;
    }
    
    .bracket-controls {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .knockout-bracket {
        gap: 20px;
    }
    
    .bracket-round {
        min-width: 200px;
    }
    
    .participant-sections {
        grid-template-columns: 1fr;
    }
    
    .lineup-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .score-entry {
        flex-direction: column;
        gap: 15px;
    }
}

/* Player Selection Panels */
.player-selection-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.selection-panel {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.selection-panel h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.players-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    padding: 5px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.player-item:hover {
    background: #e9ecef;
}

.player-item.selected {
    background: #d4edda;
    border: 1px solid #27ae60;
}

.player-item i {
    color: #667eea;
}

.player-item.selected i {
    color: #27ae60;
}

.empty-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

@media (max-width: 768px) {
    .player-selection-panels {
        grid-template-columns: 1fr;
    }
}

/* Scoring Configuration Styles */
.scoring-config {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.scoring-config.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.scoring-example {
    animation: fadeIn 0.3s ease;
}

.scoring-example h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    margin-bottom: 10px;
}

.scoring-example #exampleText {
    color: #495057;
    line-height: 1.5;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Additional Clubs Styles */
.additional-clubs-list {
    min-height: 40px;
    margin-bottom: 10px;
}

.additional-club-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.additional-club-item:hover {
    background: #e9ecef;
}

.additional-club-item .btn {
    padding: 4px 8px;
    font-size: 12px;
}

#additionalClubsContainer {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

#additionalClubsContainer p {
    margin: 0;
    color: #6c757d;
    font-style: italic;
}

/* Force polls tab to be visible */
.tab-btn[data-tab="my-polls"] {
    display: block !important;
    visibility: visible !important;
}

#my-polls {
    display: none;
}

#my-polls.active {
    display: block !important;
}

/* Fix dashboard line artifact */
.screen {
    overflow: hidden;
}

.dashboard-grid::before,
.dashboard-grid::after {
    display: none;
}

/* Wizard Styles */
.wizard-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    background: #e9ecef;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step.active {
    background: #667eea;
    color: white;
}

.wizard-step {
    min-height: 400px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .wizard-steps::before {
        display: none;
    }
    
    .wizard-actions {
        flex-direction: column;
        gap: 10px;
    }
}
