/**
 * 主页框架 - 搜索与头部控制区样式
 * 包含：系统反馈按钮、搜索控制、#searchInput、自动补全、admin-link、logout、icon-btn、search-text-btn
 * 与 main-frame.css 配合使用，独立于审核面板
 */

/* 系统反馈按钮（独立按钮） */
.system-feedback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    height: 36px;
    box-sizing: border-box;
    line-height: 1;
}

.system-feedback-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.system-feedback-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    transition: stroke 0.3s ease;
}

.system-feedback-btn:hover svg {
    stroke: var(--text-accent);
}

.system-feedback-btn .btn-text {
    display: none;
}

/* 中央搜索控制区域 */
.search-controls-center {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10003;
}

/* 左侧搜索控制区域 */
.search-controls-left {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex: 1;
    z-index: 10003;
    padding: 8px;
    background: transparent;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
    justify-content: center;
    margin: 0 auto;
}

.search-controls-left:hover {
    border: none;
    box-shadow: none;
}

/* 搜索输入容器 */
.search-input-container {
    position: relative;
    display: inline-block;
    z-index: 10003;
    flex: 1;
    min-width: 0;
}

#searchInput {
    padding: 10px 16px;
    font-size: 13px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    width: 100%;
    min-width: 180px;
    max-width: 700px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#searchInput:hover {
    border-color: var(--border-secondary);
    background: var(--bg-tertiary);
}

#searchInput:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

/* 自动补全下拉列表 */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10004;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

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

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    border-bottom: 1px solid var(--border-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--text-primary);
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: var(--bg-hover);
    color: var(--text-accent);
    transform: translateX(4px);
    border-left: 3px solid var(--border-accent);
}

.autocomplete-item .highlight {
    background: rgba(102, 126, 234, 0.2);
    color: var(--text-accent);
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 0;
    text-shadow: none;
    outline: none;
    box-shadow: none;
}

/* 头部链接与按钮 */
.admin-link {
    font-size: 11px;
    color: var(--text-accent);
    text-decoration: none;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-link:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.logout-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    color: var(--text-accent);
    transform: scale(1.05);
}

.logout-btn:active {
    transform: scale(0.95);
    background: var(--bg-active);
}

/* 图标按钮样式（搜索和刷新按钮） */
.icon-btn {
    padding: 10px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.icon-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.icon-btn svg {
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
}

.icon-btn:hover svg {
    transform: scale(1.1);
}

/* 搜索文字按钮样式 */
.search-text-btn {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    font-weight: 500;
    height: 36px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.search-text-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.search-text-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}
