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

body {
    font-family: 'Arial', sans-serif;
    background: #ff6e7f;
    background: -webkit-linear-gradient(to bottom, #bfe9ff, #ff6e7f);
    background: linear-gradient(to bottom, #bfe9ff, #ff6e7f);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: #333;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 头部区域 */
.header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
}

.follow-text {
    color: #4a90e2;
    font-size: 14px;
    white-space: nowrap;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0;
}

.subtitle {
    color: #555;
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

/* 搜索框区域 - 解决出界和自动放大问题 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 110, 127, 0.3);
    border-radius: 6px;
    font-size: 16px !important; /* 强制16px防止iOS放大 */
    background-color: rgba(255, 255, 255, 0.85);
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 0;
    touch-action: manipulation; /* 优化触摸操作 */
}

#search-btn {
    background: linear-gradient(to right, #ff6e7f, #4a90e2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    white-space: nowrap;
}

#search-btn:hover {
    transform: scale(1.02);
}

/* 响应式布局 */
@media (max-width: 480px) {
    .search-container {
        padding: 20px 15px;
    }

    .search-box {
        gap: 8px;
    }

    #search-input {
        padding: 10px 12px;
        font-size: 16px !important; /* 保持16px */
    }

    #search-btn {
        padding: 0 15px;
        font-size: 14px;
    }
}

/* 结果区域 */
.result-container {
    display: none;
}

.result-count {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 14px;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.result-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.result-link {
    color: #3498db;
    text-decoration: none;
    margin-bottom: 5px;
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}