/* 分类页面样式 */
.category-page-content {
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
    padding-bottom: 6rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-page-container {
    max-width: 1400px;
    margin: 0 auto;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.category-icon:hover {
    transform: scale(1.1) rotate(10deg);
    color: var(--text-primary);
    animation: iconPulse 0.6s ease;
}

.category-icon:not(:hover) {
    transition: all 0.3s ease;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1.1) rotate(10deg); }
    50% { transform: scale(1.2) rotate(-10deg); }
}

.category-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.category-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1400px;
    margin: 0 auto;
    gap: 1.5rem;
    justify-content: center;
    justify-items: center;
}

@media (min-width: 1200px) {
    .docs-grid {
        grid-template-columns: repeat(4, 280px);
        justify-content: center;
        justify-items: center;
    }
}

@media (max-width: 1199px) and (min-width: 900px) {
    .docs-grid {
        grid-template-columns: repeat(3, 280px);
        justify-content: center;
        justify-items: center;
    }
}

@media (max-width: 899px) and (min-width: 600px) {
    .docs-grid {
        grid-template-columns: repeat(2, 280px);
        justify-content: center;
        justify-items: center;
    }
}

@media (max-width: 599px) {
    .docs-grid {
        grid-template-columns: 280px;
        justify-content: center;
        justify-items: center;
    }
}

.doc-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.doc-card:nth-child(1) { animation-delay: 0.1s; }
.doc-card:nth-child(2) { animation-delay: 0.2s; }
.doc-card:nth-child(3) { animation-delay: 0.3s; }
.doc-card:nth-child(4) { animation-delay: 0.4s; }
.doc-card:nth-child(5) { animation-delay: 0.5s; }
.doc-card:nth-child(6) { animation-delay: 0.6s; }
.doc-card:nth-child(7) { animation-delay: 0.7s; }
.doc-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 280px;
    margin: 0;
}

[data-theme="dark"] .doc-card {
    background: rgba(42, 42, 42, 0.7);
    box-shadow: 0 4px 20px var(--shadow),
                0 0 0 1px rgba(64, 64, 64, 0.5) inset;
}

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

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

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow-hover),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset,
                0 0 20px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .doc-card:hover {
    background: rgba(42, 42, 42, 0.85);
    box-shadow: 0 8px 30px var(--shadow-hover),
                0 0 0 1px rgba(64, 64, 64, 0.6) inset,
                0 0 20px rgba(255, 255, 255, 0.05);
}

.doc-card-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.doc-card:hover .doc-card-icon {
    color: var(--text-primary);
    transform: scale(1.12) translateY(-2px) rotate(2deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.doc-card:not(:hover) .doc-card-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.doc-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.doc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.doc-card-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    justify-self: center;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
}

/* 标签筛选器 - 下拉菜单（所有分类通用） */
.tag-filter-dropdown-btn {
    position: fixed;
    top: calc(60px + 50px);
    right: 2rem;
    z-index: 1000;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.tag-filter-dropdown-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--shadow-hover);
}

.tag-filter-dropdown-btn.active {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.tag-filter-dropdown-btn.has-selection {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] .tag-filter-dropdown-btn {
    background: rgba(42, 42, 42, 0.9);
}

[data-theme="dark"] .tag-filter-dropdown-btn:hover {
    background: rgba(42, 42, 42, 1);
}

[data-theme="dark"] .tag-filter-dropdown-btn.has-selection {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.4);
}

.tag-filter-dropdown-menu {
    position: fixed;
    top: calc(60px + 130px);
    right: 2rem;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border-color);
    min-width: 250px;
    max-width: 350px;
    max-height: calc(100vh - 200px);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.tag-filter-dropdown-menu.open {
    display: flex;
    animation: dropdownSlideDown 0.3s ease;
}

@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="dark"] .tag-filter-dropdown-menu {
    background: rgba(42, 42, 42, 0.95);
}

.filter-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-dropdown-header h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.filter-clear-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .filter-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-dropdown-content {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
}

.filter-checkbox-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .filter-checkbox-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--text-primary);
}

.filter-checkbox-item span {
    color: var(--text-primary);
    font-size: 0.95rem;
    user-select: none;
}

/* 航空器类别分组 */
.aircraft-category-row {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.aircraft-category-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.aircraft-category-header-inline {
    flex-shrink: 0;
    width: 200px;
    text-align: left;
}

.aircraft-category-title-inline {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Arial Black', 'Impact', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.aircraft-category-desc-inline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.aircraft-category-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.aircraft-category-content .doc-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    width: 280px;
    margin: 0;
}

.empty-state-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    width: 100%;
}

.empty-state-inline .empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-inline .empty-state-text {
    font-size: 1rem;
    color: var(--text-tertiary);
}

.aircraft-category-grid .doc-card:nth-child(1) { animation-delay: 0.1s; }
.aircraft-category-grid .doc-card:nth-child(2) { animation-delay: 0.2s; }
.aircraft-category-grid .doc-card:nth-child(3) { animation-delay: 0.3s; }
.aircraft-category-grid .doc-card:nth-child(4) { animation-delay: 0.4s; }
.aircraft-category-grid .doc-card:nth-child(5) { animation-delay: 0.5s; }
.aircraft-category-grid .doc-card:nth-child(6) { animation-delay: 0.6s; }

@media (max-width: 768px) {
    .category-title {
        font-size: 2rem;
    }

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

    .aircraft-category-row {
        flex-direction: column;
        gap: 1rem;
    }

    .aircraft-category-header-inline {
        width: 100%;
    }

    .aircraft-category-content {
        width: 100%;
    }

    .aircraft-category-content .doc-card {
        width: 100%;
        max-width: 100%;
    }

    .tag-filter-dropdown-btn {
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .tag-filter-dropdown-menu {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}
