/* ===== WIKI PAGE STYLES - L2 AETHERIS ===== */
/* Based on L2Legacy design with L2 Aetheris colors */

/* ===== CONTENT BANNER ===== */
.wiki-banner {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--wiki-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.wiki-banner > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.wiki-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(27, 22, 17, 0.9) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.wiki-banner-overlay h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.wiki-banner-overlay p {
    color: var(--wiki-gold-light);
    font-size: 1rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .wiki-banner {
        height: 180px;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .wiki-banner-overlay h1 {
        font-size: 1.4rem;
    }

    .wiki-banner-overlay p {
        font-size: 0.85rem;
    }
}

/* ===== PAGE BACKGROUND & CSS VARIABLES ===== */
.wiki-page {
    /* CSS Variables scoped to wiki-page */
    --wiki-gold: #c4a876;
    --wiki-gold-light: #ede0cb;
    --wiki-gold-dark: #8b7355;
    --wiki-bg-primary: #1b1611;
    --wiki-bg-secondary: #14100c;
    --wiki-text-primary: #ffffff;
    --wiki-text-secondary: rgba(255, 255, 255, 0.7);
    --wiki-text-muted: rgba(255, 255, 255, 0.4);
    --wiki-border: rgba(255, 255, 255, 0.1);

    /* Simple gradient background for smooth scrolling */
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1410 0%, #1b1611 50%, #14100c 100%);
    position: relative;
    overflow: visible;
}

/* ===== WIKI CONTAINER - MAIN LAYOUT ===== */
.wiki-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    padding-top: 7.3vh;
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR ===== */
.wiki-sidebar {
    background: var(--wiki-bg-secondary);
    border-right: 1px solid var(--wiki-border);
    padding: 15px 0;
    position: sticky;
    top: 7.3vh;
    height: calc(100vh - 7.3vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wiki-nav-links {
    padding: 0 10px;
    flex: 1;
    overflow-y: auto;
}

.wiki-nav-links::-webkit-scrollbar {
    width: 4px;
}

.wiki-nav-links::-webkit-scrollbar-track {
    background: transparent;
}

.wiki-nav-links::-webkit-scrollbar-thumb {
    background: var(--wiki-gold-dark);
    border-radius: 2px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 0 20px 12px;
    border-bottom: 1px solid var(--wiki-border);
    margin-bottom: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.sidebar-header span {
    font-size: 0.85rem;
    color: var(--wiki-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Sidebar Categories */
.sidebar-category {
    margin-bottom: 8px;
}

.category-header {
    display: block;
    font-size: 0.75rem;
    color: var(--wiki-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 10px;
    margin-bottom: 2px;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin: 1px 0;
}

.sidebar-links a {
    display: block;
    padding: 6px 12px;
    color: var(--wiki-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: rgba(196, 168, 118, 0.1);
    color: var(--wiki-text-primary);
    border-left-color: var(--wiki-gold);
}

.sidebar-links a.active {
    background: rgba(196, 168, 118, 0.15);
    color: var(--wiki-gold);
    border-left-color: var(--wiki-gold);
}

/* ===== MOBILE NAV ===== */
.wiki-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 16, 12, 0.98);
    border-top: 1px solid var(--wiki-border);
    padding: 10px;
    z-index: 1000;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.wiki-mobile-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wiki-mobile-nav a i {
    font-size: 1rem;
    color: var(--wiki-gold-dark);
}

.wiki-mobile-nav a.active,
.wiki-mobile-nav a:hover {
    background: rgba(196, 168, 118, 0.15);
    color: var(--wiki-gold);
}

.wiki-mobile-nav a.active i,
.wiki-mobile-nav a:hover i {
    color: var(--wiki-gold);
}

/* ===== MAIN CONTENT ===== */
.wiki-content {
    padding: 25px 40px;
    background: var(--wiki-bg-primary);
    min-width: 0;
}

/* ===== SECTION STYLES ===== */
.wiki-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--wiki-border);
    scroll-margin-top: 10vh;
}

.wiki-section:last-child {
    border-bottom: none;
}

/* Section Header */
.section-header {
    margin-bottom: 20px;
}

.header-decoration {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.header-decoration img {
    width: 28px;
    height: 28px;
    opacity: 0.8;
}

.header-decoration .line {
    display: none;
}

.section-header h1 {
    color: var(--wiki-text-primary);
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.section-header p {
    color: var(--wiki-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0;
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}

.card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* ===== INFO CARD ===== */
.info-card {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: rgba(196, 168, 118, 0.3);
    transform: translateY(-2px);
}

.card-decoration {
    display: none;
}

.info-card h3 {
    color: var(--wiki-text-primary);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h3 i {
    color: var(--wiki-gold);
    font-size: 0.9rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    color: var(--wiki-text-secondary);
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-card ul li:last-child {
    border-bottom: none;
}

.info-card ul li strong {
    color: var(--wiki-text-muted);
    font-weight: normal;
}

/* ===== RATE BADGE ===== */
.rate-badge {
    background: rgba(196, 168, 118, 0.15);
    color: var(--wiki-gold);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(196, 168, 118, 0.3);
}

/* ===== RATES TABLES ===== */
.rates-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.rate-table-container {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rate-table-container:hover {
    border-color: rgba(196, 168, 118, 0.3);
}

.rate-table-container .card-decoration {
    display: none;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table thead th {
    background: rgba(196, 168, 118, 0.1);
    color: var(--wiki-gold);
    font-size: 0.8rem;
    padding: 12px 15px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--wiki-border);
}

.rate-table thead th i {
    margin-right: 8px;
}

.rate-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.rate-table td {
    padding: 10px 15px;
    color: var(--wiki-text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rate-table td:first-child {
    color: var(--wiki-text-primary);
}

.rate-table td:last-child {
    text-align: right;
}

.rate-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== RACE GRID ===== */
.race-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.race-item {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.race-item:hover {
    border-color: rgba(196, 168, 118, 0.3);
    transform: translateY(-3px);
}

.race-item i {
    font-size: 2rem;
    color: var(--wiki-gold);
    margin-bottom: 8px;
    display: block;
}

.race-item span {
    color: var(--wiki-text-primary);
    font-size: 0.85rem;
}

/* ===== ACCORDION ===== */
.wiki-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
}

.accordion-item {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover,
.accordion-item.active {
    border-color: rgba(196, 168, 118, 0.3);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    gap: 12px;
}

.accordion-header:hover {
    background: rgba(196, 168, 118, 0.05);
}

.accordion-header i:first-child {
    color: var(--wiki-gold);
    font-size: 1.2rem;
    width: 24px;
}

.accordion-header h3 {
    color: var(--wiki-text-primary);
    font-size: 1rem;
    flex: 1;
    margin: 0;
}

.accordion-header .fa-chevron-down {
    color: var(--wiki-gold);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header .fa-chevron-down {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 0 20px 20px;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-content p {
    color: var(--wiki-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-content ul li {
    position: relative;
    padding: 8px 0 8px 20px;
    color: var(--wiki-text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--wiki-gold);
}

.accordion-content ul li:last-child {
    border-bottom: none;
}

.accordion-content ul li strong {
    color: var(--wiki-gold);
}

/* ===== FEATURE CARD ===== */
.feature-card {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(196, 168, 118, 0.3);
    transform: translateY(-2px);
}

.feature-card .decoration {
    display: none;
}

.feature-card .icon {
    width: 50px;
    height: 50px;
    background: rgba(196, 168, 118, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 1px solid rgba(196, 168, 118, 0.2);
}

.feature-card .icon i {
    font-size: 1.5rem;
    color: var(--wiki-gold);
}

.feature-card h3 {
    color: var(--wiki-text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--wiki-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.feature-card ul {
    list-style: none;
    text-align: left;
    padding: 0;
    margin: 0;
}

.feature-card ul li {
    position: relative;
    padding: 6px 0 6px 18px;
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
}

.feature-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--wiki-gold);
}

/* ===== PET CARDS ===== */
.pet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.pet-card {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.pet-card .card-decoration {
    display: none;
}

.pet-card:hover {
    border-color: rgba(196, 168, 118, 0.3);
    transform: translateY(-2px);
}

.pet-rarity {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(196, 168, 118, 0.2);
    border: 1px solid rgba(196, 168, 118, 0.4);
    color: var(--wiki-gold);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.pet-image {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(196, 168, 118, 0.1), transparent);
}

.pet-image i {
    font-size: 3rem;
    color: var(--wiki-gold);
}

.pet-info {
    padding: 15px;
}

.pet-info h3 {
    color: var(--wiki-text-primary);
    font-size: 1rem;
    margin-bottom: 6px;
}

.pet-description {
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.pet-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(196, 168, 118, 0.05);
    border-radius: 4px;
    margin-bottom: 12px;
}

.pet-stats .stat {
    font-size: 0.75rem;
    color: var(--wiki-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 45%;
}

.pet-stats .stat i {
    color: var(--wiki-gold);
    font-size: 0.7rem;
}

/* Pet Details - New Format */
.pet-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pet-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(196, 168, 118, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--wiki-gold);
}

.pet-detail-row .detail-label {
    color: var(--wiki-gold);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pet-detail-row .detail-label i {
    font-size: 0.75rem;
}

.pet-detail-row .detail-value {
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.pet-detail-row .detail-value.price {
    color: var(--wiki-gold-light);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== OBTAIN BOX ===== */
.obtain-box {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.obtain-box .card-decoration {
    display: none;
}

.obtain-box h3 {
    color: var(--wiki-text-primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.obtain-box h3 i {
    color: var(--wiki-gold);
}

.obtain-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.obtain-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(196, 168, 118, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.obtain-method:hover {
    background: rgba(196, 168, 118, 0.1);
    border-color: rgba(196, 168, 118, 0.2);
}

.obtain-method i {
    font-size: 1.5rem;
    color: var(--wiki-gold);
}

.obtain-method span {
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
}

.obtain-method strong {
    color: var(--wiki-text-primary);
    display: block;
}

/* ===== COMMAND GRID ===== */
.command-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.command-category {
    background: var(--wiki-bg-secondary);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.command-category:hover {
    border-color: rgba(196, 168, 118, 0.3);
}

.command-category .card-decoration {
    display: none;
}

.command-category h3 {
    color: var(--wiki-text-primary);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wiki-border);
}

.command-category h3 i {
    color: var(--wiki-gold);
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(196, 168, 118, 0.05);
    border-radius: 4px;
}

.command-item:hover {
    background: rgba(196, 168, 118, 0.1);
}

.command-item code {
    background: rgba(196, 168, 118, 0.15);
    color: var(--wiki-gold);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
}

.command-item span {
    color: var(--wiki-text-secondary);
    font-size: 0.85rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    text-align: center;
    padding: 50px 30px;
    background: rgba(196, 168, 118, 0.05);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    margin-top: 20px;
}

.cta-section .decoration {
    display: none;
}

.cta-section h1 {
    color: var(--wiki-text-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cta-section h1 img {
    width: 30px;
}

.cta-section p {
    color: var(--wiki-text-secondary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 1024px) {
    .wiki-layout {
        grid-template-columns: 250px 1fr;
    }

    .wiki-content {
        padding: 25px 30px;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        display: none;
    }

    .wiki-mobile-nav {
        display: flex;
        gap: 5px;
    }

    .wiki-content {
        padding: 20px 16px 100px;
    }

    .section-header h1 {
        font-size: 1.4rem;
    }

    .card-grid.cols-2,
    .card-grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .rates-tables {
        grid-template-columns: 1fr;
    }

    .race-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pet-grid {
        grid-template-columns: 1fr;
    }

    .obtain-methods {
        grid-template-columns: 1fr;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .main_btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .wiki-content {
        padding: 15px 12px 100px;
    }

    .section-header h1 {
        font-size: 1.2rem;
    }

    .race-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-card ul li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pet-stats {
        flex-direction: column;
    }

    .pet-stats .stat {
        min-width: 100%;
    }
}
