/*
 * File: css/comic-view.css
 * Description: Styles for the comic book-style modal.
 */

/* --- Main Modal Backdrop & Container --- */
#comic-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(13, 18, 38, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#comic-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#comic-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background-color: #f0e9d6; /* Aged paper color */
    background-image: radial-gradient(#d1c7b0 1px, transparent 1px);
    background-size: 10px 10px;
    border: 6px solid #1a202c; /* Thick, inky main border */
    border-radius: 4px;
    padding: 0 1.5rem 1.5rem; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(0,0,0,0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#comic-modal-backdrop.is-visible #comic-modal-content {
    transform: scale(1);
}

/* --- Header Bar --- */
.comic-header {
    background-color: #1a202c;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 4px solid #4a5568;
    display: flex;
    align-items: center;
}

.comic-header-logo {
    height: 40px;
}

/* --- Close Button --- */
#comic-modal-close {
    position: absolute;
    top: -22px;
    right: -22px;
    width: 44px;
    height: 44px;
    background: #ef4444; /* Action red */
    color: #fff;
    border: 4px solid #1a202c;
    border-radius: 50%;
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}
#comic-modal-close:hover {
    transform: rotate(10deg) scale(1.1);
}

/* --- Main Featured Image Panel --- */
.comic-image-panel {
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('../img/bg/portrait_1.webp');
    background-size: cover;
    background-position: center;
    border: 4px solid #1a202c;
    padding: 10px;
    margin-bottom: 1.5rem;
    transform: rotate(-1.5deg);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
}

.comic-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* --- Titles & Text --- */
.comic-main-title {
    font-family: 'Russo One', sans-serif;
    font-size: 3rem;
    text-align: center;
    text-transform: uppercase;
    color: #f59e0b;
    background-color: #ef4444;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    transform: rotate(2deg);
    box-shadow: 0 4px 0 #1a202c, 0 8px 15px rgba(0,0,0,0.4);
    text-shadow: 3px 3px 0px #1a202c;
    border: 4px solid #1a202c;
}

.comic-featuring-title {
    font-family: 'Russo One', sans-serif;
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #4a5568;
    border-top: 2px solid rgba(0,0,0,0.2);
    border-bottom: 2px solid rgba(0,0,0,0.2);
    padding: 0.25rem 0;
}

/* --- Related Champions Grid --- */
.related-champions-grid {
    display: grid;
    /* This is the change: Always a 3-column grid */
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.related-champion-panel {
    text-align: center;
    background-color: rgba(255,255,255,0.6);
    border: 3px solid #1a202c;
    padding: 0.75rem;
    position: relative;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.related-champion-panel::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #1a202c;
}

.related-champion-panel img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #1a202c;
    margin: 0 auto 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.related-champion-panel h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #1a202c;
    font-size: 1rem;
}

/* --- Loader Spinner --- */
#comic-modal-body .loader-spinner {
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top: 6px solid #3b82f6;
    width: 50px;
    height: 50px;
    margin: 4rem auto;
    animation: spin 1.5s linear infinite;
}

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