/* Base text classes */
.speech {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    color: #000;
    margin-left: 1rem;
}

.song {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-style: italic;
    color: #000;
    margin-left: 2rem;
}

.direction {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    color: #000;
    background-color: #f7f7f9; /* light background for directions */
    padding: 0.25rem 0.5rem;
    border-left: 3px solid #ddd;
    margin-left: 1rem;
}

/* Hover effect on directions */
.direction:hover {
    background-color: #333;
    color: #fff;
}

/* Character name heading */
.name {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 0.95rem; /* smallish heading */
    color: #000;
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.1rem;
    text-transform: uppercase;
}

/* Also support existing .speaker headings without changing HTML */
.speaker {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    color: #000;
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.1rem;
    text-transform: uppercase;
}

/* Part 9: Hover effect for character name headings */
.name:hover,
.speaker:hover {
    text-shadow: 0 0 6px rgba(143, 0, 255, 0.55), 0 2px 4px rgba(0,0,0,0.25);
    border: 2px solid #8f00ff;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(143,0,255,0.08), rgba(11,94,215,0.08));
    transition: all 160ms ease-in-out;
}

/* Character-specific styles (both full names and 3-letter abbreviations) */
.scaphio, .sca { color: #b00020; /* deep red */ }
.phantis, .phan { color: #0b5ed7; /* royal blue */ }
.king, .kin { color: #2d6a4f; /* deep green */ }
.both { color: #8f00ff; /* purple for combined lines */ }

/* Group styles */
.chorus { color: #9c6f00; font-weight: 600; }
.girls { color: #ad1457; }
.men { color: #1565c0; }

/* Optional recitative styling to complement existing markup */
.recit {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    color: #000;
    margin: 0.75rem 0 0.25rem 1rem;
    font-variant: small-caps;
}

/* Table styling for Part 7 */
.cast-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
.cast-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.cast-table th,
.cast-table td {
    border: 1px solid #cfd8dc;
    padding: 0.6rem 0.75rem;
}
.cast-table thead th {
    background: #263238;
    color: #fff;
    text-align: left;
}
.cast-table tbody tr:nth-child(odd) {
    background: #f5f7f8;
}
.cast-table tbody tr:nth-child(even) {
    background: #ffffff;
}
.cast-table tbody td:nth-child(1) { /* Character */
    font-weight: 600;
}
.cast-table tbody td:nth-child(3) { /* Offer */
    text-align: right;
}
.table-wrap { margin: 2rem 0; }

/* Bonus: icons and navbar */
.icon { width: 2em; height: 2em; vertical-align: -0.25em; margin-right: 0.5em; }
.figure { margin: 1rem 0 1.5rem; text-align: center; }
.figure img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
.figure figcaption { font-size: 0.9rem; color: #555; margin-top: 0.4rem; }

.bottom-nav { position: sticky; bottom: 0; background: #111; border-top: 1px solid #333; padding: 0.5rem 0; margin-top: 2rem; }
.bottom-nav ul { list-style: none; display: flex; gap: 1rem; justify-content: center; margin: 0; padding: 0; }
.bottom-nav a { color: #e6e6e6; text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.4rem; }
.bottom-nav a:hover { background: #242424; color: #fff; }
