/* public/css/tasks.css */

:root {
    --primary-color: #fc466b;
    --secondary-color: yellow;
    --text-color: #ffffff;
    --modal-bg-color: #f8f8f8;
    --modal-content-bg: rgba(0, 0, 0, 0.5);
    --overlay-color: rgba(0, 0, 0, 0.7);
    --vip-color: #FFD700; /* 金色 */
    --regular-color: #C0C0C0; /* 银色 */
    --member-color: #CD7F32; /* 铜色 */
    --text-color: #ffffff;
}
.combined-order-icon {
    color: #ff9800;
    margin-left: 5px;
    font-size: 1.2em;
    vertical-align: middle;
    border: 2px solid #ff9800; /* 添加外边框 */
    padding: 2px 5px; /* 添加内边距 */
    border-radius: 5px; /* 添加圆角 */
    text-transform: uppercase; /* 文字大写 */
}
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
}

/* 页面全局滚动条样式 */
body {
    overflow-y: scroll; /* 确保页面始终显示滚动条 */
}

/* 滚动条轨道 */
body::-webkit-scrollbar {
    width: 5px; /* 滚动条的宽度 */
}

/* 滚动条轨道 */
body::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滚动条轨道的颜色 */
}

/* 滚动条滑块 */
body::-webkit-scrollbar-thumb {
    background: #888; /* 滚动条滑块颜色 */
    border-radius: 10px; /* 滑块的圆角 */
}

body::-webkit-scrollbar-thumb:hover {
    background: #555; /* 当鼠标悬停时滚动条滑块的颜色 */
}
.header {
    width: 100%;
    background-color: #333;
    padding: 10px;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
}

.centered {
    text-align: center; /* 居中对齐 */
    width: 100%; /* 占满宽度 */
}


#memberLevel {
    display: flex;
    align-items: center;
    cursor: pointer;
}

#memberLevel i {
    margin-right: 5px;
}

#memberLevelName {
    font-weight: bold;
    color: var(--text-color);
}

#memberLevelContainer:hover #memberLevelTooltip {
    display: block;
}

#memberLevelTooltip {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-color);
    padding: 10px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.user-level-info {
    width: 90%;
    margin: 10px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-details img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.user-info {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 5px;
    text-align: center;
}

.user-info span {
    font-weight: bold;
    margin: 0 5px;
}

#memberLevelContainer {
    width: 90%;
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
}

#memberLevelContainer .left-side,
#memberLevelContainer .right-side {
    width: 48%;
}

#memberLevelName {
    color: var(--vip-color); /* 默认颜色，可以根据会员等级动态修改 */
    font-size: 1.2em;
    margin-left: 10px;
}

.progress-container {
    margin-top: 10px;
}

.progress-bar {
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
}

.progress-bar-inner {
    background-color: #76c7c0;
    height: 100%;
    width: 0;
    transition: width 0.3s ease-in-out;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    margin-top: 5px;
}
/* 定义滚动条的样式 */
.vip-info {
    max-height: 200px; /* 根据需要调整高度 */
    overflow-y: auto;
}

/* 滚动条轨道 */
.vip-info::-webkit-scrollbar {
    width: 8px; /* 增加滚动条宽度 */
}

.vip-info::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滚动条轨道的颜色 */
}

/* 滋动条滑块 */
.vip-info::-webkit-scrollbar-thumb {
    background: #555; /* 滚动条滑块颜色 */
    border-radius: 10px; /* 圆角 */
}

.vip-info::-webkit-scrollbar-thumb:hover {
    background: #555; /* 当鼠标悬停时滚动条滑块的颜色 */
}

.vip-info ul {
    list-style-type: none;
    padding: 0;
    font-size: 0.5em;
}

.vip-info li {
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    color: var(--text-color);
}

.dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 90%;
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.dashboard-item {
    flex: 1 1 30%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 10px;
    text-align: center;
    color: var(--text-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.dashboard-item h3{
    font-size: 1em;
}
.dynamic-messages {
    width: 90%;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    padding: 10px;
    margin-bottom: 3em;
}

#taskContainer {
    width: 50%;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#startTaskBtn {
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
    background-image: linear-gradient(to right, #ff416c, #ff4b2b);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: auto;
}

#startTaskBtn:hover {
    transform: scale(1.05);
}

#startTaskBtn:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--overlay-color);
}

.modal-content {
    background: var(--modal-content-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.5s ease-out forwards;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #fff;
    color: #000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#taskDynamicTable {
    width: 100%;
    border-collapse: collapse;
}

#taskDynamicTable th,
#taskDynamicTable td {
    text-align: left;
    padding: 10px;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#taskDynamicTable th {
    background-color: rgba(255, 255, 255, 0.2);
}

#taskDynamicTable tr:last-child td {
    border-bottom: none;
}

#taskDynamicTable tr:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#matchingOrderAnimation {
    display: none; /* 默认隐藏 */
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.6); /* 半透明背景 */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-top: 20px;
    transition: all 0.3s ease;
}

#matchingOrderAnimation.show {
    display: block; /* 显示元素 */
    animation: fadeIn 0.5s ease-in-out, textBlink 1.5s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textBlink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 任务动态消息样式 */
.order-card {
    display: flex;
    flex-direction: column; /* 修改为纵向布局 */
    align-items: center; /* 水平居中 */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 10px;
    padding: 20px;
    color: var(--text-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.order-info {
    max-height: calc(100vh - 250px); /* 设置最大高度为视口高度减去一些固定空间 */
    overflow-y: auto; /* 当内容超出时，启用垂直滚动条 */
    padding-right: 10px; /* 确保滚动条不覆盖内容 */
    scroll-behavior: smooth; /* 平滑滚动 */
}

/* 自定义滚动条样式 */
.order-info::-webkit-scrollbar {
    width: 1px; /* 设置滚动条宽度为1px */
}

.order-info::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1); /* 设置滚动条轨道颜色 */
}

.order-info::-webkit-scrollbar-thumb {
    background-color: #888; /* 设置滚动条滑块颜色 */
    border-radius: 10px; /* 设置滚动条滑块的圆角 */
}

.order-info::-webkit-scrollbar-thumb:hover {
    background: #555; /* 设置滚动条滑块在悬停时的颜色 */
}

.order-card .product-image {
    margin-bottom: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.product-image{
    background: #fff;
    border-radius: 1em;
    padding: 0.5em;
    width: 90%;
    text-align: center;
    max-height: 5em;
    height: auto;
    overflow: hidden;
}
.product-image img {
    max-height: 5em;
    max-width: 100%;
    object-fit: contain;
}
.order-card .order-info {
    text-align: left;
    width: 100%;
}

.order-card .order-info .product-name {
    font-size: 1em;
    margin-bottom: 10px;
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 使用省略号表示溢出部分 */
}
.order-card .order-info .product-name:hover {
    white-space: normal; /* 在悬停时显示全部内容 */
    overflow: visible;
    text-overflow: clip;
}
.order-card .order-info .order-id,
.order-card .order-info .order-amount,
.order-card .order-info .order-commission,
.order-card .order-info .current-balance,
.order-card .order-info .order-status {
    margin: 5px 0;
}

.order-card .order-info .difference-message {
    color: yellow;
    font-weight: bold;
}

.icon-text-spacing {
    margin-right: 8px; /* 设置图标与文字之间的间隔 */
}

.order-card .confirm-btn {
    padding: 10px 20px;
    font-weight: bold;
    color: var(--text-color);
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    float: inline-end;
}
.order-card .confirm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.order-card .confirm-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

/* 无待支付订单信息样式 */
.no-pending-orders {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px;
}

.no-pending-orders .check-again-btn {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    color: var(--text-color);
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.no-pending-orders .check-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.no-pending-orders .check-again-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

.order-id {
    display: flex;
    align-items: center;
}

.combined-order {
    background-color: rgba(255, 152, 0, 0.1); /* 淡橙色背景 */
    border: 2px solid #ff9800; /* 橙色边框 */
    padding: 5px; /* 添加内边距 */
    border-radius: 5px; /* 添加圆角 */
}

@keyframes combinedOrderPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

.combined-order-animate {
    animation: combinedOrderPulse 2s infinite;
}

.combined-order-icon {
    color: #ff9800;
    margin-left: 5px;
    font-size: 1em;
    vertical-align: middle;
    border: 2px solid #ff9800; /* 添加外边框 */
    padding: 2px 5px; /* 添加内边距 */
    border-radius: 5px; /* 添加圆角 */
    text-transform: uppercase; /* 文字大写 */
}

/* 幸运订单样式 */
.lucky-order {
    color: gold;
    font-weight: bold;
    font-size: 10px;
    margin-left: 5px;
    position: absolute;
    border: 2px solid gold; /* 添加外边框 */
    padding: 2px 5px; /* 添加内边距 */
    border-radius: 5px; /* 添加圆角 */
    text-transform: uppercase; /* 文字大写 */
    animation: luckyOrderPulse 2s infinite; /* 添加特效 */
}

@keyframes luckyOrderPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}
