/**
 * 菌种查询功能专用样式文件
 * 微生物菌种信息识别库共享服务平台
 */

/* 菌种查询区域样式 */
.search-section {
    padding: 15px 0;
    background-color: transparent;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-form {
    margin-bottom: 15px;
}

.search-input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-group input {
    flex: 1;
    height: 45px;
    padding: 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input-group input:focus {
    border-color: #34C759;
    box-shadow: 0 4px 20px rgba(52, 199, 89, 0.3);
    background-color: rgba(255, 255, 255, 1);
}

.search-input-group button {
    flex: 0 0 auto;
    width: 100px;
    height: 45px;
    padding: 0;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #34C759 0%, #28A745 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.5);
}

.search-input-group button:active {
    transform: translateY(0);
}

.search-input-group button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 加载指示器 */
.search-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.search-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007AFF;
    border-radius: 50%;
    animation: search-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes search-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 查询结果样式 */
.search-results {
    margin-top: 15px;
    text-align: left;
}

.search-species-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 199, 89, 0.1);
}

.search-species-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(52, 199, 89, 0.2);
}

.search-species-card-header {
    padding: 18px 25px;
    background: linear-gradient(135deg, #34C759 0%, #28A745 100%);
    color: white;
    position: relative;
}

.search-species-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #34C759, #28A745, #34C759);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.search-species-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-species-card-body {
    display: flex;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.search-species-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.search-species-image:hover {
    transform: scale(1.03);
}

.search-species-info {
    flex: 1;
}

.search-species-description {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-top: 15px;
    padding: 15px;
    background: rgba(52, 199, 89, 0.05);
    border-radius: 10px;
    border-left: 4px solid #34C759;
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* 查询错误模态框样式 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: search-modalFadeIn 0.3s ease-out;
}

@keyframes search-modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-modal-header {
    background-color: #007AFF;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.search-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.search-modal-close:hover {
    opacity: 1;
}

.search-modal-body {
    padding: 20px;
}

.search-modal-footer {
    padding: 15px 20px;
    text-align: right;
    border-top: 1px solid #eee;
}

.search-btn-primary {
    background-color: #007AFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.search-btn-primary:hover {
    background-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-species-card-body {
        flex-direction: column;
    }
    
    .search-species-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input-group button {
        margin-top: 10px;
    }
}