/* 全局统一样式 */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", system-ui, sans-serif;
}
:root{
    --main-color:#ff4444;
    --main-dark:#d83030;
    --blue:#007bff;
    --green:#28a745;
    --orange:#ff9500;
    --red:#dc3545;
    --bg:#f5f5f5;
    --card-bg:#ffffff;
    --border:#eeeeee;
    --text:#333333;
    --text-light:#666666;
}
body{
    background-color: var(--bg);
    color: var(--text);
    line-height:1.6;
}
.container{
    max-width:1200px;
    margin:0 auto;
    padding:15px;
}
.box{
    background:var(--card-bg);
    border-radius:8px;
    padding:24px;
}
/* 头部 */
/* 头部：视频背景 + 半透明蒙版 */
/* 头部 */
header{
    position: relative;
    height: 140px;
    overflow: hidden;
    color:#fff;
    /* 默认：手机端 GIF背景 */
    background-image: url("./video/bg.gif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 半透明蒙版 */
header::before {
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.55);
    z-index:1;
}
/* 默认手机：隐藏视频 */
header video.header-video{
    display:none;
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    min-width:100%;
    min-height:100%;
    width:auto;
    height:auto;
    object-fit:cover;
    z-index:0;
}
/* 头部文字 */
.header-top{
    position:relative;
    z-index:2;
    display:flex;
    justify-content:space-between;
    align-items:center;
    max-width:1200px;
    margin:0 auto;
    padding:0 15px;
    height:100%;
}
.header-top a{
    color:#fff;
    margin-left:15px;
    text-decoration:none;
}

/* ========== 媒体查询：屏幕宽度大于768px →电脑端 ========== */
@media (min-width:768px){
    header{
        /* 电脑端取消gif背景，交给video视频 */
        background-image:none;
    }
    header video.header-video{
        display:block;
    }
}

/* 按钮 */
.btn{
    display:inline-block;
    padding:10px 16px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-size:15px;
    text-decoration:none;
}
.btn-primary{
    background:#d69a8e;
    color:#fff;
}
.btn-danger{
    background:var(--main-color);
    color:#fff;
}
.btn-danger:hover{
    background:var(--main-dark);
}
.btn-warning{
    background:var(--orange);
    color:#fff;
}
.btn-success{
    background:var(--green);
    color:#fff;
}
.btn-red{
    background:var(--red);
    color:#fff;
}
/* 表单 */
input,textarea{
    width:100%;
    padding:10px;
    margin:8px 0;
    border:1px solid #ccc;
    border-radius:4px;
    font-size:14px;
}
table{
    border-collapse: collapse;
    width:100%;
}
th,td{
    border:1px solid #999;
    padding:8px;
    font-size:13px;
}
th{
    background:#eee;
}
.back{
    margin-bottom:16px;
}
.back a{
    color:#303942;
    text-decoration:none;
}
.err{
    color:var(--red);
    margin-bottom:10px;
}
/* 商品卡片 */
.goods-wrap{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:20px;
    margin:30px 0;
}
.goods-item{
    background:var(--card-bg);
    border-radius:8px;
    overflow:hidden;
    border:1px solid var(--border);
}
.goods-item a{
    text-decoration:none;
    color:inherit;
    display:block;
}
.goods-img{
    width:100%;
    height:260px;
    object-fit:cover;
}
.goods-body{
    padding:16px;
}
.goods-title{
    font-size:18px;
    font-weight:bold;
    margin-bottom:8px;
}
.price{
    color:var(--main-color);
    font-size:22px;
    font-weight:bold;
    margin:10px 0;
}
/* 订单 */
.order-item{
    background:var(--card-bg);
    padding:16px;
    border-radius:6px;
    margin-bottom:14px;
}
.status{
    font-weight:bold;
    margin:6px 0;
}
.none{color:var(--text-light);}
.waitpay{color:#ff6600;}
.paid{color:var(--green);}
.refund-apply{color:var(--orange);}
.refund-pass{color:var(--green);}
.refund-reject{color:var(--red);}
.btns{
    margin-top:10px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
/* 悬浮客服 */
.chat-float{
    position:fixed;
    bottom:20px;
    right:20px;
    z-index:999;
}
.chat-btn{
    width:60px;
    height:60px;
    background:var(--main-color);
    border-radius:50%;
    color:#fff;
    text-align:center;
    line-height:60px;
    font-size:14px;
    cursor:pointer;
    box-shadow:0 2px 12px rgba(0,0,0,0.15);
}
.chat-box{
    width:340px;
    height:420px;
    background:#fff;
    border-radius:8px;
    box-shadow:0 2px 16px rgba(0,0,0,0.1);
    display:none;
    flex-direction:column;
    margin-bottom:10px;
}
.chat-head{
    background:var(--main-color);
    color:#fff;
    padding:10px;
    font-weight:bold;
}
.chat-content{
    flex:1;
    padding:10px;
    overflow-y:auto;
    border-bottom:1px solid var(--border);
}
.chat-item{
    margin:6px 0;
    padding:6px;
    border-radius:4px;
    font-size:14px;
}
.chat-user{
    background:#e8f4ff;
    text-align:right;
}
.chat-admin{
    background:#f0f0f0;
    text-align:left;
}
.chat-input-wrap{
    display:flex;
    padding:8px;
    gap:6px;
}
.chat-input{
    flex:1;
    padding:8px;
    border:1px solid #ccc;
    border-radius:4px;
    margin:0;
}
.chat-send{
    background:var(--main-color);
    color:#fff;
    border:none;
    padding:0 12px;
    border-radius:4px;
    cursor:pointer;
}
/*聊天页面*/
.chatbox{
    border:1px solid #ccc;
    height:420px;
    overflow-y:auto;
    padding:12px;
    background:#fff;
    border-radius:6px;
    margin-bottom:12px;
}
.msg-user{
    text-align:right;
    margin:6px 0;
}
.msg-kf{
    text-align:left;
    margin:6px 0;
}
.bubble-user{
    display:inline-block;
    background:#007bff;
    color:#fff;
    padding:7px 11px;
    border-radius:8px;
    max-width:70%;
}
.bubble-kf{
    display:inline-block;
    background:#e8e8e8;
    color:#111;
    padding:7px 11px;
    border-radius:8px;
    max-width:70%;
}
.time{
    font-size:11px;
    color:#888;
    margin:3px 0;
}
.input-area{
    display:flex;
    gap:8px;
}
.input-area textarea{
    flex:1;
    height:60px;
    margin:0;
}
/*后台聊天*/
.item{
    border:1px solid #aaa;
    padding:12px;
    margin-bottom:16px;
    border-radius:6px;
}
.msg-row{
    margin:4px 0;
    padding:4px;
}
.user-msg{
    background:#e6f2ff;
}
.kf-msg{
    background:#f1f1f1;
}
footer{
    background:#222;
    color:#aaa;
    padding:25px;
    text-align:center;
    margin-top:50px;
    font-size:14px;
}
