/* Tournament Page Styles */

.tournaments-section {
    padding: 40px 0;
}

/* Live Scoring Indicator */
.match-live-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    margin: 0 10px;
    animation: pulse-live 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Remove underline from umpire links */
.umpire-link {
    text-decoration: none !important;
    color: inherit;
}

.umpire-link:hover {
    text-decoration: underline !important;
}

/* Scorekeeper icon styling */
.scorekeeper-icon-sm {
    font-style: normal !important;
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #f97316;
    color: white;
    border-radius: 3px;
    text-align: center;
    line-height: 18px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.scorekeeper-icon-sm:hover {
    background-color: #ea580c;
}

/* Hide the emoji content, we'll use a symbol instead */
.scorekeeper-icon-sm::before {
    content: "▶";
    font-style: normal;
}

@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        transform: scale(1.1);
    }
}

/* Matches Tonight Styles */
.match-tonight-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
    margin: 0;
}

tr.hidden-match {
    display: none !important;
}

/* Simplified view when schedule filter is active */
.schedule-view-active .match-table thead {
    display: none !important;
}

.schedule-view-active .score-cell {
    display: none !important;
}


.scheduled-filter-active {
    background: #10b981 !important;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.cancel-matches-tonight-btn {
    margin-left: 8px;
}

/* Tournament Filter Tabs */
.tournament-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.filter-tab {
    background: none;
    border: 2px solid #ddd;
    padding: 10px 20px;
    border-radius: 25px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Tournament List Container */
.tournament-list-container {
    min-height: 200px;
}

/* Tournament Cards */
.tournament-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tournament-card {
    position: relative;
    min-height: 300px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tournament-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.tournament-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: center;
    padding: 30px;
}

.tournament-content {
    width: 100%;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.tournament-info {
    flex: 1;
}

.tournament-header {
    margin-bottom: 16px;
}

.tournament-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.tournament-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.tournament-countdown-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.countdown-numbers {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.countdown-number {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 24px;
    text-align: center;
}

.countdown-labels {
    display: flex;
    gap: 12px;
}

.countdown-label {
    color: white;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    min-width: 24px;
    text-align: center;
}

.tournament-venue {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 8px;
}

.tournament-venue i {
    opacity: 0.8;
}

.tournament-categories {
    min-width: 320px;
    max-width: 420px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 6px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.categories-grid-scrollable {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 8px;
}

/* For larger screens with more space, allow even more columns */
@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 5px;
    }
    
    .categories-grid-scrollable {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 5px;
    }
}

/* For extra large screens, allow even more columns */
@media (min-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px;
    }
    
    .categories-grid-scrollable {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px;
    }
}

/* Custom scrollbar for categories */
.categories-grid::-webkit-scrollbar {
    width: 4px;
}

.categories-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.categories-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.categories-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    min-height: 36px;
    text-align: center;
}

/* Adjust text size for smaller categories */
@media (min-width: 1200px) {
    .category-item {
        font-size: 0.7rem;
        padding: 6px 8px;
        min-height: 32px;
    }
}

@media (min-width: 1400px) {
    .category-item {
        font-size: 0.65rem;
        padding: 6px 6px;
        min-height: 30px;
    }
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
    color: white;
    text-decoration: none;
}

.category-name {
    flex: 1;
}

.category-item i {
    opacity: 0.7;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
}

.category-item:hover i {
    opacity: 1;
}

.tournament-sponsors {
    margin: 16px 0;
    padding: 12px 0;
}

.sponsors-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sponsors-list {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sponsor-item {
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

.sponsor-item:hover {
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.sponsor-logo {
    height: 24px;
    max-width: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sponsor-item:hover .sponsor-logo {
    opacity: 1;
}

.sponsor-name {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sponsor-item:hover .sponsor-name {
    opacity: 1;
}

.tournament-actions {
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #e67e22 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.btn-primary i {
    font-size: 0.8rem;
}

/* Prospectus Modal Styles */
.modal-xl-custom {
    max-width: 90%;
    width: 1200px;
    margin: 1.75rem auto;
}

@media (min-width: 576px) {
    .modal-xl-custom {
        margin: 1.75rem auto;
    }
}

.prospectus-content {
    min-height: 400px;
}

.pdf-container {
    width: 100%;
    min-height: 600px;
}

.pdf-fallback {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.image-container {
    text-align: center;
}

.prospectus-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.text-content {
    text-align: center;
    padding: 40px;
}

/* Tournament card hover effect */
.tournament-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Removed tournament actions and view button styles since they're no longer used */

/* Loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* No tournaments message */
.no-tournaments {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-tournaments i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-tournaments h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.no-tournaments p {
    font-size: 1rem;
    margin: 0;
}

/* Error message */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

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

/* For very large screens, make categories section even wider */
@media (min-width: 1600px) {
    .tournament-categories {
        min-width: 400px;
        max-width: 500px;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .tournament-categories {
        min-width: 280px;
        max-width: 350px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .tournament-card {
        height: auto;
        min-height: 200px;
    }

    .tournament-overlay {
        padding: 20px;
        position: relative;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    }

    .tournament-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .tournament-info {
        flex: none;
    }

    .tournament-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .tournament-date {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .tournament-venue {
        font-size: 0.85rem;
        margin-top: 4px;
        margin-bottom: 12px;
        margin-right: 100px; /* Make room for countdown timer */
    }

    .tournament-sponsors {
        margin: 12px 0;
        padding: 10px 0;
    }

    .sponsors-label {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .sponsors-list {
        gap: 8px;
    }

    .sponsor-logo {
        height: 20px;
        max-width: 50px;
    }

    .sponsor-name {
        font-size: 0.65rem;
    }

    .tournament-countdown-corner {
        top: 50%;
        bottom: auto;
        right: 15px;
        transform: translateY(-50%);
        padding: 10px 12px;
    }
    
    .countdown-numbers {
        gap: 8px;
    }
    
    .countdown-number {
        font-size: 1.2rem;
        min-width: 20px;
    }
    
    .countdown-labels {
        gap: 8px;
    }
    
    .countdown-label {
        font-size: 0.55rem;
        min-width: 20px;
    }

    .tournament-categories {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .categories-grid,
    .categories-grid-scrollable {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        max-height: 120px;
        overflow-y: auto;
        padding-right: 8px;
    }

    .category-item {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .countdown-item {
        min-width: 50px;
        padding: 8px 6px;
    }

    .countdown-number {
        font-size: 1.1rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .tournament-countdown {
        gap: 8px;
        margin: 12px 0;
    }

    .filter-tab {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .tournament-filter-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tournament-card {
        min-height: 180px;
    }

    .tournament-overlay {
        padding: 16px;
    }

    .tournament-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .tournament-date {
        font-size: 0.8rem;
    }

    .tournament-venue {
        font-size: 0.8rem;
        margin-right: 95px; /* Make room for countdown timer */
    }

    .tournament-sponsors {
        margin: 10px 0;
        padding: 8px 0;
    }

    .sponsors-label {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    .sponsors-list {
        gap: 6px;
    }

    .sponsor-logo {
        height: 18px;
        max-width: 45px;
    }

    .sponsor-name {
        font-size: 0.6rem;
    }

    .tournament-countdown-corner {
        top: 50%;
        bottom: auto;
        right: 12px;
        transform: translateY(-50%);
        padding: 8px 10px;
    }
    
    .countdown-numbers {
        gap: 6px;
    }
    
    .countdown-number {
        font-size: 1rem;
        min-width: 18px;
    }
    
    .countdown-labels {
        gap: 6px;
    }
    
    .countdown-label {
        font-size: 0.5rem;
        min-width: 18px;
    }

    .tournament-countdown {
        gap: 6px;
        margin: 10px 0;
    }

    .countdown-item {
        min-width: 42px;
        padding: 6px 4px;
    }

    .countdown-number {
        font-size: 1rem;
    }

    .countdown-label {
        font-size: 0.6rem;
    }

    .categories-grid,
    .categories-grid-scrollable {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
        max-height: 150px;
    }

    .category-item {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-height: 28px;
    }

    .category-item i {
        font-size: 0.7rem;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Tournament Tools Section */
.tournament-tools {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.tournament-tools .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

@media (max-width: 768px) {
    .tournament-tools {
        margin: 1rem 0;
        padding: 1rem;
    }

    .tournament-tools .btn {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
}

/* 
Group Calculator Modal Styles */

/* Clean Match Table */
.match-table {
    font-size: 0.85rem;
    border-collapse: collapse;
    width: 100%;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.match-header-row {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.match-header-cell {
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid #dee2e6;
    text-transform: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.match-header-cell:first-child {
    text-align: center;
    width: 150px;
}

.match-header-cell:not(:first-child):not(:last-child) {
    width: 60px;
}

.match-header-cell:last-child {
    width: 50px;
}

.match-header-cell:first-child {
    width: 200px;
    min-width: 200px;
    text-align: left;
}

.match-header-cell:not(:first-child):not(:last-child) {
    width: 70px;
    min-width: 70px;
}

.player-row {
    border-bottom: 1px solid #dee2e6;
}

.player-row:hover {
    background-color: #f8f9fa;
}

.player-row:nth-child(even) {
    background-color: #fafafa;
}

.player-name-cell {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    text-align: left;
    font-size: 0.85rem;
    vertical-align: middle;
    width: 150px;
}

.score-cell {
    padding: 0.25rem;
    text-align: center;
    border: 1px solid #dee2e6;
    /* width: 60px; */
    vertical-align: middle;
}

.score-input-compact {
    width: 100%;
    max-width: 50px;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
}

.score-input-compact:focus {
    border-color: #17a2b8;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

.score-input-compact:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hide number input spinners */
.score-input-compact::-webkit-outer-spin-button,
.score-input-compact::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input-compact[type=number] {
    -moz-appearance: textfield;
}

.walkover-cell {
    padding: 0.5rem;
    text-align: center;
    width: 50px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.walkover-checkbox-compact {
    margin: 0;
    transform: scale(1.1);
    cursor: pointer;
    accent-color: #dc3545;
}

.walkover-checkbox-compact:hover {
    transform: scale(1.2);
}

.match-spacer-row {
    height: 8px;
}

.match-spacer-row td {
    background: #f8f9fa;
    border: none;
    padding: 0;
}

.matches-grid {
    /* max-height: 400px; */
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for matches grid */
.matches-grid::-webkit-scrollbar {
    width: 6px;
}

.matches-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.matches-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.matches-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Clean Standings Table */
#standingsTable .table {
    margin-bottom: 0;
    font-size: 0.85rem;
    border-collapse: collapse;
    width: 100%;
    background: white;
}

#standingsTable .table th {
    background: #28a745;
    color: white;
    border: 1px solid #dee2e6;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#standingsTable .table td {
    padding: 0.5rem;
    vertical-align: middle;
    text-align: center;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    font-weight: 500;
}

#standingsTable .table tbody tr:hover {
    background-color: #f8f9fa;
}

#standingsTable .table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#standingsTable .position-1 {
    background-color: #fff3cd !important;
    font-weight: 700;
    border-left: 4px solid #ffc107;
}

#standingsTable .position-2 {
    background-color: #f8f9fa !important;
    font-weight: 600;
    border-left: 4px solid #6c757d;
}

#standingsTable .table td:first-child {
    font-weight: 600;
    text-align: center;
    width: 40px;
}

#standingsTable .table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
}

#standingsTable .table td:last-child {
    font-weight: 700;
    color: #28a745;
    width: 50px;
}

/* Enhanced Player Names Section */
#groupCalculatorModal #playerNamesGrid .mb-3 {
    margin-bottom: 1.25rem !important;
}

#groupCalculatorModal #playerNamesGrid .form-label {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.player-name-input {
    font-weight: 500;
    color: #495057;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.player-name-input:focus {
    border-color: #e67e22;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

.player-name-input:hover:not(:focus) {
    border-color: #adb5bd;
}

/* Group Calculator Modal Layout - IMPORTANT: High specificity */
#groupCalculatorModal .modal-dialog {
    max-width: 1200px !important;
    width: 90% !important;
    margin: 1rem auto !important;
}

#groupCalculatorModal .modal-content {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
}

#groupCalculatorModal .modal-header {
    background: #2c3e50 !important;
    color: white !important;
    border-bottom: none !important;
    padding: 1.5rem 2rem !important;
}

#groupCalculatorModal .modal-title {
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    margin: 0 !important;
}

#groupCalculatorModal .modal-body {
    padding: 2rem !important;
    background: #f8f9fa !important;
}

#groupCalculatorModal .modal-footer {
    background: #f1f3f4 !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 1rem 2rem !important;
}

/* Force 2-column layout with flexbox - Fixed Layout */
#groupCalculatorModal .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
    gap: 0 !important;
    align-items: flex-start !important;
}

#groupCalculatorModal .col-lg-4,
#groupCalculatorModal .col-md-4,
#groupCalculatorModal .col-sm-4,
#groupCalculatorModal .col-4 {
    flex: 0 0 30% !important;
    max-width: 30% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

#groupCalculatorModal .col-lg-8,
#groupCalculatorModal .col-md-8,
#groupCalculatorModal .col-sm-8,
#groupCalculatorModal .col-8 {
    flex: 0 0 70% !important;
    max-width: 70% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* Clean Card Design */
#groupCalculatorModal .card {
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-bottom: 1.5rem !important;
    background: white !important;
}

#groupCalculatorModal .card-header {
    border-bottom: 1px solid #dee2e6 !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#groupCalculatorModal .card-header.bg-primary {
    background: #e67e22 !important;
    color: white !important;
}

#groupCalculatorModal .card-header.bg-success {
    background: #28a745 !important;
    color: white !important;
}

#groupCalculatorModal .card-header.bg-info {
    background: #17a2b8 !important;
    color: white !important;
}

#groupCalculatorModal .card-body {
    padding: 1.5rem !important;
    background: white !important;
}

#groupCalculatorModal .col-lg-8 {
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* Card styling - Professional Tournament Style */
#groupCalculatorModal .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

#groupCalculatorModal .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#groupCalculatorModal .card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    font-weight: 600;
}

#groupCalculatorModal .card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

#groupCalculatorModal .card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #e67e22 100%) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#groupCalculatorModal .card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#groupCalculatorModal .card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Form controls - Enhanced styling */
#groupCalculatorModal .form-select,
#groupCalculatorModal .form-control {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: #495057;
    background-color: #fff;
    background-image: none;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

#groupCalculatorModal .form-select:focus,
#groupCalculatorModal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
    background-color: #fff;
}

#groupCalculatorModal .form-control-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 5px;
    font-weight: 500;
}

#groupCalculatorModal .form-label {
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#groupCalculatorModal .mb-3 {
    margin-bottom: 1rem !important;
}

/* Instructions styling - Enhanced */
#groupCalculatorModal #calculatorInstructions {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #2196f3;
    border-left: 5px solid #2196f3;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

#groupCalculatorModal #calculatorInstructions h6 {
    color: #1976d2;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#groupCalculatorModal #calculatorInstructions ol {
    font-size: 0.8rem;
    padding-left: 1.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

#groupCalculatorModal #calculatorInstructions ol li {
    margin-bottom: 0.25rem;
    color: #495057;
}

#groupCalculatorModal #calculatorInstructions p {
    font-size: 0.75rem;
    margin-bottom: 0;
    color: #6c757d;
    font-style: italic;
}

/* Responsive - stack on mobile */
@media (max-width: 991px) {

    #groupCalculatorModal .col-lg-4,
    #groupCalculatorModal .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    #groupCalculatorModal .col-lg-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    #groupCalculatorModal .modal-dialog {
        max-width: 95% !important;
        margin: 0.5rem !important;
    }

    #groupCalculatorModal .modal-body {
        padding: 1rem !important;
    }
}

/*
 Add margin to icons in Group Calculator titles */
#groupCalculatorModal .card-header i,
#groupCalculatorModal .modal-title i,
#calculatorInstructions i {
    margin-right: 5px !important;
}