/* Wiki Pages Shared Stylesheet */
/* Uses theme variables from main.css for consistent theming */

/* Override body font-size for wiki pages - ensure minimum 12px */
body .wiki-page,
.wiki-page {
    font-size: 12px;
}

.wiki-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.wiki-header {
    text-align: center;
    margin-bottom: 40px;
}

.wiki-header h1 {
    font-family: Cinzel, Georgia, serif;
    font-size: 38px;
    color: var(--bronze-200);
    margin-bottom: 15px;
    text-transform: none;
}

.wiki-header p {
    font-size: 20px;
    color: var(--text-color);
    margin-top: 10px;
    opacity: 0.9;
    text-transform: none;
}

.wiki-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 12px 28px var(--shadow);
}

:root[data-theme="light"] .wiki-content {
    background: linear-gradient(180deg, var(--ink), var(--obsidian));
    border: 1px solid rgba(182,174,159,0.3);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.wiki-section {
    margin-bottom: 40px;
}

.wiki-section:last-child {
    margin-bottom: 0;
}

.wiki-section h2 {
    font-family: Cinzel, Georgia, serif;
    font-size: 30px;
    color: var(--bronze-200);
    margin-bottom: 20px;
    margin-top: 40px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--glow);
    text-transform: none;
}

.wiki-section h2:first-child {
    margin-top: 0;
}

.wiki-section h3 {
    font-family: Cinzel, Georgia, serif;
    font-size: 24px;
    color: var(--bronze-200);
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: none;
}

.wiki-section h4 {
    font-size: 20px;
    color: var(--bronze-200);
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: none;
}

.wiki-section p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-color);
    text-transform: none;
    font-size: 14px;
}

.wiki-reviewed {
    max-width: 1400px;
    margin: 12px auto 0;
    padding: 0 20px;
    font-size: 14px;
    line-height: 1.4;
    color: #e5e3de;
}

.wiki-crosslink {
    font-size: 14px;
    line-height: 1.5;
}

.wiki-crosslink a {
    color: var(--bronze-200);
}

.wiki-section ul, 
.wiki-section ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.wiki-section li {
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.7;
    text-transform: none;
    font-size: 14px;
}

.wiki-section strong {
    color: var(--bronze-200);
    font-weight: 600;
}

.wiki-link {
    color: var(--bronze-200);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--glow);
    transition: border-color 0.3s, color 0.3s;
}

.wiki-link:hover {
    border-bottom-color: var(--bronze-200);
    color: var(--bronze-200);
    text-decoration: none;
}

/* Tables */
.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255,255,255,0.02);
    font-size: 16px;
}

:root[data-theme="light"] .wiki-table {
    background: rgba(255,255,255,0.5);
}

.wiki-table th,
.wiki-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.wiki-table th {
    background: var(--glow);
    color: var(--bronze-200);
    font-weight: 600;
}

:root[data-theme="light"] .wiki-table th {
    background: rgba(182,174,159,0.3);
}

.wiki-table td {
    color: var(--text-color);
}

:root[data-theme="light"] .wiki-table td {
    color: var(--text-color);
}

.wiki-table tr:hover {
    background: rgba(255,255,255,0.05);
}

:root[data-theme="light"] .wiki-table tr:hover {
    background: rgba(0,0,0,0.05);
}

/* Table of Contents */
.toc {
    background: var(--glow);
    border: 1px solid var(--bronze);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

:root[data-theme="light"] .toc {
    background: rgba(182,174,159,0.2);
    border: 1px solid rgba(182,174,159,0.4);
}

.toc h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--bronze-200);
    text-transform: none;
}

.toc ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: var(--bronze-200);
    text-decoration: none;
    transition: color 0.3s;
}

.toc a:hover {
    color: var(--bronze);
    text-decoration: underline;
}

/* Highlight boxes */
.highlight-box {
    background: var(--glow);
    border-left: 4px solid var(--bronze-200);
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
}

:root[data-theme="light"] .highlight-box {
    background: rgba(182,174,159,0.2);
}

.highlight-box p {
    margin: 5px 0;
}

.warning-box {
    background: rgba(179,67,67,0.15);
    border-left: 4px solid var(--crimson);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

:root[data-theme="light"] .warning-box {
    background: rgba(142,58,58,0.2);
}

.formula-box {
    background: rgba(100,150,200,0.1);
    border-left: 4px solid #6496c8;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-family: monospace;
    overflow-x: auto;
}

:root[data-theme="light"] .formula-box {
    background: rgba(100,150,200,0.15);
}

.example-box {
    background: var(--glow);
    border-left: 4px solid var(--bronze-200);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
}

:root[data-theme="light"] .example-box {
    background: rgba(182,174,159,0.2);
}

.example-box p {
    margin: 5px 0;
    color: var(--text-color);
}

/* Category cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.category-card {
    background: var(--glow);
    border: 1px solid var(--bronze);
    border-radius: 8px;
    padding: 20px;
}

:root[data-theme="light"] .category-card {
    background: rgba(182,174,159,0.2);
    border: 1px solid rgba(182,174,159,0.4);
}

.category-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--bronze-200);
}

.category-card ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.category-card li {
    margin-bottom: 8px;
}

/* Quick reference items */
.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.quick-ref-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
}

:root[data-theme="light"] .quick-ref-item {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
}

.quick-ref-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.quick-ref-item ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.quick-ref-item li {
    margin-bottom: 6px;
    font-size: 16px;
}

/* Building entries */
.building-entry {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

:root[data-theme="light"] .building-entry {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.building-entry:last-child {
    border-bottom: none;
}

.building-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--bronze-200);
    margin-bottom: 10px;
    text-transform: none;
}

.building-requirements {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
    text-transform: none;
}

:root[data-theme="light"] .building-requirements {
    opacity: 0.7;
}

/* Credit notes */
.credit-note {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: none;
}

:root[data-theme="light"] .credit-note {
    opacity: 0.6;
}

/* Sub-sections */
.sub-section {
    margin-left: 20px;
    margin-top: 20px;
}

/* Resource icons */
.resource-icon {
    font-weight: 600;
    color: var(--bronze-200);
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 30px 0;
}

:root[data-theme="light"] hr {
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wiki-page {
        padding: 10px;
    }
    
    .wiki-content {
        padding: 20px;
    }
    
    .wiki-header h1 {
        font-size: 30px;
    }
    
    .wiki-section h2 {
        font-size: 26px;
    }
    
    .category-grid,
    .quick-ref-grid {
        grid-template-columns: 1fr;
    }
}

/* Game Guides Page - Modern Card Design */
.guide-section {
    margin-bottom: 60px;
}

.guide-section:last-child {
    margin-bottom: 0;
}

.guide-section > h2 {
    font-family: Cinzel, Georgia, serif;
    font-size: 32px;
    color: var(--bronze-200);
    margin-bottom: 12px;
    margin-top: 50px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--glow);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-section > h2:first-child {
    margin-top: 0;
}

.guide-section > h2::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(180deg, var(--bronze-200), var(--bronze));
    border-radius: 2px;
}

.guide-section > p {
    font-size: 16px;
    color: var(--text-color);
    opacity: 0.85;
    margin-bottom: 30px;
    line-height: 1.6;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.guide-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bronze-200), var(--bronze), var(--bronze-200));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: var(--bronze-200);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
}

.guide-card:hover::before {
    opacity: 1;
}

.guide-card h4 {
    font-family: Cinzel, Georgia, serif;
    font-size: 20px;
    color: var(--bronze-200);
    margin: 0 0 12px 0;
    font-weight: 600;
    line-height: 1.3;
}

.guide-card > p {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0 0 16px 0;
    opacity: 0.9;
    flex-grow: 1;
}

.guide-card .author {
    font-size: 13px;
    color: var(--bronze-600);
    margin: 0 0 16px 0;
    font-style: italic;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-card .author::before {
    content: '✍';
    font-style: normal;
    opacity: 0.7;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(199, 168, 107, 0.15);
    border: 1px solid rgba(199, 168, 107, 0.3);
    border-radius: 6px;
    color: var(--bronze-200);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
    width: fit-content;
}

.guide-link:hover {
    background: rgba(199, 168, 107, 0.25);
    border-color: var(--bronze-200);
    color: var(--bronze);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(199, 168, 107, 0.2);
}

.guide-link::after {
    content: '→';
    transition: transform 0.3s ease;
    display: inline-block;
}

.guide-link:hover::after {
    transform: translateX(4px);
}

:root[data-theme="light"] .guide-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4));
    border-color: rgba(182,174,159,0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .guide-card:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
    border-color: var(--bronze-600);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .guide-section > h2::before {
    background: linear-gradient(180deg, var(--bronze-600), var(--bronze-800));
}

:root[data-theme="light"] .guide-link {
    background: rgba(182,174,159,0.2);
    border-color: rgba(182,174,159,0.4);
    color: var(--bronze-600);
}

:root[data-theme="light"] .guide-link:hover {
    background: rgba(182,174,159,0.3);
    border-color: var(--bronze-600);
    box-shadow: 0 4px 12px rgba(182,174,159,0.15);
}

@media (max-width: 768px) {
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .guide-section > h2 {
        font-size: 26px;
    }
    
    .guide-section > p {
        font-size: 14px;
    }
    
    .guide-card {
        padding: 20px;
    }
    
    .guide-card h4 {
        font-size: 18px;
    }
}

/* Units and Troops Container Styles */
.units-container,
.troops-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Unit Card Styles */
.unit-card-full {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px var(--shadow);
}

:root[data-theme="light"] .unit-card-full {
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
    border: 1px solid rgba(0,0,0,0.1);
}

.unit-header-full {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.unit-icon-img-full {
    width: 48px;
    height: 48px;
}

.unit-name-full {
    font-size: 18px;
    font-weight: 600;
    color: var(--bronze-200);
}

.unit-stats-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unit-stat-row-full {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.unit-stat-row-full:last-child {
    border-bottom: none;
}

/* Troop Card Styles */
.troop-card-full {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px var(--shadow);
}

:root[data-theme="light"] .troop-card-full {
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
    border: 1px solid rgba(0,0,0,0.1);
}

.troop-header-full {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.troop-icon-img-full {
    width: 48px;
    height: 48px;
}

.troop-name-full {
    font-size: 18px;
    font-weight: 600;
    color: var(--bronze-200);
}

.troop-type-full {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 4px;
}

.troop-description-full {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.troop-stats-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.troop-stat-row-full {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.troop-stat-row-full:last-child {
    border-bottom: none;
}

/* Shared Stat Styles */
.stat-label-full {
    color: #aaa;
    font-weight: 500;
}

.stat-value-full {
    color: var(--bronze-200);
    font-weight: 600;
}

:root[data-theme="light"] .stat-label-full {
    color: #666;
}

:root[data-theme="light"] .stat-value-full {
    color: var(--bronze-600);
}

@media (max-width: 768px) {
    .units-container,
    .troops-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .unit-card-full,
    .troop-card-full {
        padding: 12px;
    }
    
    .unit-name-full,
    .troop-name-full {
        font-size: 16px;
    }
}

