/* Additional styles for character pages */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/space-background.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    text-align: center;
    padding: 8rem 0 4rem;
}

.page-header h1 {
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Character Grid */
.characters-grid {
    background-color: #f5f5f5;
    padding: 4rem 0;
}

.character-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.character-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.character-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.character-image {
    height: 250px; /* Keep your fixed height if you want uniform cards */
    overflow: hidden;
    position: relative;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Change from 'cover' to 'contain' */
    position: absolute;
    top: 0;
    left: 0;
}

/* For the individual character profile images */
.character-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.placeholder-character {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.char1 {
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.char2 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.char3 {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.char4 {
    background: linear-gradient(135deg, #16a085, #1abc9c);
}

.char5 {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.char6 {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.character-info {
    padding: 1.5rem;
}

.character-role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Individual Character Page */
.character-profile {
    padding: 4rem 0;
    background-color: #fff;
}

.character-profile-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.character-portrait {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.character-details h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.character-details .role {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.character-section {
    margin-bottom: 2rem;
}

.character-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.character-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.trait {
    background-color: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.appearances {
    margin-bottom: 1.5rem;
}

.appearances li {
    margin-bottom: 0.5rem;
}

.relationships {
    margin-bottom: 1.5rem;
}

.relationship {
    margin-bottom: 1rem;
}

.relationship h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

@media screen and (max-width: 768px) {
    .character-profile-container {
        grid-template-columns: 1fr;
    }
    
    .character-portrait {
        height: 300px;
        max-width: 300px;
        margin: 0 auto;
    }
}
