/* ============================================
   Aero 毛玻璃效果组件
   ============================================ */

/* --- 导航栏/任务栏 --- */
.aero-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(20, 30, 50, 0.55);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.aero-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.15) 80%, transparent 100%);
}

/* --- 侧边栏 --- */
.aero-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(15, 25, 40, 0.5);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    z-index: 900;
    padding-top: 8px;
    transition: transform var(--transition-normal);
}

/* --- 弹窗/模态框 --- */
.aero-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
}

.aero-modal {
    background: rgba(30, 45, 65, 0.92);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-window);
    min-width: 400px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease;
}

/* 模态框标题栏 - 类似Windows窗口标题栏 */
.aero-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(74, 143, 212, 0.3) 0%, rgba(30, 63, 111, 0.3) 100%);
    border-bottom: 1px solid var(--border-lighter);
}

.aero-modal-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-on-glass);
    display: flex;
    align-items: center;
    gap: 8px;
}

.aero-modal-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-on-glass-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.aero-modal-close:hover {
    background: rgba(212, 66, 62, 0.6);
    color: #fff;
}

.aero-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 110px);
    color: var(--text-on-glass);
}

.aero-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-lighter);
    background: rgba(0, 0, 0, 0.15);
}

/* --- 窗口标题栏 --- */
.aero-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(74, 143, 212, 0.25) 0%, rgba(43, 87, 151, 0.15) 100%);
    border-bottom: 1px solid var(--border-lighter);
}

.aero-titlebar-text {
    font-size: 0.9rem;
    color: var(--text-on-glass);
    display: flex;
    align-items: center;
    gap: 8px;
}

.aero-titlebar-controls {
    display: flex;
    gap: 2px;
}

.aero-titlebar-btn {
    width: 28px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--text-on-glass-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.aero-titlebar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-lighter);
}

.aero-titlebar-btn.close:hover {
    background: rgba(212, 66, 62, 0.7);
    color: #fff;
}

/* --- 页脚 --- */
.aero-footer {
    background: rgba(15, 25, 40, 0.55);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-top: 40px;
}

.aero-footer::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12) 30%, rgba(255,255,255,0.12) 70%, transparent);
    margin-bottom: 16px;
}

/* --- 搜索框 (Win7任务栏搜索样式) --- */
.aero-search {
    position: relative;
    display: flex;
    align-items: center;
}

.aero-search-input {
    width: 240px;
    padding: 5px 12px 5px 32px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    color: var(--text-on-glass);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.aero-search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--win-blue-light);
    box-shadow: 0 0 0 2px rgba(74, 143, 212, 0.25);
    width: 280px;
}

.aero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.aero-search-icon {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* --- 卡片组件 --- */
.aero-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-window-light);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.aero-card:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow-window);
    transform: translateY(-2px);
}

.aero-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-lighter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aero-card-body {
    padding: 18px;
}

.aero-card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border-lighter);
    background: rgba(0, 0, 0, 0.08);
}

/* --- 标签/徽章 --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-on-glass-muted);
    border: 1px solid var(--border-lighter);
}

.badge-primary {
    background: rgba(43, 87, 151, 0.35);
    color: #93C5FD;
    border-color: rgba(74, 143, 212, 0.3);
}

.badge-success {
    background: rgba(30, 140, 69, 0.25);
    color: #86EFAC;
    border-color: rgba(30, 140, 69, 0.3);
}

.badge-warning {
    background: rgba(232, 163, 23, 0.25);
    color: #FDE68A;
    border-color: rgba(232, 163, 23, 0.3);
}

.badge-danger {
    background: rgba(212, 66, 62, 0.25);
    color: #FCA5A5;
    border-color: rgba(212, 66, 62, 0.3);
}

/* --- 工具提示 --- */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(20, 30, 50, 0.9);
    color: var(--text-on-glass);
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    border: 1px solid var(--border-lighter);
}

.tooltip:hover::after {
    opacity: 1;
}

/* --- 下拉菜单 --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: rgba(25, 38, 56, 0.95);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-window);
    padding: 4px 0;
    z-index: 1100;
    display: none;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.15s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: var(--text-on-glass);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}

.dropdown-item:hover {
    background: rgba(74, 143, 212, 0.2);
    text-decoration: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-lighter);
    margin: 4px 0;
}

/* --- 动画 --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease;
}

/* --- 分隔线 --- */
.aero-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light) 30%, var(--border-light) 70%, transparent);
    margin: 16px 0;
}

/* --- 面包屑 --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-on-glass-muted);
    padding: 10px 0;
}

.breadcrumb a {
    color: var(--text-on-glass-muted);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--text-on-glass);
}

.breadcrumb svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

/* --- 空状态 --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-on-glass-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .aero-sidebar {
        transform: translateX(-100%);
    }

    .aero-sidebar.open {
        transform: translateX(0);
    }

    .aero-modal {
        min-width: auto;
        width: 92vw;
    }

    .aero-search-input {
        width: 160px;
    }

    .aero-search-input:focus {
        width: 200px;
    }
}
