/* Album page-specific styles */
.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.image-container {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.image-container img {
    max-width: 100%;
    border-radius: 8px;
}

.metadata-container {
    flex: 1;
    max-width: 300px; /* Cap the width */
    padding: 15px;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.metadata-container h2 {
    margin-top: 0;
    color: #ff7eb3;
}

.metadata-container p {
    margin: 10px 0;
    line-height: 1.6;
}

.metadata-container strong {
    color: #ff7eb3;
}

.metadata-container ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metadata-container ul li {
    background: #2b2b2b;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.3s, transform 0.2s;
}

.metadata-container ul li:hover {
    background: #ff7eb3;
    color: #1e1e1e;
    transform: scale(1.05);
}

.metadata-container ul li a {
    all: unset;
    color: inherit;
    cursor: pointer;
}

.metadata-container ul li:hover a {
    color: inherit;
}

/* Anime container for inline layout */
.anime-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between "Anime:" and the box */
    margin: 10px 0; /* Add vertical spacing */
}

.anime-box {
    background: #2b2b2b;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.anime-box a {
    all: unset;
    color: inherit;
    cursor: pointer;
}

.anime-box:hover {
    background: #ff7eb3;
    color: #1e1e1e;
    transform: scale(1.05);
}

/* Character container for inline layout */
.character-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between "Character:" and the box */
    margin: 10px 0; /* Add vertical spacing */
}

.character-box {
    background: #2b2b2b;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.character-box a {
    all: unset;
    color: inherit;
    cursor: pointer;
}

.character-box:hover {
    background: #ff7eb3;
    color: #1e1e1e;
    transform: scale(1.05);
}

/* Mobile layout: Move metadata to the bottom */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column; /* Stack content vertically */
    }

    .metadata-container {
        order: 2; /* Ensure metadata appears after the images */
        margin-top: 20px; /* Add spacing between images and metadata */
        max-width: none; /* Allow full width on mobile */
        width: 100%; /* Make metadata take up the entire width */
    }

    .image-container {
        order: 1; /* Ensure images appear first */
    }
}

.album-image {
    cursor: pointer;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    transform-origin: center center; /* Ensure scaling originates from the center */
}

.album-image.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(0, 0) scale(1); /* Use translate(0, 0) for a smooth transition */
    width: 100%; /* Cover the entire screen */
    height: 100%; /* Maintain fullscreen dimensions */
    object-fit: contain; /* Ensure the image fits within the screen without distortion */
    z-index: 9999;
    border-radius: 0;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

/* Ensure other content is hidden when fullscreen */
.album-image.fullscreen ~ * {
    display: none;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Dim the background */
    z-index: 9998;
    display: none;
    opacity: 0; /* Start hidden */
    transition: opacity 0.3s ease-in-out; /* Fade in effect */
}

.fullscreen-overlay.visible {
    display: block;
    opacity: 1; /* Fade in the overlay */
}

/* Adjust grid for album list without metadata */
.content-wrapper.full-grid {
    display: block;
    margin: 0 auto;
    padding: 20px;
}

/* Album grid styling */
.album-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Default 5 columns */
    gap: 20px;
}

/* Responsive adjustments for album grid */
@media (max-width: 1024px) {
    .album-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for medium screens */
    }
}

@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for small screens */
    }
}

@media (max-width: 480px) {
    .album-grid {
        grid-template-columns: 1fr; /* 1 column for extra small screens */
    }
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-button {
    padding: 5px 10px;
    font-size: 1em;
    background-color: #2b2b2b;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.pagination-button:hover {
    background-color: #ff7eb3;
    color: #1e1e1e;
}

.pagination-button.active {
    background-color: #ff7eb3;
    color: #1e1e1e;
    font-weight: bold;
}

