/* ═══════════════════════════════════════════════════════════════════════════
   DarkRPG Wiki - Стили для базы знаний
   ═══════════════════════════════════════════════════════════════════════════ */

.wiki-breadcrumb {
    align-items: center;
    display: flex;
    font-size: 1rem;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.wiki-breadcrumb-current {
    color: var(--gold);
    font-weight: normal;
}

.wiki-breadcrumb-link {
    align-items: center;
    color: var(--text-primary);
    display: flex;
    font-weight: normal;
    gap: 0.5rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wiki-breadcrumb-separator {
    color: var(--smoke);
    font-weight: normal;
}

.wiki-categories-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-bottom: 3rem;
}

.wiki-category-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.wiki-category-card {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    display: flex;
    gap: 1.25rem;
    overflow: hidden;
    padding: 1.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.wiki-category-content {
    flex: 1;
}

.wiki-category-count {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    color: var(--gold-light);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

.wiki-category-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.wiki-category-icon {
    color: var(--gold);
    flex-shrink: 0;
    font-size: 2rem;
    opacity: 0.9;
}

.wiki-category-stats {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.wiki-category-title {
    color: var(--bone);
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.35rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
}

.wiki-container {
    background-color: var(--bg-void);
    font-family: 'OpirusOpik', 'Georgia', serif;
    margin: 0 auto;
    max-width: 1200px;
    min-height: 100vh;
    padding: 2rem;
}

.wiki-content {
    margin-top: 1.5rem;
}

.wiki-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.wiki-detail-description {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 0;
}

.wiki-detail-drop {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
}

.wiki-detail-drop-chance {
    color: var(--gold);
}

.wiki-detail-drop-count {
    color: var(--text-muted);
}

.wiki-detail-drop-info {
    color: var(--text-secondary);
    display: flex;
    font-size: 0.85rem;
    gap: 1rem;
}

.wiki-detail-drop-link {
    align-items: center;
    color: var(--gold-light);
    display: flex;
    font-size: 1rem;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.wiki-detail-drops {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wiki-detail-header {
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border-subtle);
    display: grid;
    gap: 2rem;
    grid-template-columns: 280px 1fr;
    padding: 2rem;
}

.wiki-detail-image {
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    display: flex;
    height: 280px;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.wiki-detail-img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.wiki-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.wiki-detail-placeholder {
    align-items: center;
    background: var(--bg-dark);
    color: var(--text-muted);
    display: flex;
    font-size: 3rem;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.wiki-detail-properties {
    padding: 2rem;
}

.wiki-detail-properties-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.wiki-detail-properties-title {
    align-items: center;
    color: var(--bone);
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.35rem;
    font-weight: normal;
    gap: 0.75rem;
    letter-spacing: 0.1em;
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
}

.wiki-detail-property {
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    transition: border-color 0.3s ease;
}

.wiki-detail-property-key {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.wiki-detail-property-value {
    color: var(--bone);
    font-size: 0.95rem;
}

.wiki-detail-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    margin-top: 2rem;
    padding: 1.5rem;
}

.wiki-detail-section-title {
    align-items: center;
    color: var(--bone);
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.15rem;
    font-weight: normal;
    gap: 0.75rem;
    letter-spacing: 0.1em;
    margin: 0 0 1.25rem 0;
    text-transform: uppercase;
}

.wiki-detail-skill {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wiki-detail-skill-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.wiki-detail-skill-link {
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--gold-dark);
    color: var(--gold-light);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wiki-detail-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wiki-detail-spawn {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
}

.wiki-detail-spawn-danger {
    color: var(--blood-glow);
}

.wiki-detail-spawn-info {
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.85rem;
    gap: 1rem;
}

.wiki-detail-spawn-level {
    color: var(--gold);
}

.wiki-detail-spawn-link {
    align-items: center;
    color: var(--gold-light);
    display: flex;
    font-size: 1rem;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.wiki-detail-spawn-respawn {
    color: var(--text-muted);
}

.wiki-detail-spawns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wiki-detail-title {
    color: var(--bone);
    font-family: 'Hometown', 'Georgia', serif;
    font-size: 2.4rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin: 0;
}

.wiki-header {
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-dark) 100%);
    border: 1px solid var(--border-subtle);
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
}

.wiki-icon {
    color: var(--gold);
    display: inline-block;
    font-size: 1em;
}

.wiki-item-arrow {
    align-self: flex-end;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.wiki-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.wiki-item-content {
    flex: 1;
}

.wiki-item-description {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--text-secondary);
    display: -webkit-box;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
}

.wiki-item-image {
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    display: flex;
    height: 120px;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.wiki-item-img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.wiki-item-placeholder {
    color: var(--text-muted);
    font-size: 2rem;
}

.wiki-item-subtitle {
    color: var(--gold-light);
    font-size: 0.8rem;
}

.wiki-item-title {
    color: var(--bone);
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.15rem;
    font-weight: normal;
    line-height: 1.35;
    margin: 0 0 0.5rem 0;
}

.wiki-items-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wiki-loading {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    font-size: 1rem;
    gap: 0.75rem;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
}

.wiki-navigation {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.wiki-search {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.wiki-search-back-button {
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 0.9rem;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
}

.wiki-search-button {
    align-items: center;
    background: linear-gradient(180deg, var(--blood-light) 0%, var(--blood-dark) 100%);
    border: 1px solid var(--blood);
    color: var(--bone);
    cursor: pointer;
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1rem;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    transition: all 0.3s ease;
}

.wiki-search-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    flex: 1;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
    transition: border-color 0.3s ease;
}

.wiki-search-no-results {
    color: var(--text-muted);
    padding: 4rem 1.5rem;
    text-align: center;
}

.wiki-search-results {
    margin-top: 1.5rem;
}

.wiki-search-results-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wiki-search-results-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.wiki-search-results-title {
    align-items: center;
    color: var(--bone);
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.2rem;
    font-weight: normal;
    gap: 0.75rem;
    margin: 0;
}

.wiki-section {
    margin-bottom: 3rem;
}

.wiki-section-title {
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--bone);
    display: flex;
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: normal;
    gap: 0.75rem;
    letter-spacing: 0.1em;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    text-transform: uppercase;
}

.wiki-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: normal;
    letter-spacing: 0.15em;
    margin: 0;
    text-transform: uppercase;
}

.wiki-title {
    align-items: center;
    color: var(--bone);
    display: flex;
    font-family: 'Hometown', 'Georgia', serif;
    font-size: 3rem;
    font-weight: normal;
    gap: 1rem;
    justify-content: center;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem 0;
    text-shadow: 0 2px 4px var(--shadow-void);
}

.wiki-breadcrumb-link:hover {
    color: var(--gold-light);
}

.wiki-category-card::after {
    border-width: 0 1px 1px 0;
    bottom: 6px;
    right: 6px;
}

.wiki-category-card::before {
    border-width: 1px 0 0 1px;
    left: 6px;
    top: 6px;
}

.wiki-category-card::before,
.wiki-category-card::after {
    border-color: var(--gold-dark);
    border-style: solid;
    content: '';
    height: 15px;
    opacity: 0.5;
    position: absolute;
    transition: all 0.3s ease;
    width: 15px;
}

.wiki-category-card:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 8px 25px var(--shadow-void);
}

.wiki-category-card:hover .wiki-category-arrow {
    color: var(--gold);
    transform: translateX(5px);
}

.wiki-category-card:hover::before,
.wiki-category-card:hover::after {
    border-color: var(--gold);
    height: 20px;
    opacity: 1;
    width: 20px;
}

.wiki-detail-drop-link:hover {
    color: var(--gold-pale);
}

.wiki-detail-property:hover {
    border-color: var(--gold-dark);
}

.wiki-detail-skill-link:hover {
    background: var(--bg-elevated);
    border-color: var(--gold);
    color: var(--gold-pale);
}

.wiki-detail-spawn-link:hover {
    color: var(--gold-pale);
}

.wiki-header::after {
    border-width: 0 2px 2px 0;
    bottom: 10px;
    right: 10px;
}

.wiki-header::before {
    border-width: 2px 0 0 2px;
    left: 10px;
    top: 10px;
}

.wiki-header::before,
.wiki-header::after {
    border-color: var(--gold-dark);
    border-style: solid;
    content: '';
    height: 40px;
    position: absolute;
    width: 40px;
}

.wiki-item-card::before {
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
    content: '';
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.wiki-item-card:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 6px 20px var(--shadow-void);
}

.wiki-item-card:hover .wiki-item-arrow {
    color: var(--gold);
    transform: translateX(3px);
}

.wiki-item-card:hover::before {
    transform: scaleX(1);
}

.wiki-item-placeholder img {
    max-height: 80px;
    max-width: 80px;
    opacity: 0.7;
}

.wiki-search-back-button:hover {
    background: var(--bg-elevated);
    border-color: var(--gold-dark);
    color: var(--gold-light);
}

.wiki-search-button:hover {
    background: linear-gradient(180deg, var(--blood-glow) 0%, var(--blood) 100%);
    border-color: var(--blood-light);
}

.wiki-search-input::placeholder {
    color: var(--text-muted);
}

.wiki-search-input:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 1px var(--gold-dark);
    outline: none;
}

.wiki-search-no-results .wiki-icon {
    color: var(--smoke);
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.wiki-search-no-results h3 {
    color: var(--bone);
    font-family: 'OpirusOpik', 'Georgia', serif;
    font-size: 1.4rem;
    font-weight: normal;
    margin: 0 0 0.75rem 0;
}

.wiki-search-no-results p {
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
}

/* Переопределение переменных для Wiki (если нужно) */
:root {
    --bg-card: #151311;
    --border-medium: #3d3833;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Медиа-запросы для мобильных устройств (orientation: portrait)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (orientation: portrait) {
    .wiki-container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .wiki-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .wiki-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wiki-subtitle {
        font-size: 1rem;
    }
    
    .wiki-navigation {
        padding: 1rem;
    }
    
    .wiki-search {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .wiki-search-input {
        width: 100%;
    }
    
    .wiki-search-button {
        width: 100%;
        justify-content: center;
    }
    
    .wiki-categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .wiki-category-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }
    
    .wiki-category-icon {
        font-size: 2.5rem;
    }
    
    .wiki-category-arrow {
        display: none;
    }
    
    .wiki-items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .wiki-search-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .wiki-detail-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .wiki-detail-image {
        height: 200px;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .wiki-detail-title {
        font-size: 1.8rem;
    }
    
    .wiki-detail-description {
        font-size: 1rem;
    }
    
    .wiki-detail-properties {
        padding: 1.5rem;
    }
    
    .wiki-detail-properties-grid {
        grid-template-columns: 1fr;
    }
    
    .wiki-detail-section {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .wiki-detail-section-title {
        font-size: 1rem;
    }
    
    .wiki-detail-skills {
        flex-direction: column;
    }
    
    .wiki-detail-skill-link {
        width: 100%;
        justify-content: center;
    }
    
    .wiki-section-title {
        font-size: 1.2rem;
    }
    
    .wiki-search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wiki-search-back-button {
        width: 100%;
        justify-content: center;
    }
}
