/* 搜索页面样式 */
.search-section {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title i {
    margin-right: 10px;
    color: #3498db;
}

.section-description {
    color: #7f8c8d;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-input {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    max-width: 500px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-primary i {
    margin-right: 8px;
}

.search-results-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-count {
    font-size: 14px;
    color: #7f8c8d;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background-color: #e9ecef;
    border-color: #3498db;
    transform: translateX(5px);
}

.stock-basic-info {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.stock-code {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
    background-color: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
}

.stock-name {
    color: #34495e;
    font-size: 16px;
    font-weight: 500;
}

.stock-market {
    font-size: 12px;
    color: #7f8c8d;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.stock-data-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.stock-price {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.stock-change {
    font-size: 14px;
    font-weight: 600;
}

.stock-change.up {
    color: #27ae60;
}

.stock-change.down {
    color: #e74c3c;
}

.change-percent {
    font-size: 12px;
    margin-left: 4px;
}

.stock-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.add-to-watchlist-btn {
    background-color: #27ae60;
    color: white;
}

.add-to-watchlist-btn:hover {
    background-color: #219a52;
}

.view-detail-btn {
    background-color: #3498db;
    color: white;
}

.view-detail-btn:hover {
    background-color: #2980b9;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background-color: white;
    color: #34495e;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.page-btn:hover:not(.disabled) {
    background-color: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-1px);
}

.page-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-results-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.no-results-hint {
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .search-result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .stock-data-info {
        justify-content: space-around;
    }
    
    .stock-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .stock-basic-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 10px;
    }
    
    .search-results-container {
        padding: 15px;
    }
    
    .search-result-item {
        padding: 12px;
    }
    
    .stock-data-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .stock-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .search-results-container {
        background-color: #1e293b;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .section-title {
        color: #e2e8f0;
    }
    
    .section-description {
        color: #94a3b8;
    }
    
    .search-input {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .search-input:focus {
        border-color: #38bdf8;
    }
    
    .search-result-item {
        background-color: #334155;
        border-color: transparent;
    }
    
    .search-result-item:hover {
        background-color: #475569;
        border-color: #38bdf8;
    }
    
    .stock-code {
        color: #e2e8f0;
        background-color: #0e7490;
    }
    
    .stock-name {
        color: #cbd5e1;
    }
    
    .stock-market {
        color: #94a3b8;
        background-color: #475569;
    }
    
    .stock-price {
        color: #e2e8f0;
    }
    
    .page-btn {
        background-color: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .page-btn:hover:not(.disabled) {
        background-color: #475569;
        border-color: #38bdf8;
    }
    
    .page-btn.active {
        background-color: #38bdf8;
        border-color: #38bdf8;
    }
    
    .no-results {
        color: #94a3b8;
    }
    
    .no-results i {
        color: #64748b;
    }
    
    .loading {
        color: #94a3b8;
    }
    
    .message.success {
        background-color: #064e3b;
        color: #a7f3d0;
        border-left-color: #10b981;
    }
    
    .message.error {
        background-color: #4c1d95;
        color: #fbcfe8;
        border-left-color: #be185d;
    }
}