/* ==================================================================
   Flash World Characters — Frontend Styles
   ================================================================== */

:root {
    --fwc-gold: #D4A853;
    --fwc-gold-dark: #C4943F;
    --fwc-bg: #FFF8EE;
    --fwc-card: #FFFFFF;
    --fwc-text: #2D2A26;
    --fwc-text-secondary: #6B6560;
    --fwc-border: #E8DFD3;
    --fwc-radius: 12px;
    --fwc-shadow: rgba(180, 150, 100, 0.12);
    --fwc-shadow-hover: rgba(180, 150, 100, 0.22);
}

/* ---- Archive ---- */
.fwc-archive-wrap {
    padding: 40px 0 60px;
    min-height: 60vh;
}
.fwc-archive-header {
    text-align: center;
    margin-bottom: 36px;
}
.fwc-archive-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--fwc-text);
    margin: 0 0 8px;
}
.fwc-archive-header p {
    color: var(--fwc-text-secondary);
    font-size: 16px;
    margin: 0;
}

.fwc-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.fwc-char-card {
    display: block;
    background: var(--fwc-card);
    border: 1px solid var(--fwc-border);
    border-radius: var(--fwc-radius);
    overflow: hidden;
    text-decoration: none !important;
    transition: transform 250ms ease, box-shadow 250ms ease;
}
.fwc-char-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--fwc-shadow-hover);
}

.fwc-char-card-portrait {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f5f0e8;
}
.fwc-char-card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fwc-char-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0e8;
    color: #ccc;
    font-size: 48px;
}

.fwc-char-card-body {
    padding: 14px;
    text-align: center;
}
.fwc-char-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--fwc-text);
    margin: 0 0 6px;
}
.fwc-char-card-role {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
    background: var(--fwc-text-secondary);
}
.fwc-role-protagonist { background: var(--fwc-gold); }
.fwc-role-antagonist  { background: #E85D4A; }
.fwc-role-supporting  { background: #5BA4CF; }
.fwc-role-mentor      { background: #7B68AE; }
.fwc-role-villain     { background: #C0392B; }

.fwc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--fwc-text-secondary);
}

.fwc-pagination {
    margin-top: 36px;
    text-align: center;
}

/* ---- Single ---- */
.fwc-single-wrap {
    padding: 40px 0 60px;
    min-height: 60vh;
}
.fwc-single-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
.fwc-single-portrait {
    flex-shrink: 0;
    width: 280px;
    border-radius: var(--fwc-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--fwc-shadow);
}
.fwc-single-portrait img {
    width: 100%;
    height: auto;
    display: block;
}
.fwc-placeholder-lg {
    width: 280px;
    height: 380px;
    font-size: 72px;
}

.fwc-single-content {
    flex: 1;
    min-width: 0;
}
.fwc-single-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--fwc-text);
    margin: 0 0 10px;
}
.fwc-single-bio {
    margin-top: 20px;
    color: var(--fwc-text-secondary);
    line-height: 1.7;
}

.fwc-single-titles {
    margin-top: 32px;
}
.fwc-single-titles h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--fwc-text);
    margin: 0 0 16px;
}
.fwc-titles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.fwc-title-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--fwc-card);
    border: 1px solid var(--fwc-border);
    border-radius: 8px;
    padding: 10px 16px;
    text-decoration: none !important;
    transition: box-shadow 250ms ease;
}
.fwc-title-card:hover {
    box-shadow: 0 4px 16px var(--fwc-shadow-hover);
}
.fwc-title-card-thumb {
    width: 45px;
    height: 63px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.fwc-title-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fwc-title-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--fwc-text);
}

.fwc-back-link {
    display: inline-block;
    margin-top: 32px;
    color: var(--fwc-gold) !important;
    font-weight: 600;
    text-decoration: none !important;
}
.fwc-back-link:hover {
    text-decoration: underline !important;
}

/* ---- Characters on Manga Single ---- */
.fwc-manga-characters {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--fwc-border);
}
.fwc-manga-characters-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--fwc-text);
    margin: 0 0 16px;
}
.fwc-characters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.fwc-char-card-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--fwc-card);
    border: 1px solid var(--fwc-border);
    border-radius: 8px;
    padding: 8px 14px;
    text-decoration: none !important;
    transition: box-shadow 250ms ease;
}
.fwc-char-card-mini:hover {
    box-shadow: 0 4px 12px var(--fwc-shadow-hover);
}
.fwc-char-card-mini-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.fwc-char-card-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fwc-char-card-mini-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--fwc-text);
}
.fwc-char-card-mini-role {
    font-size: 11px;
    color: var(--fwc-text-secondary);
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .fwc-single-layout {
        flex-direction: column;
    }
    .fwc-single-portrait {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    .fwc-characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}
