@font-face {
    font-family: 'Alhambra';
    src: url("/static/name_generator/fonts/ALHAMBRA.b40b6fad6741.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Caesar Dressing';
    src: url("/static/name_generator/fonts/CaesarDressing-Regular.4afd385fc443.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'FranciscoLucasBriosa';
    src: url("/static/name_generator/fonts/FranciscoLucas Briosa.f5ca87c3bb67.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Harrington';
    src: url("/static/name_generator/fonts/Harrington.5fc7a6163c60.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Kohelet';
    src: url("/static/name_generator/fonts/Kohelet.f1a5185f9aa4.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Mason';
    src: url("/static/name_generator/fonts/mason.1ab6505e5f6a.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Odins Runes';
    src: url("/static/name_generator/fonts/Odins Runes Pro.03b20296265e.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SchaftstiefelKaputt';
    src: url("/static/name_generator/fonts/SchaftstiefelKaputt.3c8433afb67d.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tagettes';
    src: url("/static/name_generator/fonts/Tagettes.e223a6cbabb5.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'The Roman Runes Alliance';
    src: url("/static/name_generator/fonts/TheRomanRunesAlliance.4fe968b20e8a.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tolkien';
    src: url("/static/name_generator/fonts/Tolkien_Regular.a44a5c9cb024.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vinland';
    src: url("/static/name_generator/fonts/Vinland.326281551c01.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

.content-wrapper {
    position: relative;
    min-height: 500px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.content-sidebar-fixed {
    position: sticky;
    top: 80px;
    width: 100%;
    height: fit-content;
    max-height: calc(100vh - 100px);
    background-color: var(--parchment-bg);
    border: 2px solid var(--rpg-gold);
    border-radius: 0 8px 8px 0;
    z-index: 10;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.content-sidebar-fixed .nav-link {
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
}

.content-sidebar-fixed .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.content-sidebar-fixed .nav-link.active {
    background-color: #0d6efd;
    color: var(--white);
}

.content-sidebar-fixed::-webkit-scrollbar {
    width: 6px;
}

.content-sidebar-fixed::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.content-sidebar-fixed::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.content-sidebar-fixed::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.main-content-area {
    padding: 1rem;
    min-width: 0;
}

.main-content-area .card {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(197, 160, 89, 0.3);
    transition: all 0.2s ease-out;
}

.main-content-area .card:hover {
    transform: scale(1.05);
    background-color: #fcfaf2;
    border-color: var(--rpg-gold);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4);
    z-index: 5;
}

.text-female {
    color: #e83e8c !important;
}

.text-male {
    color: #3c3ee8 !important;
}

.ink-link {
    font-family: var(--font-main);
    color: var(--ink-dark);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: none !important;
    transition:
        transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.ink-link:hover {
    border-bottom-color: var(--rpg-red);
}

.clickable-name:hover {
    text-decoration: underline;
    color: #660000 !important;
}

.dsa-seal-mini {
    background-color: var(--rpg-red);
    color: var(--rpg-almond);
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    border: 1px solid var(--rpg-gold);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.border-scribe-thin {
    border-bottom: 1px solid rgba(43, 29, 14, 0.15);
}

.generated-name-block {
    transition:
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.2s ease,
        background-color 0.2s ease;
    position: relative;
    z-index: 1;
    border-radius: 4px;
    background-color: transparent;
}

.generated-name-block:hover {
    z-index: 10;
    transform: scale(1.5) translateY(-2px);
    background-color: #f8eee0;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.12),
        0 0 15px var(--magical-glow);
    cursor: pointer;
}

.generated-name-row {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.generated-name-row:hover {
    z-index: 10;
    transform: scale(1.02);
    background-color: #f8eee0 !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.1),
        0 0 10px var(--magical-glow);
}

.generated-name-block:hover .clickable-name,
.generated-name-row:hover .clickable-name {
    color: var(--rpg-red) !important;
    transition: color 0.2s ease;
}

.region-title-display {
    font-size: 2rem;
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    font-family: var(--region-font, serif);
    color: var(--rpg-red, #8b0000);
    border-bottom: 1px double var(--rpg-gold);
    transition: all 0.3s ease;
    --region-font: 'Mason';
}

.region-title-display[data-region^="alanfa"],
.region-title-display[data-region^="brabak"] {
    --region-font: 'FranciscoLucasBriosa';
}

.region-title-display[data-region^="almada"] {
    --region-font: 'Harrington';
    font-weight: bold;
}

.region-title-display[data-region^="andergast"],
.region-title-display[data-region^="nostria"] {
    --region-font: 'SchaftstiefelKaputt';
}

.region-title-display[data-region="elf"] {
    --region-font: 'Tolkien';
    font-weight: bold;
}

.region-title-display[data-region="fjarninger"],
.region-title-display[data-region="gjalsker"] {
    --region-font: 'Vinland';
    --region-weight: bold;
}

.region-title-display[data-region="horasreich"],
.region-title-display[data-region="horasreich_adel"] {
    --region-font: 'Tagettes';
    --region-weight: bold;
}

.region-title-display[data-region="maraskan"] {
    --region-font: 'Kohelet';
    --region-weight: normal;
}

.region-title-display[data-region="thorwal"] {
    font-family: 'Odins Runes', serif;
    font-weight: normal;
}

.region-title-display[data-region="tulamiden"] {
    --region-font: 'Alhambra';
    font-weight: 200;
}

.region-title-display[data-region="zwerg"] {
    --region-font: 'The Roman Runes Alliance';
    font-weight: bold;
}

.region-title-display[data-region="zyklopaeisch"],
.region-title-display[data-region="zyklopaeisch_adel"] {
    --region-font: 'Caesar Dressing';
    --region-weight: normal;
}

.save-notification {
    background: #fcfaf2;
    border: 2px solid var(--rpg-gold);
    color: var(--ink-dark);
    font-family: 'Baskerville', serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 1rem;
}

.save-notification.fade-out {
    opacity: 0;
}

.namegen-save-status {
    z-index: 1050;
}

.refresh-icon {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.9em;
    transition: transform 0.2s ease, color 0.2s ease;
}

.place-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.place-card {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.main-content-area .place-card:hover {
    transform: none;
    background-color: rgba(255, 255, 255, 0.55);
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: none;
}

.place-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.place-card-title {
    margin-bottom: 0;
}

.place-refresh-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rpg-red);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.place-refresh-button:hover .refresh-icon,
.place-refresh-button:focus-visible .refresh-icon {
    transform: rotate(180deg);
    color: var(--rpg-red);
}

.place-refresh-button:focus-visible {
    outline: 2px solid var(--rpg-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.place-name-list {
    display: grid;
    gap: 0.25rem;
}

.place-name-item {
    margin: 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(43, 29, 14, 0.1);
}

.place-name-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.name-table-card {
    background-color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(197, 160, 89, 0.3);
    overflow: hidden;
}

.name-table-card .table {
    margin-bottom: 0;
}

.name-table-card .generated-name-row:last-child td {
    border-bottom: 0;
}

.namegen-reference-card {
    background-color: rgba(255, 255, 255, 0.72);
}

.main-content-area .namegen-reference-card:hover {
    transform: none;
    background-color: rgba(255, 255, 255, 0.72);
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: none;
}

.namegen-reference-table-wrap {
    max-width: 52rem;
}

.namegen-reference-copy {
    max-width: 52rem;
}

.namegen-reference-copy ul {
    padding-left: 1.25rem;
}

.loge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.loge-card {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.main-content-area .loge-card:hover {
    transform: none;
    background-color: #fcfaf2;
    border-color: var(--rpg-gold);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.18);
}

.loge-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loge-meta-list {
    display: grid;
    gap: 0.75rem;
}

.loge-meta-item {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(43, 29, 14, 0.1);
}

.loge-meta-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.loge-info-btn {
    background: transparent;
    color: var(--rpg-red);
    line-height: 1;
}

.loge-info-btn:hover,
.loge-info-btn:focus-visible {
    color: var(--rpg-gold-dark);
    transform: scale(1.05);
}

.loge-info-symbol {
    font-size: 1.1rem;
}

.loge-mindset-card {
    padding: 0.5rem 0.75rem;
    background-color: rgba(248, 238, 224, 0.85);
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 0.35rem;
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-sidebar-fixed {
        position: static;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }

    .main-content-area {
        padding: 0;
    }
}
