/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 主内容区域 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 搜索区域 */
.search-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    background: transparent;
    color: #333;
    border-radius: 50px;
}

.search-input::placeholder {
    color: #999;
    font-weight: 300;
}

.search-btn {
    border: none;
    outline: none;
    padding: 15px 25px;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-btn:active {
    transform: scale(0.98);
}

.search-icon {
    font-size: 1.2rem;
}

/* 结果区域 */
.result-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 400px;
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 结果卡片 */
.result-card {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    margin-bottom: 25px;
    text-align: center;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.result-description {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.result-image-container {
    display: flex;
    justify-content: center;
}

.result-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.result-image:hover {
    transform: scale(1.05);
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-abstract h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.result-abstract p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-link:hover {
    background: rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.link-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.result-link:hover .link-icon {
    transform: translateX(5px);
}

/* 错误消息 */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-icon {
    font-size: 3rem;
}

.error-message h3 {
    color: #e74c3c;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-message p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.retry-btn {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* 欢迎消息 */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.welcome-icon {
    font-size: 4rem;
    opacity: 0.8;
}

.welcome-message h3 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.welcome-message p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 平板端适配 (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .result-content {
        grid-template-columns: 1fr 1.5fr;
        gap: 25px;
    }
    
    .result-card {
        padding: 25px;
    }
}

/* 手机端适配 (最大768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        margin-bottom: 30px;
        padding: 15px 0;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        max-width: 100%;
        padding: 6px;
    }
    
    .search-input {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .search-btn {
        padding: 12px 20px;
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .search-text {
        display: none;
    }
    
    .result-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .result-title {
        font-size: 1.5rem;
    }
    
    .result-description {
        font-size: 1rem;
    }
    
    .result-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-image {
        max-width: 200px;
    }
    
    .result-abstract h3 {
        font-size: 1.2rem;
    }
    
    .result-abstract p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .result-actions {
        justify-content: center;
    }
    
    .welcome-message {
        padding: 40px 20px;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .welcome-message h3 {
        font-size: 1.5rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .error-message {
        padding: 30px 20px;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
    
    .error-message h3 {
        font-size: 1.3rem;
    }
}

/* 小屏手机适配 (最大480px) */
@media (max-width: 480px) {
    .title {
        font-size: 1.6rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        border-radius: 20px;
    }
    
    .search-input {
        border-radius: 15px;
        text-align: center;
    }
    
    .search-btn {
        border-radius: 15px;
        justify-content: center;
    }
    
    .search-text {
        display: inline;
    }
    
    .result-card {
        padding: 15px;
    }
    
    .result-title {
        font-size: 1.3rem;
    }
    
    .result-image {
        max-width: 150px;
    }
}