/* --- DEADFACE ACTORS PAGE SPECIFIC STYLES --- */

.actor-page-title {
    font-family: var(--font-family-sans-serif);
    font-size: 3rem;
    color: var(--pink);
    text-shadow: 0 0 15px var(--pink);
    text-align: center;
    margin-top: 60px;
    margin-bottom: 50px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.actor-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid columns */
    gap: 30px; /* Space between cards */
    padding: 40px 20px;
    max-width: 1200px; /* Max width for the grid container */
    margin: 0 auto; /* Center the grid on the page */
}

/* Base Card Styling */
.actor-card {
    background-color: transparent; /* The outer card container is transparent */
    width: 100%; /* Fixed width for card */
    height: 100%; /* Fixed height for card */
    perspective: 1000px; /* Defines the 3D perspective for the flip effect */
    margin: 0 auto; /* Center individual cards within their grid cell */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s ease-in-out; /* Smooth flip transition */
    transform-style: preserve-3d; /* Ensures children (front/back) are positioned in 3D space */
    border: 2px solid var(--primary); /* Neon border for the inner card */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5); /* Initial subtle glow */
    color: var(--white);
    background-color: rgba(18, 18, 18, 0.9); /* Dark background for inner card */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Flip effect on hover */
.actor-card:hover .card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 0 25px var(--pink), 0 0 40px var(--info); /* Intense multi-color glow on hover */
}

/* Front and Back of the Card */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Hide the back of the element during rotation */
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0; /* REMOVED PADDING to allow image to fill entirely */
    border-radius: 8px; /* Match inner card border-radius */
    overflow: hidden;
}

.card-front {
    background-color: #1a1a1a; /* Dark background for card front */
    color: var(--primary); /* Retain for potential future text, but img will cover */
    position: relative;
}

.card-front img {
    width: 100%; /* Image fills width */
    height: 100%; /* Image fills height */
    object-fit: cover; /* Crops image to cover the area while maintaining aspect ratio */
    border-radius: 8px; /* Apply border-radius to image to match card */
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); /* Subtle glow for the image */
    /* Removed: margin-bottom: 10px; */
}

/* Removed: .card-front .actor-name {} as the h4 tag is removed from HTML */

.card-back {
    background-color: #1a1a1a; /* Dark background for card back */
    color: var(--white);
    transform: rotateY(180deg); /* Starts rotated so it's visible after flip */
    text-align: left;
    justify-content: flex-start; /* Align text content to the top */
    align-items: flex-start; /* Align text content to the left */
    font-family: var(--font-family-monospace); /* Monospace font for information */
    font-size: 0.9rem;
    line-height: 1.4;
    padding-top: 30px; /* Add padding to the top for the title */
    padding-left: 20px; /* Added horizontal padding for content */
    padding-right: 20px; /* Added horizontal padding for content */
}

.card-back h5 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.5rem;
    color: var(--pink); /* Neon pink for the back title */
    text-shadow: 0 0 8px var(--pink);
    margin-bottom: 15px;
    letter-spacing: 1px;
    width: 100%;
    text-align: center; /* Center the actor's name on the back */
    text-transform: uppercase;
}

.card-back p {
    margin-bottom: 8px;
    color: var(--white);
    text-shadow: 0 0 2px rgba(255,255,255,0.2);
    /* Removed padding from here as it's now on .card-back directly */
    width: 100%;
}

.card-back strong {
    color: var(--green); /* Highlight labels like "Alias:", "Specialty:" */
    text-shadow: 0 0 3px var(--green);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .actor-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 20px 10px;
    }
    .actor-card {
        width: 200px;
        height: 280px;
    }
    /* Removed .card-front .actor-name for mobile as well */
    .card-back h5 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    .card-back p {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    .card-back {
        padding-top: 20px;
        padding-left: 15px; /* Adjust padding for smaller screens */
        padding-right: 15px;
    }
    .actor-page-title {
        font-size: 2.5rem;
        margin-top: 40px;
        margin-bottom: 30px;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .actor-card-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 25px;
    }
    .actor-card {
        width: 280px; /* Slightly wider for single column readability */
        height: 380px;
    }
    /* Removed .card-front .actor-name for mobile as well */
    .card-back h5 {
        font-size: 1.5rem;
    }
    .card-back p {
        font-size: 0.9rem;
    }
    .actor-page-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
}