/* Element Plus 自定义样式 */
[v-cloak] {
    display: none;
}

/* 整体布局 */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5;
}

/* 头部样式 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
}

.refresh-icon {
    font-size: 20px;
    margin-right: 10px;
    cursor: pointer;
    color: #409EFF;
    padding: 5px;
}

.refresh-icon:active {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.site-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-user,
.header-menu {
    margin-left: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #409EFF;
    padding: 5px;
}

.user-icon {
    color: #409EFF;
    text-decoration: none;
}

/* 内容区域样式 */
.content-container {
    flex: 1;
    padding: 30px 15px 70px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 轮播图样式 */
.banner-section {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

/* 兑换卡片样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
}

.exchange-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.exchange-card {
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.exchange-card:hover {
    transform: translateY(-2px);
}

.exchange-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header-left {
    display: flex;
    align-items: center;
}

.exchange-title {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 500;
}

.exchange-rate {
    font-size: 13px;
    color: #666;
}

.exchange-card-body {
    margin-top: 10px;
}

.exchange-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.exchange-info i {
    margin-right: 5px;
    font-size: 16px;
}

/* 支付选项卡片样式 */
.pay-option-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pay-option {
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pay-option .el-card__body {
    padding: 12px;
    display: flex;
    align-items: center;
}

.pay-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.pay-option-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}

.pay-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wechat-icon {
    background-color: #07c160;
    background-color: rgba(7, 193, 96, 0.1);
}

.alipay-icon {
    background-color: #1677ff;
    background-color: rgba(22, 119, 255, 0.1);
}

.pay-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pay-option-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.pay-option-button {
    display: flex;
    justify-content: flex-end;
}

.pay-option-button .el-button {
    padding: 8px 15px;
    font-size: 13px;
}

/* 安全提示样式 */
.safety-tips {
    margin-bottom: 20px;
}

/* 底部导航样式 */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55px;
    background-color: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 0;
}

.footer-nav {
    height: 100%;
}

.footer-row {
    height: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item:active,
.nav-item.active {
    color: #409EFF;
    font-weight: 500;
}

.nav-item:hover {
    color: #409EFF;
}

/* 调整移动端页面内容填充以适应底部导航栏 */
.content-container {
    padding-bottom: 70px;
}

/* 侧边菜单样式 */
.side-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    z-index: 2001;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.side-nav.active {
    left: 0 !important;
}

/* 遮罩层样式 */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
}

.backdrop.active {
    display: block !important;
}

.side-nav-header {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #f0f0f0;
}

.side-nav-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.side-nav-close {
    font-size: 22px;
    cursor: pointer;
    color: #666;
}

.side-nav-content {
    padding: 15px 0;
}

.side-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav-item {
    margin: 0;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.side-nav-item i {
    margin-right: 10px;
    font-size: 20px;
    min-width: 24px;
}

.side-nav-item:hover {
    background-color: #f5f5f5;
}

.side-nav-item.active {
    background-color: #e6f7ff;
    color: #1890ff;
}

.side-nav-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 10px 0;
}

.side-nav-section {
    padding: 10px 15px;
    color: #999;
    font-size: 12px;
}

.side-nav-footer {
    padding: 15px;
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}

.menu-item i {
    font-size: 18px;
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

.menu-item.active a {
    color: #409EFF;
    background-color: rgba(64, 158, 255, 0.1);
}

.menu-item a:hover {
    background-color: #f9f9f9;
}

/* 遮罩层样式 */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: none;
}

.backdrop.active {
    display: block !important;
}

/* 关闭按钮样式 */
.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    margin-left: 10px;
    line-height: 1;
}

.close:hover {
    color: #333;
}

/* 刷新图标旋转动画 */
.refresh-icon {
    cursor: pointer;
    font-size: 22px;
    margin-right: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.refresh-icon:hover {
    color: #1890ff;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotating 0.8s linear infinite;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 8px;
    z-index: 2001;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal.active {
    display: block;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #eee;
}

.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
}

.modal-mask.active {
    display: block;
}

.exchange-modal-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

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

.exchange-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.exchange-modal-text {
    flex: 1;
    margin-left: 15px;
    font-size: 16px;
    color: #333;
}

.btn-cancel {
    padding: 8px 20px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.btn-cancel:hover {
    background-color: #e8e8e8;
}

/* 交换选项样式 */
.pay-option-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.pay-option {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pay-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px 0 rgba(0, 0, 0, 0.1);
}

.pay-option-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    overflow: hidden;
}

.pay-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wechat-icon {
    background-color: rgba(7, 193, 96, 0.1);
}

.alipay-icon {
    background-color: rgba(22, 119, 255, 0.1);
}

.pay-option-content {
    flex: 1;
}

.pay-option-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.pay-option-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.rate-text {
    color: #f56c6c;
    font-weight: 500;
}

.exchange-btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.success-btn {
    background-color: #67c23a;
}

.primary-btn {
    background-color: #409EFF;
}

/* 加载动画样式 */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner-inner {
    position: relative;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #409EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* 响应式调整 */
@media screen and (min-width: 768px) {
    .content-container {
        max-width: 768px;
        margin: 0 auto;
    }

    .exchange-cards {
        grid-template-columns: 1fr 1fr;
    }
}