.docs-page {
    max-width: 1400px;
    margin: 0 auto;
    color: #e0e0e0;
}

.docs-header {
    padding: 24px 0 16px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.docs-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.docs-subtitle {
    color: #888;
    font-size: 13px;
    margin: 0 0 16px;
}

.docs-search {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #5588ff;
    box-shadow: 0 0 0 3px rgba(85, 136, 255, 0.15);
}

.search-input::placeholder {
    color: #555;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.search-clear:hover {
    color: #fff;
}

.docs-filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #333;
    border-radius: 6px;
    background: transparent;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    border-color: #5588ff;
    color: #5588ff;
    background: rgba(85, 136, 255, 0.08);
}

.filter-btn.active {
    border-color: #5588ff;
    color: #fff;
    background: #5588ff;
}

.docs-body {
    display: flex;
    gap: 28px;
}

.docs-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.sidebar-inner {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-inner::-webkit-scrollbar {
    width: 4px;
}

.sidebar-inner::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.sidebar-group {
    margin-bottom: 16px;
}

.sidebar-group-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #666;
    text-decoration: none;
    padding: 4px 8px;
    margin-bottom: 4px;
    transition: color 0.15s;
}

.sidebar-group-title:hover {
    color: #aaa;
}

.sidebar-items {
    display: flex;
    flex-direction: column;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 12px;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1.3;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ddd;
}

.sidebar-item-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-item-badge.type-skill { background: #5588ff; }
.sidebar-item-badge.type-debuff { background: #ff5544; }
.sidebar-item-badge.type-buff { background: #44bb66; }
.sidebar-item-badge.type-key { background: #888; }
.sidebar-item-badge.type-character { background: #ffaa33; }

.docs-content {
    flex: 1;
    min-width: 0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-results p {
    font-size: 16px;
    margin-bottom: 16px;
}

.group-section {
    margin-bottom: 32px;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2a2a2a;
}

.group-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.group-count {
    font-size: 12px;
    color: #666;
    background: #1a1a1a;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.doc-card {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.doc-card:hover {
    border-color: #3a3a3a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.doc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px 12px;
    background: linear-gradient(135deg, #1e1e1e, #181818);
    border-bottom: 1px solid #2a2a2a;
    gap: 12px;
}

.doc-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.doc-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.doc-type-badge.type-skill { background: rgba(85, 136, 255, 0.15); color: #7799ff; border: 1px solid rgba(85, 136, 255, 0.3); }
.doc-type-badge.type-debuff { background: rgba(255, 85, 68, 0.15); color: #ff7766; border: 1px solid rgba(255, 85, 68, 0.3); }
.doc-type-badge.type-buff { background: rgba(68, 187, 102, 0.15); color: #66dd88; border: 1px solid rgba(68, 187, 102, 0.3); }
.doc-type-badge.type-key { background: rgba(136, 136, 136, 0.15); color: #aaa; border: 1px solid rgba(136, 136, 136, 0.3); }
.doc-type-badge.type-character { background: rgba(255, 170, 51, 0.15); color: #ffbb55; border: 1px solid rgba(255, 170, 51, 0.3); }

.doc-key-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 5px 12px;
    flex-shrink: 0;
}

.key-icon {
    font-size: 14px;
    opacity: 0.6;
}

.key-text {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.doc-card-body {
    padding: 16px 20px;
}

.doc-description {
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #121212;
    border-radius: 8px;
    border: 1px solid #222;
}

.doc-description p {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.doc-description p:last-child {
    margin-bottom: 0;
}

.wiki-link {
    color: #7799ff;
    font-weight: 600;
    border-bottom: 1px dashed rgba(85, 136, 255, 0.3);
    cursor: default;
}

.doc-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
}

.doc-field {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: #131313;
    border-radius: 6px;
    border: 1px solid #222;
}

.doc-field-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #666;
    margin-bottom: 2px;
}

.doc-field-value {
    font-size: 14px;
    color: #ddd;
    font-weight: 500;
    word-break: break-word;
}

.doc-body {
    margin-top: 14px;
    padding: 12px 16px;
    background: #0f0f0f;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
}

.doc-body-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #888;
    white-space: pre-wrap;
    font-family: inherit;
}

.doc-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 20px 14px;
    border-top: 1px solid #222;
}

.tag-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(85, 136, 255, 0.1);
    color: #7799ff;
    border: 1px solid rgba(85, 136, 255, 0.2);
    font-weight: 500;
}

@media (max-width: 900px) {
    .docs-sidebar {
        display: none;
    }

    .docs-fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .doc-card-header {
        flex-direction: column;
    }

    .doc-fields {
        grid-template-columns: 1fr;
    }
}
