/* search-button.css - 与主页风格一致的搜索页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #3b4f7d 0%, #2c5aa0 50%, #1e40af 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 顶部导航栏 - 与主页一致 */
.top-navbar {
    background: #2c5aa0;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.navbar-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: -2px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-to-main {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-main:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* 主容器 */
.search-container {
    position: relative;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* 搜索区域 */
.search-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.search-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out;
}

.search-logo {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.search-title {
    font-size: 3rem;
    font-weight: 300;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.search-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 搜索框区域 */
.search-box-container {
    width: 100%;
    max-width: 700px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 20px 24px 20px 60px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: #2d3748;
    font-weight: 400;
}

.search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 20px;
    transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
    color: #2c5aa0;
}

.search-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #2c5aa0, #1e40af);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(44, 90, 160, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    justify-content: center;
}

.search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(44, 90, 160, 0.4);
}

.search-button:active {
    transform: translateY(-1px);
}

.search-type-select {
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.search-type-select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.search-type-select option {
    background: #2d3748;
    color: white;
    padding: 10px;
}

.action-button {
    padding: 14px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 结果区域 - 与主页风格一致 */
.results-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin: 0 20px 20px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.results-header {
    padding: 30px 40px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.results-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.results-query {
    color: #718096;
    font-size: 14px;
}

.results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-outline {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5aa0, #1e40af);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(44, 90, 160, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-accent {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
}

.btn-accent:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    max-height: 70vh;
    overflow-y: auto;
}

.result-card {
    padding: 32px 40px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.result-card:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.result-card:last-child {
    border-bottom: none;
}

.result-checkbox {
    margin-top: 8px;
    width: 18px;
    height: 18px;
    accent-color: #2c5aa0;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.4;
}

.result-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #2c5aa0;
}

.result-description {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.result-meta {
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: 14px;
    color: #718096;
    flex-wrap: wrap;
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.result-action-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
}

.result-action-btn:hover {
    border-color: #2c5aa0;
    color: #2c5aa0;
    transform: translateY(-1px);
}

.result-action-btn.added {
    background: #059669;
    color: white;
    border-color: #059669;
}

/* 欢迎界面 */
.welcome-screen {
    text-align: center;
    padding: 80px 40px;
    color: #4a5568;
}

.welcome-icon {
    font-size: 5rem;
    color: #a0aec0;
    margin-bottom: 30px;
}

.welcome-screen h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.welcome-screen p {
    font-size: 16px;
    color: #718096;
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.feature-item i {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 16px;
}

.feature-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 16px;
    color: #4a5568;
    font-weight: 500;
}

/* Toast通知 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    border-left: 4px solid #2c5aa0;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: #059669;
}

.toast-error {
    border-left-color: #dc2626;
}

.toast-warning {
    border-left-color: #d97706;
}

.toast-icon {
    font-size: 18px;
    color: #2c5aa0;
}

.toast-success .toast-icon {
    color: #059669;
}

.toast-error .toast-icon {
    color: #dc2626;
}

.toast-warning .toast-icon {
    color: #d97706;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 滚动条 */
.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.results-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .search-section {
        padding: 30px 20px;
    }

    .search-title {
        font-size: 2.5rem;
    }

    .search-box-container {
        max-width: 600px;
    }

    .results-section {
        margin: 0 10px 10px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 12px 16px;
    }

    .navbar-brand h1 {
        font-size: 1.3rem;
    }

    .search-section {
        padding: 20px 15px;
    }

    .search-title {
        font-size: 2rem;
    }

    .search-logo {
        font-size: 2.5rem;
    }

    .search-subtitle {
        font-size: 16px;
    }

    .search-input {
        padding: 18px 20px 18px 50px;
        font-size: 16px;
    }

    .search-icon {
        left: 20px;
        font-size: 18px;
    }

    .search-controls {
        flex-direction: column;
        width: 100%;
    }

    .search-button {
        width: 100%;
        padding: 18px 32px;
    }

    .search-type-select {
        width: 100%;
        padding: 16px 20px;
    }

    .action-button {
        justify-content: center;
        width: 100%;
    }

    .results-section {
        margin: 0 5px 5px;
        border-radius: 16px;
    }

    .results-header {
        padding: 20px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .results-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .result-card {
        padding: 24px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .result-actions {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .toast.show {
        transform: translateY(0);
    }
}