* {
    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;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f7fa;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: block;
}

/* 搜索页面样式 */
.header {
    text-align: center;
    margin: 30px 0 40px;
    color: #333;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: #666;
    font-size: 16px;
}

.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;
}

.hot-institutions {
    margin-top: 40px;
}

.hot-institutions h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 16px;
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.search-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.instructions {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.instructions ol {
    padding-left: 20px;
    color: #666;
}

.instructions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 结果页面样式 */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0 30px;
    position: sticky;
    top: 0;
    background: #f5f7fa;
    z-index: 100;
}

.back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: scale(1.1);
}

.result-header h2 {
    flex: 1;
    text-align: center;
    color: #333;
    font-size: 22px;
}

.header-placeholder {
    width: 40px;
}

.result-info {
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
}

.institution-info, .award-count {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 15px;
}

.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;
    background: white;
    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: 15px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.save-tips {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* 加载动画 */
.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);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .page {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .search-btn {
        padding: 15px;
        font-size: 16px;
    }
    
    .awards-container {
        height: 65vh;
    }
}