/* Wiki GitBook Layout */
.wiki-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - 80px);
}

.wiki-layout {
    display: flex;
    min-height: 100%;
}

.wiki-sidebar {
    width: 280px;
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 10;
    background: rgba(11, 11, 11, 0.95);
    backdrop-filter: blur(10px);
}

.light-theme .wiki-sidebar {
    background: rgba(255, 255, 255, 0.95);
}

.wiki-content {
    flex: 1;
    margin-left: 280px;
    min-height: calc(100vh - 80px);
    padding: 2rem 3rem;
    background: transparent;
}

.light-theme .wiki-content {
    background: #ffffff;
}

.wiki-nav {
    padding: 2rem 1.5rem;
}

.wiki-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.wiki-nav li {
    margin-bottom: 0.25rem;
}

.wiki-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.wiki-nav a:hover,
.wiki-nav a.active {
    background: rgba(255, 119, 169, 0.1);
    color: #FF77A9;
}

/* Убедитесь что иконки правильно отображаются */
.nav-icon,
.section-icon,
.social-icon,
.mechanic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-theme .wiki-nav a {
    color: #666666;
}

.wiki-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.light-theme .wiki-nav a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0B0B0B;
}

.wiki-nav a.active {
    background: rgba(255, 119, 169, 0.1);
    color: #FF77A9;
    font-weight: 600;
}

.light-theme .wiki-nav a.active {
    background: rgba(255, 119, 169, 0.1);
    color: #FF77A9;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.wiki-sections-container {
    max-width: 100%;
    margin: 0 auto;
}

.wiki-section {
    margin-bottom: 3rem;
    padding: 0;
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.wiki-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #FF77A9;
}

.section-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.wiki-section h2 {
    font-size: 2.5rem;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
}

.light-theme .wiki-section h2 {
    color: #0B0B0B;
}

.wiki-section h3 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
    color: #e0e0e0;
    font-weight: 600;
}

.light-theme .wiki-section h3 {
    color: #2a2a2a;
}

.wiki-section h4 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: #d1d5db;
    font-weight: 600;
}

.light-theme .wiki-section h4 {
    color: #4b5563;
}

.wiki-section p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #e0e0e0;
    font-size: 1.05rem;
}

.light-theme .wiki-section p {
    color: #666666;
}

.wiki-section ul, .wiki-section ol {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.wiki-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #e0e0e0;
    font-size: 1.05rem;
}

.light-theme .wiki-section li {
    color: #666666;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wiki-table th, .wiki-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .wiki-table th,
.light-theme .wiki-table td {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wiki-table th {
    background: rgba(255, 119, 169, 0.2);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
}

.light-theme .wiki-table th {
    background: rgba(255, 119, 169, 0.1);
    color: #0B0B0B;
}

.wiki-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.light-theme .wiki-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.wiki-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 600px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.wiki-badge.allowed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.light-theme .wiki-badge.allowed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.wiki-badge.forbidden {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.light-theme .wiki-badge.forbidden {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.wiki-badge.conditional {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.light-theme .wiki-badge.conditional {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.wiki-note, .wiki-warning, .wiki-danger {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.wiki-note {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
}

.light-theme .wiki-note {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
}

.wiki-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

.light-theme .wiki-warning {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: #f59e0b;
}

.wiki-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

.light-theme .wiki-danger {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
}

.wiki-note p, .wiki-warning p, .wiki-danger p {
    margin: 0;
    color: #ffffff;
    font-weight: 500;
}

.light-theme .wiki-note p,
.light-theme .wiki-warning p,
.light-theme .wiki-danger p {
    color: #0B0B0B;
}

/* Footer на всю ширину */
footer {
    width: 100%;
    margin: 0;
    padding: 3rem 0;
    background-color: #0B0B0B;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--gray-800);
}

.light-theme footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .wiki-sidebar {
        width: 250px;
    }
    
    .wiki-content {
        margin-left: 250px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .wiki-layout {
        flex-direction: column;
    }
    
    .wiki-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
        padding: 0;
        background: rgba(11, 11, 11, 0.95);
    }

    .light-theme .wiki-sidebar {
        background: #ffffff;
    }
    
    .wiki-content {
        margin-left: 0;
        padding: 1.5rem;
        background: transparent;
    }

    .light-theme .wiki-content {
        background: #ffffff;
    }
    
    .wiki-nav {
        padding: 1.5rem;
    }
    
    .wiki-section h2 {
        font-size: 2rem;
    }
    
    .wiki-section h3 {
        font-size: 1.5rem;
    }
    
    .wiki-table {
        font-size: 0.9rem;
    }
    
    .wiki-table th, .wiki-table td {
        padding: 0.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-icon {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .wiki-content {
        padding: 1rem;
    }
    
    .wiki-section h2 {
        font-size: 1.75rem;
    }
    
    .wiki-table {
        display: block;
        overflow-x: auto;
    }
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 3rem;
    color: var(--gray-400);
}

.light-theme .loading {
    color: #808080;
}

.loading.active {
    display: block;
}

.hero {
    padding: 8rem 1rem 4rem 1rem;
}

/* Вкладки навигации */
.wiki-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.light-theme .wiki-tabs {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.wiki-tab {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    color: #a0a0a0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.light-theme .wiki-tab {
    color: #666666;
}

.wiki-tab:hover,
.wiki-tab.active {
    color: #FF77A9;
    border-bottom-color: #FF77A9;
}

.light-theme .wiki-tab:hover,
.light-theme .wiki-tab.active {
    color: #FF77A9;
}

/* Социальные карточки */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.social-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .social-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.social-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.light-theme .social-card:hover {
    background: #f8f8f8;
}

.social-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-card span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
}

.light-theme .social-card span {
    color: #0B0B0B;
}

/* Инструкция доступа */
.access-instruction {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.instruction-step {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.light-theme .instruction-step {
    background: #ffffff;
}

.instruction-step h3 {
    margin-top: 0;
    color: #FF77A9;
}

.server-ip {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.server-ip code {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: monospace;
    color: #ffffff;
}

.light-theme .server-ip code {
    background: rgba(0, 0, 0, 0.05);
    color: #0B0B0B;
}

.copy-ip-btn {
    margin-left: 1rem;
    padding: 0.75rem 1.5rem;
    background: #FF77A9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
}

.copy-ip-btn:hover {
    background: #F2528D;
}

/* Игровые механики */
.mechanics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.mechanic-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.light-theme .mechanic-card {
    background: #ffffff;
}

.mechanic-icon {
    width: 48px;
    height: 48px;
    margin-right: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 119, 169, 0.1);
    border-radius: 8px;
    color: #FF77A9;
}

.mechanic-content {
    flex: 1;
}

.mechanic-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.light-theme .mechanic-card h3 {
    color: #0B0B0B;
}

.mechanic-card p {
    margin: 0;
    color: #e0e0e0;
    line-height: 1.6;
}

.light-theme .mechanic-card p {
    color: #666666;
}

/* Команды */
.command-category {
    margin-bottom: 2.5rem;
}

.command-list {
    display: grid;
    gap: 0.5rem;
}

.command-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-family: monospace;
    color: #ffffff;
}

.light-theme .command-item {
    background: rgba(0, 0, 0, 0.05);
    color: #0B0B0B;
}

.wiki-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #FF77A9;
    color: rgb(255, 255, 255);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.wiki-btn:hover {
    background: #F2528D;
}

.wiki-btn .icon {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
}

.social-icon svg {
    color: #ffffff;
    transition: color 0.3s ease;
}

.light-theme .social-icon svg {
    color: #0B0B0B;
}

.social-card:hover .social-icon svg {
    color: #FF77A9;
}

.light-theme .social-card:hover .social-icon svg {
    color: #FF77A9;
}

/* Иконки механик - черные в светлой теме */
.mechanic-icon svg {
    color: #FF77A9;
    transition: color 0.3s ease;
}

.light-theme .mechanic-icon svg {
    color: #0B0B0B;
}

.mechanic-card:hover .mechanic-icon svg {
    color: #ffffff;
}

.light-theme .mechanic-card:hover .mechanic-icon svg {
    color: #FF77A9;
}

/* Вертикальное расположение для инструкции доступа */
.access-instruction {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.instruction-step {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.light-theme .instruction-step {
    background: #ffffff;
}

/* Вертикальное расположение для игровых механик */
.mechanics-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.mechanic-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.light-theme .mechanic-card {
    background: #ffffff;
}

/* Иконки навигации - черные в светлой теме */
.nav-icon {
    color: #ffffff;
    transition: color 0.3s ease;
}

.light-theme .nav-icon {
    color: #0B0B0B;
}

.rules-nav-link:hover .nav-icon,
.rules-nav-link.active .nav-icon {
    color: #FF77A9;
}

/* Иконки секций - черные в светлой теме */
.section-icon {
    color: #ffffff;
}

.light-theme .section-icon {
    color: #0B0B0B;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .mechanic-card {
        flex-direction: column;
        text-align: center;
    }

    .mechanic-icon {
        margin-right: 0;
        margin-bottom: 1rem;
        align-self: center;
    }

    .instruction-step {
        padding: 1.5rem;
    }
}