/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 顶部导航样式 */
.profile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.profile-header h1 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内容区域样式 */
body {
    background-color: #141428;
    color: #fff;
    padding: 20px 15px 70px;  /* 增加底部内边距，为导航栏留出空间 */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

/* 卡片容器样式 */
.profile-container {
    width: 100%;
    max-width: 100%;
    
    margin: 0 auto;
}

/* 卡片通用样式 */
.profile-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 15px;
    width: 100%;
}

/* 用户信息卡片样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 30px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-detail {
    flex: 1;
    min-width: 0;
}

.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.user-header h2 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.user-id {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 积分卡片样式 */
.points-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.points-card h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.points-num {
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap;
}

.points-progress {
    margin-top: 10px;
    width: 100%;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
    width: 100%;
}

.progress {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 5px 0 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 适配刘海屏 */
@supports (padding-top: env(safe-area-inset-top)) {
    .profile-header {
        padding-top: env(safe-area-inset-top);
        height: calc(50px + env(safe-area-inset-top));
    }
    
    body {
        padding-top: calc(65px + env(safe-area-inset-top));
    }
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .profile-container {
        padding: 0 12px;
    }

    .profile-card {
        padding: 12px;
    }

    .user-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .user-header h2 {
        font-size: 16px;
    }

    .user-id {
        font-size: 12px;
    }

    .points-num {
        font-size: 20px;
    }

    .auth-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* 用户信息卡片中的按钮样式 */
.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-btn {
    padding: 4px 10px;
    border-radius: 12px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.auth-btn.register {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: #fff;
}

.auth-btn.login {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 弹窗样式 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.auth-modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    overflow: hidden;
    /* animation: modalShow 0.3s ease; */
}

.modal-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.modal-body {
    padding: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    padding: 0 15px;
    margin-bottom: 12px;
    font-size: 14px;
}

.input-group input[type="password"] {
    letter-spacing: 2px;
}

.input-group textarea {
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    padding: 10px 15px;
    margin-bottom: 12px;
    resize: none;
    font-size: 14px;
}

/* 输入框焦点样式 */
.input-group input:focus,
.input-group textarea:focus {
    border-color: rgba(255, 215, 0, 0.5);
    outline: none;
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .input-group input,
    .input-group textarea {
        font-size: 13px;
    }
    
    .input-group textarea {
        height: 60px;
    }
}

/* 修改表单样式 */
.auth-form {
    width: 100%;
}

.verify-group {
    display: flex;
    gap: 10px;
}

.verify-group input {
    flex: 1;
    margin-bottom: 0;
}

.verify-btn {
    width: 100px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #ffd700;
    font-size: 13px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    border: none;
    border-radius: 22px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 会员中心卡片样式 */
.vip-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-left i {
    color: #ffd700;
    font-size: 18px;
}

.header-left h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.vip-status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.vip-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.benefit-item i {
    color: #ffd700;
    font-size: 20px;
}

.benefit-item span {
    color: #fff;
    font-size: 12px;
}

/* 会员开通按钮样式 */
.open-vip-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(45deg, #ff4757, #ff6b81);
    border: none;
    border-radius: 22px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.open-vip-btn:active {
    transform: scale(0.98);
}

/* 限时特惠卡片样式 */
.discount-card .countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ff4757;
    font-size: 14px;
}

.discount-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.discount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.discount-title {
    color: #fff;
    font-size: 15px;
    margin-bottom: 4px;
}

.discount-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    color: #ff4757;
    font-size: 18px;
    font-weight: bold;
}

.original-price {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    text-decoration: line-through;
}

.buy-btn {
    padding: 6px 15px;
    background: #ff4757;
    border: none;
    border-radius: 15px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .benefit-item {
        padding: 10px;
    }
    
    .benefit-item i {
        font-size: 18px;
    }
    
    .discount-item {
        padding: 10px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .buy-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* 快捷操作卡片样式 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.quick-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.quick-card:active {
    transform: scale(0.98);
}

.quick-card i {
    font-size: 24px;
    margin-bottom: 4px;
}

.quick-card .card-info {
    text-align: center;
}

/* 金币卡片样式调整 */
.coins-card .card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coins-card .balance {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.coins-card .label {
    color: #ffd700;
    font-size: 14px;
    font-weight: 500;
}

.coins-card i {
    color: #ffd700;
    font-size: 26px;
    margin-bottom: 6px;
}

/* 邀请卡片 */
.invite-card i {
    color: #ff4757;
}

/* 代理卡片 */
.agent-card i {
    color: #4cd964;
}

.quick-card .label {
    color: #fff;
    font-size: 14px;
    margin-bottom: 2px;
}

.quick-card .desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .quick-card {
        padding: 12px;
    }
    
    .quick-card i {
        font-size: 20px;
    }
    
    .coins-card .balance {
        font-size: 16px;
    }
    
    .quick-card .label {
        font-size: 13px;
    }
    
    .quick-card .desc {
        font-size: 11px;
    }
}

/* 常用功能卡片 */
.function-card {
    margin-top: 15px;
}

.function-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 15px 0;
}

.function-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 15px 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.function-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px 15px 0 0;
}

.function-item i {
    font-size: 26px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* 不同图标颜色 */
.function-item:nth-child(1) i {
    color: #ff6b6b;  /* 订单图标-红色 */
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.function-item:nth-child(2) i {
    color: #4ecdc4;  /* 购买图标-青色 */
    text-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
}

.function-item:nth-child(3) i {
    color: #ff75a0;  /* 收藏图标-粉色 */
    text-shadow: 0 0 15px rgba(255, 117, 160, 0.3);
}

.function-item:nth-child(4) i {
    color: #a17fe0;  /* 历史图标-紫色 */
    text-shadow: 0 0 15px rgba(161, 127, 224, 0.3);
}

.function-item span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    white-space: nowrap;  /* 文字不换行 */
}

/* 悬停效果 */
.function-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.function-item:active {
    transform: translateY(0);
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .function-grid {
        gap: 8px;
        padding: 12px 8px;
    }
    
    .function-item {
        padding: 12px 8px;
    }
    
    .function-item i {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .function-item span {
        font-size: 12px;
    }
}

/* 适配大屏幕 */
@media screen and (min-width: 768px) {
    .function-grid {
        gap: 15px;
        padding: 20px;
    }
    
    .function-item {
        padding: 20px 15px;
    }
    
    .function-item i {
        font-size: 30px;
        margin-bottom: 12px;
    }
    
    .function-item span {
        font-size: 15px;
    }
}

/* 邀请码和兑换码卡片 */
.promo-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.invite-code-card, .redeem-code-card {
    margin: 0;
    height: 100%;
}

.invite-code-card i {
    color: #ff6b6b;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.redeem-code-card i {
    color: #40ffff;
    text-shadow: 0 0 15px rgba(64, 255, 255, 0.3);
}

/* 适配小屏幕 */
@media screen and (max-width: 360px) {
    .promo-cards {
        gap: 8px;
    }
}

/* 适配大屏幕 */
@media screen and (min-width: 768px) {
    .promo-cards {
        gap: 15px;
    }
}

/* Toast提示样式 */
.toast {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
} 