/* --- character.css (REVISED) --- */

/* --- Main Profile Grid Layout --- */
.char-profile-grid {
    display: grid;
    /* Two columns: 1 (fixed stats) and 2 (variable details) */
    grid-template-columns: 350px 1fr; 
    gap: 30px;
}

/* LEFT COLUMN: Image and Stats */
.char-profile-left {
    display: flex;
    flex-direction: column;
    /* Ensure the left column sticks to its width */
    grid-column: 1 / 2;
}

.char-profile-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #1a2a4a;
    margin-bottom: 20px;
}

.char-profile-stats {
    font-size: 0.95em;
    padding-top: 15px;
    border-top: 1px solid #1a2a4a;
}

.char-profile-stats p {
    margin: 0 0 10px 0;
    color: #e0e0e0;
}

.char-profile-stats strong {
    color: #88aaff;
    display: inline-block;
    width: 120px; /* Aligns the values */
}


/* RIGHT COLUMN: Biography, Likes/Dislikes, and Gallery */
.char-profile-right {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
}

.char-profile-section {
    margin-bottom: 20px;
}

.char-profile-section h4 {
    font-family: 'Titillium Web', sans-serif;
    color: #88aaff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1em;
    margin: 0 0 5px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #1a2a4a;
}
.char-profile-section h5 {
    color: #66b3ff;
    font-size: 0.9em;
    margin: 10px 0 5px 0;
}

.char-profile-section ul {
    list-style: square;
    padding-left: 20px;
    margin: 5px 0 10px 0;
    font-size: 0.95em;
    color: #e0e0e0;
}
.char-profile-section li {
    margin-bottom: 3px;
}


/* --- Artwork Gallery Fix --- */

.char-gallery-container {
    /* Use a responsive grid for the gallery */
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.char-gallery-img {
    /* Set fixed dimensions and ensure image covers the space */
    width: 100%; 
    height: 100px; /* Fixed height for consistent grid look */
    object-fit: cover; /* CROPPING: Ensures image fills the area without distortion */
    border-radius: 4px;
    border: 1px solid #1a2a4a;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.char-gallery-img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* --- character.css (APPEND) --- */

/* Ensures the gallery section breaks out of the grid and spans full width */
.char-gallery-full-width {
    /* Top margin for visual separation from the two-column grid */
    margin-top: 30px; 
    /* Ensures the bottom border separates it from the gallery above the footer */
    padding-top: 5px; 
    border-top: 1px solid #1a2a4a;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 920px) {
    .char-profile-grid {
        /* Collapse to single column on smaller screens */
        grid-template-columns: 1fr;
    }
    .char-profile-img {
        /* Limit width of image in single column view */
        max-width: 400px;
        align-self: center;
    }
}

/* --- character.css (APPEND) --- */

/* Dom/Sub/Switch Badge Styles */
.dom-sub-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}
.dom-sub-badge.dominant {
    background-color: #7b1fa2; /* Deep Purple */
    color: #fff;
}
.dom-sub-badge.submissive {
    background-color: #2196f3; /* Blue */
    color: #fff;
}
.dom-sub-badge.switch {
    background-color: #ffb74d; /* Amber/Orange */
    color: #030814;
}

/* Sexual Likes/Dislikes Tags */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.sexual-tag {
    font-size: 0.85em;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
}
.like-tag {
    background-color: #1b5e20; /* Dark Green */
    color: #a5d6a7;
    border: 1px solid #388e3c;
}
.dislike-tag {
    background-color: #b71c1c; /* Dark Red */
    color: #ef9a9a;
    border: 1px solid #d32f2f;
}

/* --- character.css (REVISED Graphical Penis View) --- */

.penis-diagram-svg {
    width: 100%;
    /* Set a reasonable fixed height for the diagram */
    height: 100px; 
    display: block; 
}

/* Ensure the wrapper uses the dark background */
.penis-diagram-wrapper {
    margin: 10px 0 5px 0;
    padding: 10px;
    background-color: rgba(3, 8, 20, 0.7);
    border: 1px solid #1a2a4a;
    border-radius: 4px;
    /* CHANGE: Add a subtle glow/shadow to enhance the "scan" look */
    box-shadow: 0 0 10px rgba(102, 179, 255, 0.15); 
}

.penis-type-label {
    font-style: italic;
    color: #88aaff;
    font-size: 0.85em;
    text-align: right;
    margin-top: 5px; /* Add some space above label */
    margin-bottom: 0 !important;
}

/* --- character.css (APPEND) --- */

.char-profile-stats strong {
    color: #88aaff;
    display: inline-block;
    /* Adjusted width to align values, needs testing */
    width: 110px; 
}

/* BMI Display */
.bmi-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em; /* Slightly smaller for fit */
    color: #030814; /* Dark text for contrast against colored background */
}
.bmi-display strong {
    color: #88aaff;
    display: block;
    margin-bottom: 5px;
}

.bmi-bar {
    width: 25px; /* Small color block */
    height: 15px;
    border-radius: 2px;
    border: 1px solid #333;
}
.bmi-category {
    font-weight: 700;
    color: #e0e0e0;
}

.stat-badge-link {
    /* Base color override */
    color: #66b3ff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    
    /* Box appearance */
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #030814; /* Match sidebar background */
    border: 1px solid #1a2a4a;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stat-badge-link:hover {
    color: #ffffff !important;
    background-color: #1a2a4a; /* Slightly lighter on hover */
    border-color: #66b3ff;
}