/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 37.5px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #262626;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f4f8 100%);
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-attachment: fixed;
}

#app {
    max-width: 640px;
    margin: 0 auto;
    background: linear-gradient(180deg, #e8f5fe 0%, #f0f8ff 100%);
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.18);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

img {
    vertical-align: middle;
    max-width: 100%;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 顶部导航栏 */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.app-title {
    font-size: 0.5rem;
    font-weight: 600;
    margin: 0;
}

.header-info {
    display: flex;
    align-items: center;
}

.official-tag {
    font-size: 0.28rem;
    padding: 0.08rem 0.2rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 滚动通知栏 */
.notice-bar {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    background-color: #fff7e6;
    border-bottom: 1px solid #ffe7ba;
    color: #fa8c16;
    font-size: 0.32rem;
}

.notice-icon {
    margin-right: 0.2rem;
    font-size: 0.36rem;
}

.notice-content {
    flex: 1;
    overflow: hidden;
}

.notice-scroll {
    height: 0.4rem;
    overflow: hidden;
    position: relative;
}

.notice-list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.notice-list li {
    height: 0.4rem;
    line-height: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 数据概览 */
.data-overview {
    padding: 0.5rem;
}

.data-card {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
    gap: 0.3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.3rem;
    padding: 0.4rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.data-item {
    text-align: center;
    padding: 0.3rem;
    background-color: #ffffff;
    border-radius: 0.2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.data-item:hover {
    background-color: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-label {
    font-size: 0.28rem;
    color: #8c8c8c;
    margin-bottom: 0.15rem;
    font-weight: 500;
}

.data-value {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.4rem;
    font-weight: 600;
    color: #1890ff;
}

.data-value img {
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.08rem;
}

/* 通用区块样式 */
.task-section,
.leaderboard-section,
.advantage-section {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 0.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
    border-left: 0.15rem solid #1890ff;
}

/* 任务大厅 */
.task-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.task-card {
    display: flex;
    align-items: center;
    padding: 0.4rem;
    background-color: #ffffff;
    border-radius: 0.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.task-card:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #91d5ff;
}

.task-icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f5ff;
    border-radius: 50%;
}

.task-icon img {
    width: 0.8rem;
    height: 0.8rem;
}

.task-info {
    flex: 1;
    text-align: left;
}

.task-name {
    font-size: 0.36rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.1rem;
}

.task-desc {
    font-size: 0.28rem;
    color: #8c8c8c;
}

.task-arrow {
    font-size: 0.36rem;
    color: #d9d9d9;
    margin-left: 0.2rem;
}

/* 会员日赚榜单 */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    max-height: 8rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

/* 自定义滚动条 */
.leaderboard-grid::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-grid::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}

.leaderboard-grid::-webkit-scrollbar-thumb {
    background: #b0b0b0;
    border-radius: 2px;
}

.leaderboard-grid::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

.leaderboard-item {
    background-color: #ffffff;
    border-radius: 0.3rem;
    padding: 0.4rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.5s ease-out;
}

.leaderboard-item:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #91d5ff;
}

.user-avatar {
    margin-bottom: 0.3rem;
}

.user-avatar img {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e6f7ff;
}

.user-name {
    font-size: 0.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.1rem;
}

.user-achievement {
    font-size: 0.26rem;
    color: #8c8c8c;
    margin-bottom: 0.15rem;
}

.user-earning {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.36rem;
    font-weight: 600;
    color: #52c41a;
    background-color: #f6ffed;
    padding: 0.12rem 0.25rem;
    border-radius: 1rem;
    border: 1px solid #b7eb8f;
    margin: 0 auto;
    width: fit-content;
}

.user-earning img {
    width: 0.35rem;
    height: 0.35rem;
    margin-right: 0.08rem;
}

/* 平台优势 */
.advantage-card {
    background-color: #f8fbff;
    border-radius: 0.3rem;
    padding: 0.5rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
    border: 1px solid #e6f4ff;
}

.advantage-text {
    font-size: 0.36rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 0.4rem;
    padding: 0.3rem;
    background: linear-gradient(135deg, #e6f7ff 0%, #f6ffed 100%);
    border-radius: 0.2rem;
}

.advantage-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.3rem;
    background-color: #fafafa;
    border-radius: 0.2rem;
    font-size: 0.32rem;
    color: #666;
}

.feature-icon {
    margin-right: 0.2rem;
    font-size: 0.36rem;
}

.feature-text {
    font-weight: 500;
}

/* 账户设置 */
.account-section {
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.account-card {
    background-color: #f8fbff;
    border-radius: 0.3rem;
    padding: 0.5rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
    border: 1px solid #e6f4ff;
    background: linear-gradient(135deg, #f8fbff 0%, #e6f4ff 100%);
    border: 1px solid #d9ecff;
}

/* 安全提示 */
.security-tip {
    display: flex;
    align-items: flex-start;
    padding: 0.4rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    border: 1px solid #91d5ff;
    border-radius: 0.3rem;
    box-shadow: 0 2px 8px rgba(145, 213, 255, 0.2);
}

.security-icon {
    font-size: 0.6rem;
    margin-right: 0.3rem;
    margin-top: 0.05rem;
}

.security-content {
    flex: 1;
}

.security-title {
    font-size: 0.36rem;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 0.15rem;
}

.security-text {
    font-size: 0.3rem;
    color: #595959;
    line-height: 1.5;
}

.account-item {
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #f0f0f0;
}

.account-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.account-subtitle {
    font-size: 0.36rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.account-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.form-input {
    flex: 1;
    min-width: 2rem;
    padding: 0.3rem 0.4rem;
    border: 1px solid #d9d9d9;
    border-radius: 0.2rem;
    font-size: 0.32rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.file-label {
    padding: 0.3rem 0.6rem;
    background-color: #f0f0f0;
    border: 1px solid #d9d9d9;
    border-radius: 0.2rem;
    font-size: 0.32rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.file-label:hover {
    background-color: #e6e6e6;
    border-color: #1890ff;
    color: #1890ff;
}

.form-btn {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    border-radius: 0.2rem;
    font-size: 0.32rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.4);
}

.account-tip {
    font-size: 0.28rem;
    color: #999;
    margin-top: 0.2rem;
}

/* 安全提醒 */
.security-reminder {
    display: flex;
    align-items: center;
    margin-top: 0.3rem;
    padding: 0.3rem;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 0.25rem;
    font-size: 0.28rem;
    color: #52c41a;
    line-height: 1.5;
}

/* 错误提示 */
.error-message {
    margin-top: 0.3rem;
    padding: 0.3rem;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 0.25rem;
    font-size: 0.28rem;
    color: #f5222d;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.reminder-icon {
    font-size: 0.36rem;
    margin-right: 0.2rem;
    flex-shrink: 0;
}

.reminder-text {
    flex: 1;
    font-weight: 500;
}

/* 图片预览 */
.image-preview-container {
    margin-bottom: 0.4rem;
}

.image-preview {
    width: 100%;
    height: 3rem;
    border: 2px dashed #d9d9d9;
    border-radius: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.image-preview:hover {
    border-color: #1890ff;
    background-color: #f0f8ff;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-placeholder {
    font-size: 0.32rem;
    color: #999;
}

/* 成功提示 */
.success-message {
    margin-top: 0.3rem;
    padding: 0.3rem;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 0.2rem;
    color: #52c41a;
    font-size: 0.32rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 - 移动端优先 */
@media (max-width: 640px) {
    html {
        font-size: 37.5px;
    }
    
    #app {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
    }
    
    .advantage-features {
        grid-template-columns: 1fr;
    }
    
    /* 任务页面移动端样式 */
    .task-section,
    .leaderboard-section,
    .advantage-section {
        padding: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .data-overview {
        padding: 0.3rem;
    }
    
    .account-section {
        padding: 0.3rem;
        margin-bottom: 0.5rem;
    }
    
    .notice-bar {
        padding: 0.2rem 0.3rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card,
.leaderboard-item,
.advantage-card {
    animation: fadeInUp 0.5s ease-out;
}

.task-card:nth-child(1) {
    animation-delay: 0.1s;
}

.task-card:nth-child(2) {
    animation-delay: 0.2s;
}

.task-card:nth-child(3) {
    animation-delay: 0.3s;
}

.task-card:nth-child(4) {
    animation-delay: 0.4s;
}