/* Base styles */
body {
    background-color: #596891;  /* New background color */
    color: #2c3e50;  /* Dark slate text */
    padding-top: 2rem;
}

/* Navbar styles */
.navbar-brand {
    color: #ffffff !important;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.5rem;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2980b9);
}

/* Headline styles */
.page-title {
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 2.5rem;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 1.25rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* Player Card Styles */
.card {
    background-color: #c7ccdb;
    border: 1px solid #b3b9cc;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

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

.card-img-top {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #f8fafc;
    padding: 1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.card-text {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #2c3e50;
}

.card-text span {
    display: block;
    position: relative;
}

.card-text span:last-child {
    margin-bottom: 0;
}

.card-text strong {
    color: #34495e;
    font-weight: 600;
    position: absolute;
    left: 0;
    width: 70px;
    text-align: left;
}

.card-text span {
    padding-left: 75px;
}

.card-text span:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    color: #b3b9cc;
}

.card-text small {
    color: #34495e;
}

/* Filter Styles */
.filter-section {
    background-color: #c7ccdb;
    padding: 0 0.5rem 0.5rem;
    border-radius: 0px 0px 8px 10px;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-weight: 500;
    display: block;
}

.form-select {
    border-radius: 6px;
    border: 1px solid #b3b9cc;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    background-color: #ffffff;
    color: #2c3e50;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-select option {
    background-color: #ffffff;
    color: #2c3e50;
    white-space: normal;
}

/* Form switch styles */
.form-check.form-switch {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    height: 38px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.form-check.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    margin-left: 0 !important;
    border-color: #b3b9cc;
}

.form-check-input:checked {
    background-color: #3498db;
    border-color: #3498db;
}

.form-check-label {
    color: #2c3e50;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 0;
    white-space: normal;
    line-height: 1.2;
    width: 90px;
    padding-left: 0.5rem;
}

/* Card count */
.card-count {
    font-size: 0.85rem;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: right;
    white-space: nowrap;
}

/* Sort button container */
.sort-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    height: 100%;
}

/* Sort button */
.sort-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-right: 0;
    min-width: 150px;
}

.sort-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.sort-button.active {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.sort-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.sort-button.active .sort-icon {
    transform: rotate(180deg);
}

/* Custom scrollbar for dropdowns */
.form-select {
    scrollbar-width: thin;
    scrollbar-color: #bdc3c7 #f8fafc;
}

.form-select::-webkit-scrollbar {
    width: 8px;
}

.form-select::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Grid layout */
#playerGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

/* Container width */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Responsive Grid */
@media (max-width: 1400px) {
    #playerGrid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1200px) {
    #playerGrid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    #playerGrid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .card-img-top {
        height: 250px;
    }

    .page-title {
        font-size: 1.75rem;
        letter-spacing: 1.5px;
        margin-bottom: 2rem;
    }

    .filter-section {
        padding: 0;
    }
    
    .filter-section .row {
        padding: 0.25rem;
    }
}

@media (max-width: 576px) {
    #playerGrid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
        margin-bottom: 1.75rem;
    }
}

/* Animation for cards */
.player-card {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.player-card[style*="display: none"] {
    opacity: 0;
}

/* Modal styles */
.modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: 0.5rem auto;
}

.modal-header {
    border-bottom: 1px solid #4a4f73;
    padding: 1.5rem;
    background-color: #596891;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.modal-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 2rem;
}

.modal-image-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
}

.modal-image-container img {
    max-height: 550px;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.player-details {
    padding: 1.5rem;
    background-color: #c7ccdb;
    border-radius: 12px;
    height: 100%;
}

.player-details p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e1e8ed;
}

.player-details p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.player-details strong {
    color: #34495e;
    font-weight: 600;
    font-size: 1rem;
}

.player-details span {
    color: #2c3e50;
    font-weight: 500;
}

.btn-close {
    opacity: 0.7;
    transition: all 0.2s ease-in-out;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    filter: brightness(0) invert(1);
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 1.0);
}

/* Modal animation */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Remove the specific label adjustment for narrow columns */
.col-md-1 .form-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove the search container styles */
.search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0;
}

.search-container .form-control {
    flex: 1;
    min-width: 0;
}

.form-check.form-switch {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    height: 38px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.form-check-label {
    color: #2c3e50;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 0;
    white-space: normal;
    line-height: 1.2;
    width: 90px;
    padding-left: 0.5rem;
}

.sort-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    height: 100%;
}

.sort-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-right: 0;
    min-width: 150px;
}

.card-count {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: right;
    margin-top: 1.5rem;
    white-space: nowrap;
}

/* Remove any extra margin from the last column */
.row > .col-md-2:last-child {
    margin-right: 0;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.form-check.form-switch {
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.form-check-label {
    color: #2c3e50;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 0;
    white-space: normal;
    line-height: 1.2;
    width: 90px;
    padding-left: 0.5rem;
}

.card-count {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: right;
    white-space: nowrap;
}

.filter-header {
    padding: 0.5rem;
    border-bottom: 1px solid #b3b9cc;
}

.filter-toggle {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.5rem;
}

.filter-toggle:hover {
    color: #34495e;
}

.filter-icon {
    transition: transform 0.2s ease;
}

.collapsed .filter-icon {
    transform: rotate(-90deg);
}

@media (max-width: 768px) {
    .filter-section {
        padding: 0;
    }
    
    .filter-section .row {
        padding: 0.25rem;
    }
    
    .filter-section .col-md-1,
    .filter-section .col-md-2 {
        margin-bottom: 1rem;
    }
    
    .filter-section .col-md-1:last-child,
    .filter-section .col-md-2:last-child {
        margin-bottom: 0;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .form-check.form-switch {
        margin-top: 0.5rem;
    }
} 