/* 基于Layui框架的美化样式 - 充分利用Layui内置组件和主题色彩 */

/* 基础样式重置和Layui主题优化 */
h1{font-size: 20px;font-weight: bold;}
h2{font-size: 18px;font-weight: bold;}
h3{font-size: 16px;font-weight: 600;}
::-webkit-input-placeholder{color: #999}

/* 使用Layui默认背景色，保持框架一致性 */
body{
    background-color: #F2F3F5;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* 确保header容器正确显示 */
.layui-layout {
    position: relative;
}

.layui-layout-admin {
    position: relative;
}

/* 强制确保header显示 */
.header-index {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 头部导航栏 - 基于Layui主题色优化 */
.header{
    height: 60px; 
    background-color: #393D49;
    position: relative;
    overflow: visible;
    z-index: 1000;
    width: 100%;
    display: block;
}

.logo{
    position: absolute; 
    left: 0;
    top: 13px;
    z-index: 1001;
}

.logo img{
    width: 210px;
}

.header .layui-nav{
    position: absolute; 
    right: 0; 
    top: 0;
    padding: 0; 
    background: none;
    z-index: 1001;
}

.header .layui-nav .layui-nav-item[mobile]{display: none;}

/* Layui主题色彩变体 - 保持原有季节主题 */
.header-index[spring]{border: none; background: linear-gradient(135deg, #0D1206 0%, #1a2e0a 100%);}
.header-index[summer]{border: none; background: linear-gradient(135deg, #0A0E11 0%, #1a1f2e 100%);}
.header-index[autumn]{border: none; background: linear-gradient(135deg, #100903 0%, #2e1a0a 100%);}
.header-index[winter]{border: none; background: linear-gradient(135deg, #110F25 0%, #2a1f4a 100%);}

/* Header 修复样式 - 来自 header-fix.css */
.header-demo{
    height: 60px; 
    border-bottom: none;
}

.header-demo .layui-nav{
    top: 0;
}


/* 导航宽度 */
.header-width{width:1330px!important;margin:0 auto!important;}

/* 导航菜单悬停效果 - 使用Layui主题色 */
.layui-nav .layui-nav-item > a {
    color: #ecf0f1;
}

.layui-nav .layui-nav-item > a:hover {
    color: #5FB878;
}

.layui-nav .layui-nav-child a:hover {
    color: #5FB878;
}

/* 统计卡片美化 - 基于Layui卡片组件 */
.states{
    text-align: center;
    padding: 20px 15px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    margin: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e6e6e6;
}

.states::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5FB878, #FF5722, #FF9800, #2196F3);
    background-size: 300% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.states:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #5FB878;
}

.states .t1{
    font-size: 1.4rem;
    display: block;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.states .t2{
    font-size: 0.9rem;
    display: block;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Layui容器优化 */
.layui-container {
    padding: 0;
    margin: 10px auto;
}

/* Layui卡片组件美化 */
.layui-card {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
}

.layui-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.layui-card-header {
    background: linear-gradient(135deg, #5FB878 0%, #4CAF50 100%);
    border-bottom: 1px solid #4CAF50;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    padding: 20px 15px;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.layui-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.layui-card-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.layui-card-body {
    padding: 5px;
}

/* Layui表格组件美化 */
.layui-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none !important;
}

.layui-table thead tr {
    background: linear-gradient(135deg, #5FB878 0%, #4CAF50 100%);
}

.layui-table thead tr th {
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 15px 10px;
    border: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 表格顶部间距 */
.layui-table {
    margin-top: 10px;
}

.layui-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f2f6;
}

.layui-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.layui-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

.layui-table td {
    padding: 12px 10px;
    border: none;
    vertical-align: middle;
    color: #2c3e50;
}

/* 币种图标美化 */
[id^="img-"] {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

[id^="img-"]:hover {
    transform: scale(1.1);
    border-color: #5FB878;
    box-shadow: 0 4px 8px rgba(95, 184, 120, 0.3);
}

/* 价格变动动画 - 保持原有功能，优化视觉效果 */
.text_tick{
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    padding-right: 20px !important;
    position: relative;
}

.text_tick_redMov{
    animation: priceUp 0.8s ease-out;
    background: linear-gradient(45deg, rgba(255, 87, 34, 0.1), rgba(255, 87, 34, 0.05));
    border-radius: 4px;
    padding: 2px 6px;
}

.text_tick_greenMov{
    animation: priceDown 0.8s ease-out;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-radius: 4px;
    padding: 2px 6px;
}

@keyframes priceUp {
    0% { 
        background-color: rgba(255, 87, 34, 0.3);
        transform: scale(1);
    }
    50% { 
        background-color: rgba(255, 87, 34, 0.2);
        transform: scale(1.02);
    }
    100% { 
        background-color: rgba(255, 87, 34, 0);
        transform: scale(1);
    }
}

@keyframes priceDown {
    0% { 
        background-color: rgba(76, 175, 80, 0.3);
        transform: scale(1);
    }
    50% { 
        background-color: rgba(76, 175, 80, 0.2);
        transform: scale(1.02);
    }
    100% { 
        background-color: rgba(76, 175, 80, 0);
        transform: scale(1);
    }
}

/* 箭头动画优化 */
.arrow_red {
    position: relative;
    color: #FF5722 !important;
}

.arrow_red:after {
    content: "↓";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    animation: arrowMove 2s ease-out;
}

.arrow_green {
    position: relative;
    color: #4CAF50 !important;
}

.arrow_green:before {
    content: "↑";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    animation: arrowMove 2s ease-out;
}

@keyframes arrowMove {
    0% { opacity: 1; transform: translateY(-50%) scale(1.2); }
    70% { opacity: 0.8; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(0.8); }
}

/* 搜索框样式已移动到 search.css */

/* Layui按钮组件美化 */
.layui-btn {
    border-radius: 4px;
    transition: all 0.3s ease;
}

.layui-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.layui-btn-primary {
    background-color: #5FB878;
    border-color: #5FB878;
}

.layui-btn-primary:hover {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

/* showmore 样式定义 */
.showmore {
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
}

.showmore .layui-btn {
    border-radius: 20px;
    padding: 0 30px;
    font-weight: 500;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 14px;
}

.showmore .layui-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .showmore {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .showmore .layui-btn {
        width: 100%;
        max-width: 200px;
        padding: 0 24px;
    }
}

/* 币种页面 */
.bgfff {
    background: #fff;
}

.flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.flex-v {
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

.flex-1 {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.flex-align-center {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

.flex-align-start {
    -webkit-box-align: flex-start;
    -webkit-align-items: flex-start;
    -ms-flex-align: flex-start;
    align-items: flex-start;
}

.flex-align-end {
    -webkit-box-align: flex-end;
    -webkit-align-items: flex-end;
    -ms-flex-align: flex-end;
    align-items: flex-end;
}

.flex-pack-center {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.flex-pack-end {
    -webkit-box-pack: flex-end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    justify-content: flex-end;
}

.flex-pack-justify {
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.flex-no-shrink {
    flex-shrink: 0;
}

.flex-warp {
    flex-flow: wrap
}

.flex-column {
    flex-flow: column
}

.product-detail .top-box {
    padding: 0 20px;
    width: 100%;
}

.product-detail .coin-box {
    padding-top: 36px;
}

.product-detail .coin-box .info .img {
    width: 66px;
    height: 66px;
    margin-right: 12px;
    flex-shrink: 0;
}

.product-detail .coin-box .info .name {
    font-size: 26px;
    font-weight: bold;
    color: #333333;
    line-height: 30px;
}

.product-detail .coin-box .info .cname {
    font-size: 14px;
    color: #666666;
    line-height: 32px;
}

.product-detail .coin-box .operation {
    padding-top: 6px;
}

.product-detail .coin-box .operation .btn {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #000000;
    line-height: 32px;
    border-radius: 2px 2px 2px 2px;
    border: 1px solid #C0C0C0;
    padding: 0 10px;
    margin-left: 4px;
    cursor: pointer;
}

.product-detail .coin-box .operation .btn.t2 {
    background: #006BE9;
    color: #fff;
    border: 0;
}

.product-detail .coin-box .operation .btn.t2 a {
    color: #fff;
}

.product-detail .coin-box .operation .btn .icon {
    width: 12px;
    height: 12px;
    margin-right: 4px;
    flex-shrink: 0;
    object-fit: contain;
}

.product-detail .coin-box .price {
    display: flex;
    align-items: flex-end;
}

.product-detail .coin-box .price .p1 {
    font-size: 40px;
    font-weight: 500;
    /*color: #E1322D;*/
    color: #333333;
    font-weight: bold;
    line-height: 1;
    padding-right: 20px;
}

.product-detail .coin-box .price .p2 {
    font-size: 24px;
    font-weight: 500;
    color: #333333;
    line-height: 30px;
    padding-right: 8px;
}

.product-detail .coin-box .price .p3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 30px;
}

.product-detail .coin-box .order {
    font-size: 14px;
    color: #666666;
}

.product-detail .coin-box .order .num {
    display: inline-block;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 26px;
    height: 26px;
    background: #14B185;
    border-radius: 100px 100px 100px 100px;
    padding: 0 10px;
}

.product-detail .coin-box .date {
    font-size: 14px;
    color: #656565;
    line-height: 32px;
    border-bottom: 1px solid #EAEAEA;
    padding-left: 5px;
    padding-top: 4px;
    padding-bottom: 14px;
}

.product-detail .coin-box .top {
    padding-bottom: 16px;
}

.product-detail .else-info {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 0;
}

.product-detail .else-info .item {
    display: flex;
    font-size: 14px;
    color: #666666;
    line-height: 32px;
    width: 25%;
    padding-right: 1%;
    box-sizing: border-box;
}

.product-detail .else-info .item .name {
    flex-shrink: 0;
    /*width: 70px;*/
    text-align: justify;
    text-align-last: justify;
}

.product-detail .else-info .item .val {
    padding-left: 8px;
}

@media (max-width: 768px){
    .product-detail .coin-box .price .p1 {
        font-size: 30px;
    }
    .product-detail .coin-box .price .p2 {
        font-size: 20px;
    }
    .product-detail .top-box {
        padding: 0 10px;
        width: 100%;
    }
    .product-detail .else-info .item {
        width: 50%;
    }
    .product-detail .coin-box .price .p4 {
        display: block;
        padding-top: 5px;
        padding-left:10px;
    }
}

/* 页脚美化 - 使用Layui主题色 */
.footer{
    clear: both;
    margin: 20px auto 0;
    font-size: 12px;
    letter-spacing: 2px;
    text-align: center;
    line-height: 22px;
    padding: 20px 0;
    background: linear-gradient(135deg, #393D49 0%, #2F4056 100%);
    color: #ecf0f1;
    
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer a{
    color: #5FB878;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover{
    color: #4CAF50;
}

/* 人民币价格字体样式 */
.xiaozi{
    font-size: 0.8em;
    font-weight: normal !important;
    color: #858a90;
    display: block;
}

/* 表格行悬停效果 */
.my-table tbody tr:hover {
    background-color: #f0f9ff;
}

/* 响应式设计 - 基于Layui栅格系统 */
@media (max-width: 768px) {
    .header-width {
        width: auto !important;
        margin: 0 !important;
    }
    
    .logo {
        left: 10px;
    }
    
    .logo img {
        width: 150px;
    }
    
    .header .layui-nav {
        right: 10px;
    }
    
    .layui-container {
        margin: 5px;
    }
    
    .states {
        margin: 3px;
        padding: 15px 10px !important;
    }
    
    .states .t1 {
        font-size: 0.9rem;
    }
    
    .states .t2 {
        font-size: 0.8rem;
    }
    
    .layui-table thead tr th {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .layui-table td {
        padding: 8px 5px;
    }
    
    [id^="img-"] {
        width: 24px;
        height: 24px;
        margin-right: 6px;
    }
    
    /* 移动端币种列宽度限制 */
    .layui-table th:nth-child(2),
    .layui-table td:nth-child(2) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .ellipsis {
        max-width: 120px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    .layui-card-header h3 {
        font-size: 20px;
    }
    
    /* 移动端搜索框样式已移动到 search.css */
}

/* Vue加载状态 */
[v-cloak] {
    display: none;
}

/* 分页组件美化 */
.page {
    width: 99%;
    text-align: center;
    padding: 15px 0;
    vertical-align: middle;
    font-size: 0;
    background-color: #fff;
    border-radius: 8px;
    margin-top: 10px;
}

.page a {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 1px solid rgba(255,255,255,.5);
    border-radius: 0;
}

.page .layui-btn {
    min-width: 35px !important;
    border-radius: 4px;
}

/* 搜索框下拉样式已移动到 search.css */

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #5FB878;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4CAF50;
}

/* 加载动画 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 表格标题样式 */
.layui-table th {
    text-align: center;
}

.layui-table th:nth-child(1) { text-align: center; }
.layui-table th:nth-child(3) { text-align: right; }
.layui-table th:nth-child(4) { text-align: right; }
.layui-table th:nth-child(5) { text-align: right; }
.layui-table th:nth-child(6) { text-align: right; }
.layui-table th:nth-child(7) { text-align: right; }
.layui-table th:nth-child(8) { text-align: right; }
.layui-table th:nth-child(9) { text-align: right; }
.layui-table th:nth-child(10) { text-align: right; }

/* 币种列宽度限制和文本溢出处理 */
.layui-table th:nth-child(2),
.layui-table td:nth-child(2) {
    max-width: 200px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 币种列悬停时显示完整名称 */
.layui-table td:nth-child(2):hover {
    overflow: visible;
    white-space: normal;
    background-color: #f8f8f8;
    z-index: 10;
    position: relative;
}

/* 表单元素美化 */
.layui-form-item {
    float: left;
    margin: 5px 0 0 5px;
}

.layui-btn-group {
    float: right;
    margin: 8px 5px 0 0;
}

/* 输入框焦点效果 */
input:focus {
    border-color: #5FB878;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(95, 184, 120, 0.2);
}

/* 链接悬停效果 */
.layui-table a:hover {
    color: #5FB878;
}

/* 数据来源样式 */
.source {
    text-align: right;
    color: #c2c2c2;
    font-size: 0.8rem;
}

.source a {
    color: #2F4056;
}

.source a:hover {
    color: #5FB878;
}

/* 时间显示样式 */
.datetime {
    color: #c2c2c2;
    font-size: 12px;
}

/* 卡片内容段落样式 */
.layui-card-body p {
    text-indent: 2em;
    line-height: 1.6;
}

/* 按钮最小宽度 */
.layui-btn-sm {
    min-width: 60px;
}

/* 币种页面样式 */
#img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    border-radius: 50%;
    object-fit: cover;
}

/* SVG图表样式 */
.svg {
    width: 150px;
    height: 50px;
    text-align: center;
    box-sizing: content-box;
}

/* 颜色类 */
.red { color: #FF5722; }
.blue { color: #2196F3; }
i { color: #ddd; }

/* 背景色类 */
.bg-asc-color { background-color: #4CAF50; }
.bg-dec-color { background-color: #FF5722; }
