*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #0b0b0d;
    --card-bg: #131317;
    --border-color: #272730;
    --gold-color: #c5a059;
    --gold-hover: #e2ba6e;
    --text-main: #e2e2e8;
    --text-muted: #8a8a95;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* HEADER */
header {
    width: 100%;
    max-width: 960px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-logo {
    font-family: var(--font-serif);
    color: var(--gold-color);
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-badge {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    color: var(--gold-color);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* MAIN LAYOUT & CARD CONTAINER */
main {
    width: 100%;
    max-width: 960px;
    margin: auto 0;
}

.card-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: row;
    gap: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* FLEX COLUMN 1: DESCRIPTION */
.info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.role-subtitle {
    font-family: var(--font-serif);
    color: var(--gold-color);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.character-name {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.character-name span {
    color: var(--gold-color);
    font-weight: 400;
}

.divider {
    width: 50px;
    height: 2px;
    background-color: var(--gold-color);
    margin-bottom: 20px;
}

.bio-text {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.quote-box {
    background-color: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--gold-color);
    padding: 12px 16px;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 24px;
    border-radius: 0 6px 6px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    font-size: 0.85rem;
}

.detail-item .label {
    color: var(--text-muted);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item .value {
    color: #ffffff;
    font-weight: 600;
}

/* FLEX COLUMN 2: JS SLIDER */
.slider-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #000000;
}

.slide-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback styling for images if missing locally */
.image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #181820 0%, #0c0c0e 100%);
    color: var(--gold-color);
    text-align: center;
    padding: 20px;
    border: 1px dashed var(--border-color);
}

.image-fallback-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.image-fallback-path {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 4px;
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    z-index: 2;
    pointer-events: none;
}

.slide-num {
    color: var(--gold-color);
    font-size: 0.7rem;
    font-family: var(--font-serif);
    letter-spacing: 2px;
    display: block;
}

.slide-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-family: var(--font-serif);
}

/* SLIDER NAV BUTTONS */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    color: var(--gold-color);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.nav-btn:hover {
    background-color: var(--gold-color);
    color: #000000;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* DOTS PAGINATION */
.dots-container {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background-color: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 24px;
    background-color: var(--gold-color);
}

/* FOOTER */
footer {
    width: 100%;
    max-width: 960px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 30px;
    letter-spacing: 1px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .card-container {
        flex-direction: column;
        padding: 20px;
    }

    .slider-wrapper {
        height: 260px;
    }

    .character-name {
        font-size: 1.8rem;
    }
}
