/* =========================================================
   CHARACTER PAGE STYLES
   ========================================================= */

/* ================== MAIN CONTAINER ================== */
.characters-container {
    max-width: 1100px; /* Increase width for a more spacious layout */
    margin: 40px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #7b0202;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(139, 0, 0, 0.6);
}

/* ================== PAGE TITLE ================== */
.characters-container h1 {
    text-align: center;
    color: #c5c5c5;
    font-size: 2.5em;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* ================== BOOK SECTION TITLE ================== */
.book-section {
    text-align: center;
    font-size: 2em;
    color: #c5c5c5;
    margin: 50px auto 20px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid #7b0202;
    padding-bottom: 10px;
    max-width: 80%;
}

/* ================== SECTION TITLE (e.g., "Main Characters") ================== */
.section-title {
    width: 100%;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    text-transform: uppercase;
    color: #c5c5c5;
    margin: 30px 0;
    border-bottom: 2px solid #7b0202;
    padding-bottom: 10px;
}

/* ================== CHARACTER GRID ================== */
.character-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly; /* More even distribution */
    gap: 20px;
    padding: 20px 0;
}

/* ================== CHARACTER CARD ================== */
.character-card {
    /* Instead of width: 280px; use max-width and allow it to shrink */
    max-width: 280px;
    width: 100%;
    margin: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #7b0202;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
}

.character-card:hover {
    transform: scale(1.03);
    box-shadow: 0px 0px 12px rgba(139, 0, 0, 0.7);
}

/* ================== CHARACTER IMAGE ================== */
.character-card img {
    /* Make the image scale with the card */
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #7b0202;
    display: block;
    margin: 0 auto 10px;
}


/* ================== CHARACTER NAME ================== */
.character-card h3 {
    font-size: 1.5em;
    color: #c5c5c5;
    text-transform: uppercase;
    margin: 10px 0;
}

/* ================== CHARACTER DESCRIPTION ================== */
.character-card p {
    font-size: 1.1em;
    color: #c8c7c7;
    margin-top: 5px;
}

/* ================== CHARACTER TRAITS ================== */
.character-traits {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 0;
}

.character-traits li {
    font-size: 1em;
    color: #c5c5c5;
    margin-bottom: 5px;
}

.character-traits li::before {
    content: "❖";
    color: #7b0202;
    font-size: 1.2em;
    margin-right: 8px;
}

/* ================== BOOK SELECTION DROPDOWN ================== */
.book-selection-container {
    display: flex;
    flex-direction: column;  /* Stacks label and dropdown vertically */
    text-align: center;
    align-items: center;
    margin: 20px auto;       /* Centers the container with vertical spacing */
    max-width: 350px;        /* Limit width for a neat appearance */
    background: rgba(0, 0, 0, 0.6);  /* Semi-transparent dark background */
    border: 2px solid #7b0202;      /* Blood-red border to match theme */
    padding: 15px;
    border-radius: 5px;
}

.book-selection-container label {
    font-size: 1em;
    color: #c5c5c5;
    margin-bottom: 8px;  /* Space between label and dropdown */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================== BOOK SELECTION DROPDOWN ================== */
.book-selection-container select {
    background: #0d0d0d;
    color: #c5c5c5;
    border: 2px solid #7b0202;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 1em;
    width: 100%;
    cursor: pointer;
    text-align: center;      /* Fallback for older browsers */
    text-align-last: center; /* Modern browsers */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;

    /* Removes default OS arrow in some browsers */
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none;
}

/* Ensure each <option> is also centered */
.book-selection-container select option {
    text-align: center;
}

.book-selection-container select:focus,
.book-selection-container select:hover {
    outline: none;
    border-color: #a30000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.7);
}

/* Option styling - might be partially or fully ignored on some OS/browsers */
.book-selection-container select option {
    background-color: #1a1a1a; /* Dark background for each option */
    color: #c5c5c5;            /* Light text */
    text-align: center;        /* Centered text */
    padding: 5px;              /* Some spacing */
    /* No transition or hover states typically apply here */
}

/* ====== Custom Spoiler Modal ====== */
.spoiler-modal {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    background: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 9999; /* Above all other elements */
}

.spoiler-modal-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 20px;
    border: 2px solid #7b0202;
    border-radius: 5px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.7);
    color: #c5c5c5;
    font-family: 'Cinzel Decorative', serif; /* Match your gothic theme font */
}

.spoiler-modal-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.4;
}

.spoiler-modal-buttons {
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
}

.spoiler-modal-buttons button {
    background: #7b0202;
    color: #fff;
    border: 2px solid #a30000;
    border-radius: 5px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit; /* Inherit from the parent so it matches the theme */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.spoiler-modal-buttons button:hover {
    background: #a30000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.7);
}


