.manual-page .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.manual-page .py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}
/* Custom styles for the application */
/* Background color is defined in base template */

/* Consolidated styles extracted from twig templates */

:root {
    --bg-img-url: url("https://upload.wikimedia.org/wikipedia/commons/5/53/Cartel-no-pasaran-madrid-cke.jpg");
}

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

.app-body {
    min-height: 100vh;
    font-family: "Courier Prime", "Courier New", monospace;
    background: #f5f1e9;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 4px 4px;
    color: #1a1a1a;
    overflow-x: hidden;
}

.app-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-img-url);
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: grayscale(1) contrast(0.8);
    pointer-events: none;
    z-index: -1;
}

.wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.manual-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.manual-downloads .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 12rem;
}

@media (max-width: 768px) {
    .manual-downloads {
        justify-content: center;
    }

    .manual-downloads .btn {
        flex: 1 1 100%;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #333;
    background: #f5f1e9;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn:hover {
    background: #e9e5dc;
    text-decoration: none;
    color: inherit;
}

.btn-primary {
    background: #1a1a1a;
    color: #f5f1e9;
    border-color: #1a1a1a;
}

.btn-primary:hover {
    background: #333;
    color: #f5f1e9;
}

.btn-success {
    background: #2d5a2d;
    color: #f5f1e9;
    border-color: #2d5a2d;
}

.btn-success:hover {
    background: #3a6b3a;
    color: #f5f1e9;
}

.btn-danger {
    background: #5a2d2d;
    color: #f5f1e9;
    border-color: #5a2d2d;
}

.btn-danger:hover {
    background: #6b3a3a;
    color: #f5f1e9;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.card {
    background: #fbf8f4;
    border: 2px dotted #666;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    backdrop-filter: blur(2px);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid;
    background: #fbf8f4;
}

.alert-success {
    border-color: #2d5a2d;
    color: #2d5a2d;
}

.alert-danger {
    border-color: #5a2d2d;
    color: #5a2d2d;
}

.alert-warning {
    border-color: #5a4d2d;
    color: #5a4d2d;
}

.breadcrumb {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
}

.breadcrumb-item a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #666;
    background: #fbf8f4;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #fff;
}

.badge {
    padding: 0.25rem 0.5rem;
    background: #1a1a1a;
    color: #f5f1e9;
    font-size: 0.8rem;
    border-radius: 4px;
}

.text-muted { color: #666; }
.text-primary { color: #1a1a1a; }
.text-center { text-align: center; }
.text-end-head { width: 250px; margin-right: 30px; }
.text-end { text-align: right; width: 135px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-12 { flex: 0 0 100%; padding: 0 0.75rem; }
.col-md-6 { flex: 0 0 50%; padding: 0 0.75rem; }
.col-md-4 { flex: 0 0 33.333333%; padding: 0 0.75rem; }
.col-md-3 { flex: 0 0 25%; padding: 0 0.75rem; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.small { font-size: 0.85rem; }
.lead { font-size: 1.25rem; font-weight: 400; }
.display-4 { font-size: 2.5rem; font-weight: 700; }
.h-100 { height: 100%; }
.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.rounded { border-radius: 4px; }
.border { border: 2px solid #666; }
.border-left { border-left: 4px solid #1a1a1a; }
.position-relative { position: relative; }

.input-group {
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-radius: 0;
    border-left: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
    margin-left: 1rem;
}

.btn-close:hover {
    opacity: 0.7;
}

.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.fade.show {
    opacity: 1;
}

.collapse { display: none; }
.collapse.show { display: block; }

.navbar-toggler {
    display: none;
    background: none;
    border: 2px solid #333;
    padding: 0.5rem;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

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

    .col-md-6,
    .col-md-4,
    .col-md-3 {
        flex: 0 0 100%;
    }

    .navbar-toggler {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
    }

    .nav-menu.show {
        display: flex;
    }

    header {
        flex-direction: column;
        align-items: stretch;
    }

    .builder-grid {
        grid-template-columns: 1fr;
    }
}

.unit-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    margin-bottom: 1rem;
}

.unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-table { font-size: 0.9em; }
.cost-display { font-size: 1.2em; font-weight: bold; }
.selected-units { background-color: #f8f9fa; border-left: 4px solid #1a1a1a; }
.units-panel { }
.category-title { font-size: 1.3rem; font-weight: bold; color: #1a1a1a; border-bottom: 2px solid #666; padding-bottom: 0.5rem; margin-bottom: 1rem; }
.unit-name { font-size: 1.2rem; font-weight: bold; color: #1a1a1a; }
.units-list { margin-bottom: 2rem; }

ul.unit-list {
    max-height: 60vh;
    overflow-y: auto;
    list-style: none;
    padding-right: 0.25rem;
}

ul.unit-list li {
    padding: 0.25rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
}

ul.unit-list li:hover {
    background: rgba(0, 0, 0, 0.08);
}

.unit-item { font-weight: 600; }
.total { text-align: right; font-weight: 700; font-size: 1.25rem; margin-top: 1rem; }

.rules-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.rules-list .badge {
    margin: 0;
}

.rules-list .rule-name {
    color: #fff;
}

.category-units {
    margin-top: 1rem;
}

.army-list-skill h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    margin-top: 0.5rem;
}

.subcategory-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.selected-unit-card.upgradeable-unit {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.selected-unit-card.upgradeable-unit:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0 0.5rem;
    flex-wrap: wrap;
}

.stats-grid.stats-table {
    display: flex;
}

.stats-table {
    display: contents;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #1a1a1a;
    line-height: 1.2;
}

.upgrades-popup {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    max-width: 300px;
    z-index: 1000;
    display: none;
}

.upgrade-connection-area {
    position: fixed;
    background: rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    z-index: 999;
    display: none;
}

.error-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.error-content {
    background: #fbf8f4;
    border: 2px solid #5a2d2d;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.error-header h4 {
    margin: 0;
    color: #5a2d2d;
    font-weight: bold;
}

.error-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #5a2d2d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.error-close:hover {
    background-color: #f0f0f0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fbf8f4;
    border: 2px solid #666;
    border-radius: 0.375rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    gap: 0.5rem;
}

#error-message {
    color: #5a2d2d;
    line-height: 1.5;
}

.upgrade-item,
.selected-upgrade-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.selected-upgrade-item:last-child,
.upgrade-item:last-child {
    border-bottom: none;
}

#upgrades-popup {
    display: none;
}

.manual-page .manual-content {
    line-height: 1.8;
}

.manual-page .manual-content h2,
.manual-page .manual-content h3,
.manual-page .manual-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.manual-page .manual-section-content {
    font-size: 1.05rem;
    overflow-wrap: normal;
    overflow-x: auto;
}

.manual-page .manual-section-content p:last-child {
    margin-bottom: 0;
}

.manual-page .manual-section-content ul,
.manual-page .manual-section-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.manual-page .manual-section-content table {
    width: auto;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    table-layout: auto;
    display: table;
}

.manual-table-wrapper,
.manual-page .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.manual-page .manual-section-content th,
.manual-page .manual-section-content td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
    hyphens: none;
}

.manual-page .manual-section-content pre {
    overflow-x: auto;
    max-width: 100%;
    background: #f8f9fa;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}

.manual-page .manual-section-content code {
    white-space: pre-wrap;
    word-break: break-word;
}

.manual-page .manual-section-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.rule-popup {
    position: absolute;
    background: #fbf8f4;
    border: 2px solid #666;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
    padding: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    display: none;
    pointer-events: none;
}

.rule-name {
    cursor: help;
    color: inherit;
    text-decoration: none;
}

.faction-flag {
    width: 32px;
    height: 22px;
    vertical-align: middle;
    margin-right: 8px;
}

.category-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.u-fs-220 { font-size: 2.2rem; }
.u-fs-200 { font-size: 2rem; }
.u-fs-170 { font-size: 1.7rem; }
.u-fs-150 { font-size: 1.5rem; }
.u-fs-125 { font-size: 1.25rem; }
.u-fs-110 { font-size: 1.1rem; }
.u-fs-18 { font-size: 18px; }
.u-fs-12 { font-size: 12px; }

.u-mt-10 { margin-top: 10px; }
.u-mt-5 { margin-top: 5px; }

.u-gap-12 { gap: 0.75rem; }

.upgrades-list {
    margin: 5px 0;
    padding-left: 20px;
}

.stat-column {
    width: 1.4em;
    text-align: center;
}

.campaign-form-error {
    color: #5a2d2d;
}

.campaign-troop-row-turn1 {
    background: rgba(240, 196, 25, 0.12);
}

.campaign-troop-turn1-badge {
    background: #f0c419;
    color: #1a1a1a;
}

.campaign-hexgrid-container {
    min-height: 300px;
}

#campaignHexGrid.hex-grid,
#campaignTroopsHexGrid.hex-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    --hex-width: 60px;
    --hex-height: 52px;
    padding-bottom: 30px;
    padding-left: 10px;
}

#campaignHexGrid .hex-col,
#campaignTroopsHexGrid .hex-col {
    display: flex;
    flex-direction: column;
    margin-left: -15px;
    pointer-events: none;
}

#campaignHexGrid .hex-col:first-child,
#campaignTroopsHexGrid .hex-col:first-child {
    margin-left: 0;
}

#campaignHexGrid .hex-col:nth-child(even),
#campaignTroopsHexGrid .hex-col:nth-child(even) {
    margin-top: 27px;
}

#campaignHexGrid .hex,
#campaignTroopsHexGrid .hex {
    width: var(--hex-width);
    height: var(--hex-height);
    background-color: #e0e0e0;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
    font-size: 10px;
    color: #666;
    margin: 0;
    pointer-events: auto;
}

#campaignHexGrid .hex:hover,
#campaignTroopsHexGrid .hex:hover {
    transform: scale(1.1);
    z-index: 100 !important;
    border: 1px solid #333;
}

#campaignHexGrid .hex.has-overlay,
#campaignTroopsHexGrid .hex.has-overlay {
    z-index: 20;
}

#campaignHexGrid .hex.campaign-objective,
#campaignTroopsHexGrid .hex.campaign-objective {
    box-shadow: inset 0 0 0 4px #f0c419;
}

#campaignHexGrid .hex.campaign-entry-republican,
#campaignTroopsHexGrid .hex.campaign-entry-republican {
    box-shadow: inset 0 0 0 4px #1b6ec2;
}

#campaignHexGrid .hex.campaign-entry-nationalist,
#campaignTroopsHexGrid .hex.campaign-entry-nationalist {
    box-shadow: inset 0 0 0 4px #b02a37;
}

#campaignHexGrid .hex.campaign-objective.campaign-entry-republican,
#campaignTroopsHexGrid .hex.campaign-objective.campaign-entry-republican {
    box-shadow: inset 0 0 0 4px #1b6ec2, inset 0 0 0 7px #f0c419;
}

#campaignHexGrid .hex.campaign-objective.campaign-entry-nationalist,
#campaignTroopsHexGrid .hex.campaign-objective.campaign-entry-nationalist {
    box-shadow: inset 0 0 0 4px #b02a37, inset 0 0 0 7px #f0c419;
}

#campaignHexGrid .hex.plain,
#campaignTroopsHexGrid .hex.plain { background-color: #90EE90; }
#campaignHexGrid .hex.hill,
#campaignTroopsHexGrid .hex.hill { background-color: #DEB887; }
#campaignHexGrid .hex.mountain,
#campaignTroopsHexGrid .hex.mountain { background-color: #808080; }
#campaignHexGrid .hex.settlement,
#campaignTroopsHexGrid .hex.settlement { background-color: #CD5C5C; }

#campaignHexGrid .line-overlay,
#campaignTroopsHexGrid .line-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: top center;
    z-index: 30;
    pointer-events: none;
    display: block;
    width: 20px;
    height: 30px;
    margin-left: -10px;
}

#campaignHexGrid .dir-1,
#campaignTroopsHexGrid .dir-1 { transform: rotate(120deg); }
#campaignHexGrid .dir-2,
#campaignTroopsHexGrid .dir-2 { transform: rotate(180deg); }
#campaignHexGrid .dir-3,
#campaignTroopsHexGrid .dir-3 { transform: rotate(240deg); }
#campaignHexGrid .dir-4,
#campaignTroopsHexGrid .dir-4 { transform: rotate(300deg); }
#campaignHexGrid .dir-5,
#campaignTroopsHexGrid .dir-5 { transform: rotate(0deg); }
#campaignHexGrid .dir-6,
#campaignTroopsHexGrid .dir-6 { transform: rotate(60deg); }

.campaign-troops-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.campaign-troop-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    border: 2px dotted #666;
    cursor: pointer;
}

.campaign-troop-item.is-active {
    border-style: solid;
    border-color: #333;
    background: #f5f1e9;
}

.campaign-troop-item.is-pending .campaign-troop-status {
    color: #5a2d2d;
    font-weight: bold;
}

.campaign-troop-status {
    font-size: 0.9rem;
}

.campaign-troop-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 4px;
    border: 1px solid #333;
    background: rgba(245, 241, 233, 0.9);
    pointer-events: none;
}

.campaign-troop-marker.segment {
    opacity: 0.7;
}

.campaign-troop-marker.side-republican {
    border-color: #1b6ec2;
}

.campaign-troop-marker.side-nationalist {
    border-color: #b02a37;
}

.is-hidden { display: none !important; }
.d-inline { display: inline; }

/* PDF manual styles */
.pdf-manual {
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    margin: 20px;
    color: #1a1a1a;
}

.pdf-manual h1,
.pdf-manual h2,
.pdf-manual h3,
.pdf-manual h4 {
    color: #2c3e50;
    margin-top: 16px;
    margin-bottom: 10px;
}

.pdf-manual .header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.pdf-generated-at {
    font-size: 12px;
    color: #666;
}

.pdf-manual .manual-content {
    line-height: 1.8;
}

.pdf-manual .card {
    background: #fbf8f4;
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: none;
}

.pdf-manual .card-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.manual-heading {
    margin: 0;
    font-size: 18px;
}

.pdf-manual .manual-section-content {
    font-size: 13px;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.pdf-manual .manual-section-content p {
    margin: 0 0 10px 0;
}

.pdf-manual .manual-section-content ul,
.pdf-manual .manual-section-content ol {
    padding-left: 18px;
    margin: 0 0 10px 18px;
}

.pdf-manual .manual-section-content pre {
    overflow-x: auto;
    max-width: 100%;
    background: #f8f9fa;
    padding: 6px;
    border: 1px solid #dee2e6;
}

.pdf-manual .manual-section-content code {
    white-space: pre-wrap;
    word-break: break-word;
}

.pdf-manual .manual-section-content table,
.pdf-manual .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    table-layout: auto;
}

.pdf-manual .manual-section-content th,
.pdf-manual .manual-section-content td,
.pdf-manual .table th,
.pdf-manual .table td {
    padding: 6px;
    border: 1px solid #dee2e6;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
    white-space: normal;
    hyphens: none;
}

.pdf-manual .manual-section-content th,
.pdf-manual .table th {
    background-color: #f8f9fa;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    hyphens: none;
}

.pdf-manual .manual-section-content td,
.pdf-manual .table td {
    text-align: center;
}

.manual-empty {
    text-align: center;
    color: #666;
}

.pdf-manual .manual-index {
    margin: 0;
    padding-left: 18px;
}

.pdf-manual .manual-index li {
    margin-bottom: 6px;
}

.pdf-manual .manual-index a {
    color: #1a1a1a;
    text-decoration: none;
}

.pdf-manual .manual-index a:hover,
.pdf-manual .manual-index a:focus {
    text-decoration: underline;
}

.pdf-manual .manual-table {
    width: auto;
    table-layout: auto;
}

.pdf-manual .footer {
    border-top: 1px solid #ddd;
    margin-top: 24px;
    padding-top: 8px;
    font-size: 10px;
    text-align: center;
    color: #666;
}

/* PDF army list styles */
.pdf-army {
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    padding: 20px;
}

.pdf-army .header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.pdf-army .title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.pdf-army .subtitle {
    font-size: 16px;
    color: #666;
    margin: 5px 0;
}

.pdf-army .info-section {
    margin-bottom: 20px;
}

.pdf-army .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.pdf-army .units-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pdf-army .units-table th,
.pdf-army .units-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.pdf-army .units-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.pdf-army .stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.pdf-army .stats-table th,
.pdf-army .stats-table td {
    border: 1px solid #ddd;
    padding: 4px;
    text-align: center;
}

.pdf-army .stats-table th {
    background-color: #f0f0f0;
}

.pdf-army .total-section {
    border-top: 2px solid #333;
    padding-top: 15px;
    text-align: right;
}

.pdf-army .total-cost {
    font-size: 18px;
    font-weight: bold;
}

.pdf-army .footer {
    margin-top: 30px;
    text-align: center;
    font-size: 10px;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.pdf-army .unit-details {
    margin-bottom: 15px;
}

.pdf-army .unit-name {
    font-weight: bold;
    font-size: 14px;
}

.pdf-army .unit-info {
    margin-left: 20px;
    margin-top: 5px;
}

.pdf-army .pdf-upgrades {
    margin-top: 10px;
}

.pdf-army .pdf-upgrades-list {
    margin: 5px 0;
    padding-left: 20px;
}

.pdf-army .pdf-upgrades-total {
    margin-top: 5px;
}
