@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

html,
body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}

.container {
    flex: 1;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.gallery-item {
    flex: 0 1 calc(25% - 15px);
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 162, 184, 0);
    transition: background 0.3s ease;
}

.gallery-item:hover .image-container::after {
    background: rgba(23, 162, 184, 0.2);
}

.gallery-item:hover .view-overlay {
    opacity: 1;
}

.view-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 992px) {
    .gallery-item {
        flex: 0 1 calc(33.333% - 15px);
    }
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 0 1 calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 0 1 calc(100% - 15px);
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item p {
    padding: 10px;
    margin: 0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    transition: background 0.3s ease;
}

.dark-mode .gallery-item p {
    background: #333;
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 15px;
}

@media (max-width: 576px) {
    .modal-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-footer p {
        margin-bottom: 5px;
        font-size: 12px;
    }
}

.pagination {
    margin-top: 30px;
}

.pagination .page-item .page-link {
    background-color: #343a40;
    color: white;
    border: 1px solid #495057;
    transition: all 0.3s ease;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: #17a2b8;
    border-color: #17a2b8;
    transform: scale(1.1);
}

.pagination .page-item .page-link:hover {
    background-color: #17a2b8;
    color: white;
    transform: translateY(-2px);
}

.btn-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1030;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.btn-nav:hover {
    background-color: #17a2b8;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.btn-prev {
    left: 20px;
}

.btn-next {
    right: 20px;
}

@media (max-width: 576px) {
    .btn-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .btn-prev {
        left: 10px;
    }

    .btn-next {
        right: 10px;
    }
}

.site-header {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: white;
    text-align: center;
    background: linear-gradient(to right, #343a40, #343a40, #3a4149);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;

    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.site-header h1 {
    margin: 0;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    display: flex;

    align-items: center;

}

.site-header h1 a {
    color: #ffffff;
    text-decoration: none;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;

}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;

}

.main-nav li {
    margin: 0 15px;
    display: flex;

    align-items: center;

}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #17a2b8;
    color: white;
}

.dark-mode-toggle {
    position: relative;
    top: auto;
    right: auto;
    background-color: #343a40;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.dark-mode-toggle:hover {
    background-color: #17a2b8;
    transform: translateY(-2px);
}

.dark-mode-toggle i {
    transition: transform 0.5s ease;
}

.dark-mode .dark-mode-toggle i {
    transform: rotate(180deg);
}

.dark-mode {
    background-color: #121212;
    color: white;
}

.dark-mode .site-header,
.dark-mode .site-footer {
    background-color: #222;

}

.dark-mode .modal-content {
    background-color: #333;
    color: white;
}

.dark-mode .pagination .page-item .page-link {
    background-color: #222;
    border-color: #444;
}

.dark-mode .pagination .page-item.active .page-link {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.modal-dialog {
    margin: 10px auto;
    max-width: 95vw;
    height: 90vh;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.modal.fade .modal-dialog {
    transform: scale(0.9);
}

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

.modal-content {
    width: 100%;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border: none;
}

.modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    flex: 1;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.02);
}

.dark-mode .modal-body {
    background-color: #222;
}

.modal-body img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.img-loading {
    opacity: 0;
}

.img-loaded {
    opacity: 1;
}

.site-footer {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: white;
    text-align: center;
    padding: 20px;
    background-color: #343a40;
    position: relative;
    transition: all 0.3s ease;
}

.site-footer p {
    margin: 0;
    color: #ffffff;
}

.site-footer a {
    color: #17a2b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    text-decoration: none;
    color: #ffffff;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-images {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #6c757d;
}

a {
    color: #ffffff;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        order: 1;
    }

    .site-header h1 {
        flex: 1;
        order: 2;
        text-align: center;
        font-size: 1.2rem;
    }

    .dark-mode-toggle {
        order: 3;
    }

    .main-nav {
        flex: 0 0 100%;
        order: 4;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.open {
        max-height: 300px;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0 0 0;
    }

    .main-nav li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .site-header h1 {
        font-size: 1.5rem;
        margin-right: 0;

    }

    .dark-mode-toggle {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.search-container {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    padding: 0 15px;
}

#player-search {
    padding: 10px;
    border: 1px solid #495057;
    border-radius: 5px;
    flex-grow: 1;
    font-size: 16px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-mode #player-search {
    background-color: #333;
    color: white;
    border-color: #444;
}

#player-search:focus {
    border-color: #17a2b8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.25);
}

#search-button,
#clear-search {
    padding: 10px 15px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#search-button {
    background-color: #17a2b8;
}

#clear-search {
    background-color: #6c757d;
}

#search-button:hover,
#clear-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#search-button:hover {
    background-color: #138496;
}

#clear-search:hover {
    background-color: #5a6268;
}

#search-results-heading {
    color: #343a40;
    font-weight: 500;
    font-size: 1.5rem;
}

.dark-mode #search-results-heading {
    color: white;
}

#search-results:empty::after {

    display: block;
    text-align: center;
    padding: 50px;
    width: 100%;
    color: #6c757d;
    font-size: 1.2rem;
}

.dark-mode #search-results:empty::after {
    color: #adb5bd;
}

@media (max-width: 576px) {
    .search-container {
        flex-wrap: wrap;
    }

    #player-search {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }

    #search-button,
    #clear-search {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .search-container {
        display: none !important;
    }
}

/* Search results styling */
#search-results {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#search-results .search-item {
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#search-results .search-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#search-results .search-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.search-item-info {
    padding: 8px;
    background-color: #f8f9fa;
}

.search-item-info p {
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cod4xeo {
    color: rgba(0, 0, 0, 0);
    font-size: 1px;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    /* added line */
    border: 0;
}