* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    color: #333;
    background-image: url('https://jbl-images.oss-cn-beijing.aliyuncs.com/2025/12/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 搜索结果页面背景图片 */
body.search-results {
    background-image: url('https://jbl-images.oss-cn-beijing.aliyuncs.com/2025/12/bg2.jpg');
}

.container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: block;
}

/* 搜索页面样式 */
.search-page-spacing {
    height: 230px;
}

.search-container {
    position: relative;
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 25px;
    padding: 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 4px 25px rgba(102, 126, 234, 0.3);
}

.search-icon {
    color: #667eea;
    font-size: 20px;
    margin-right: 10px;
}

#searchInput {
    flex: 1;
    border: none;
    padding: 18px 0;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
}

#searchInput::placeholder {
    color: #aaa;
}

.clear-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.clear-btn:hover {
    color: #999;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
}

.suggestion-item:hover,
.suggestion-item.highlight {
    background: #f8f9ff;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item .match {
    color: #667eea;
    font-weight: bold;
}

/* 结果页面样式 */
.result-info-with-back {
    background: transparent;
    padding: 15px 20px;
    border-radius: 15px;
    margin: 80px 0 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn-inline {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.back-btn-inline:hover {
    transform: scale(1.1);
}

.result-info {
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

.institution-info, .award-count {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 15px;
}

.award-count {
    font-weight: 500;
}

.institution-info i, .award-count i {
    color: #667eea;
}

/* 奖项展示区域 */
.awards-container {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.swiper-container {
    height: calc(100% - 60px);
    position: relative;
}

.swiper-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.award-item {
    flex: 0 0 100%;
    height: 100%;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.award-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.award-image:active {
    cursor: grabbing;
}

.swiper-pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 8px;
}

.swiper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s;
}

.swiper-dot.active {
    width: 24px;
    background: #667eea;
    border-radius: 4px;
}

.swipe-hint {
    text-align: center;
    margin-top: 35px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 加载动画 */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-container p {
    color: #667eea;
    font-size: 18px;
    font-weight: 500;
}

/* 提示框 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 图片放大模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.image-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: block;
}

/* 移动端响应式调整 */
@media (max-width: 480px) {
    .page {
        padding: 15px;
    }
    
    .search-btn {
        padding: 15px;
        font-size: 16px;
    }
    
    .awards-container {
        height: 65vh;
    }
    
    .image-modal img {
        max-width: 95vw;
        max-height: 85vh;
    }
}