/* ============================================================
   webA9 游戏官网 暗黑风格样式表 (本地CSS)
   配色：暗黑底 + 金色主色，游戏官网风格
   ============================================================ */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body{
    min-height: 100%;
}
body{
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background: #121212 url('') no-repeat center / cover;
    background: linear-gradient(160deg, #0f0f0f 0%, #1a1a1a 50%, #141414 100%);
    color: #e8e8e8;
    padding: 20px 14px;
    -webkit-font-smoothing: antialiased;
}

/* 外层卡片容器 */
.wrap{
    max-width: 430px;
    margin: 4vh auto 20px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 34px 32px 30px;
    box-shadow: 0 10px 34px rgba(0,0,0,.65);
    position: relative;
}
.wrap:before{
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f0c860, transparent);
    border-radius: 0 0 4px 4px;
}
/* 页面标题 */
h3{
    text-align: center;
    font-size: 22px;
    color: #f0c860;
    letter-spacing: 3px;
    margin-bottom: 6px;
    font-weight: 700;
}
.subtitle{
    text-align: center;
    font-size: 12px;
    color: #777;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

/* 提示消息框 */
.msg{
    padding: 10px 14px;
    border-radius: 6px;
    margin: 14px 0 18px;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}
.msg.green{
    background: rgba(76, 217, 100, .12);
    color: #4cd964;
    border: 1px solid rgba(76, 217, 100, .3);
}
.msg.red{
    background: rgba(255, 59, 48, .12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 59, 48, .3);
}

/* 表单 */
.form-item{
    margin-bottom: 18px;
}
/* 实时校验提示 */
.field-tip{
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
    line-height: 1.4;
}
.field-tip.good{
    color: #4cd964;
}
.field-tip.bad{
    color: #ff6b6b;
}
.form-item label{
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #aaa;
    letter-spacing: 1px;
}
.form-item input{
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}
.form-item input:focus{
    outline: none;
    border-color: #f0c860;
    box-shadow: 0 0 6px rgba(240, 200, 96, .25);
}
.form-item input::placeholder{
    color: #666;
}
/* 说明编辑框（商城管理页）：固定大小，不可拖动，与输入框同风格 */
.form-item textarea.shop-desc-input{
    width: 100%;
    height: 76px;
    resize: none;
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.form-item textarea.shop-desc-input:focus{
    outline: none;
    border-color: #f0c860;
    box-shadow: 0 0 6px rgba(240, 200, 96, .25);
}
.form-item textarea.shop-desc-input::placeholder{
    color: #666;
}
/* 下拉选择框（转职页） */
.form-item select{
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}
.form-item select:focus{
    outline: none;
    border-color: #f0c860;
    box-shadow: 0 0 6px rgba(240, 200, 96, .25);
}
.form-item select option{
    background: #2a2a2a;
    color: #fff;
}
/* 文件上传框（商城管理页） */
.form-item input[type=file]{
    padding: 9px 12px;
    height: auto;
    background: #2a2a2a;
    border: 1px dashed #3a3a3a;
    border-radius: 6px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}
.form-item input[type=file]:hover{
    border-color: #f0c860;
}
.form-item input[type=file]::-webkit-file-upload-button{
    background: linear-gradient(135deg, #e8b93a, #c9971f);
    border: none;
    border-radius: 4px;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    padding: 5px 12px;
    margin-right: 10px;
    cursor: pointer;
}

/* 验证码一行 */
.captcha-row{
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-row input{
    flex: 1;
}
.captcha-row img{
    height: 42px;
    width: 120px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #3a3a3a;
}

/* 提交按钮 */
button[type=submit]{
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #e8b93a, #c9971f);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all .2s;
}
button[type=submit]:hover{
    background: linear-gradient(135deg, #f5cc4d, #d9a92c);
    box-shadow: 0 4px 14px rgba(240, 200, 96, .3);
}
button[type=submit]:disabled{
    opacity: .6;
    cursor: not-allowed;
}

/* 底部链接 */
.link-group{
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #2c2c2c;
    text-align: center;
    font-size: 14px;
}
.link-group a{
    color: #f0c860;
    text-decoration: none;
    margin: 0 10px;
    transition: color .2s;
}
.link-group a:hover{
    color: #ffdd77;
    text-decoration: underline;
}

/* 用户中心 */
.user-info{
    line-height: 2.4;
    font-size: 15px;
    color: #ccc;
    margin: 8px 0 20px;
}
.user-info span{
    color: #f0c860;
    font-weight: 700;
}
.logout-btn{
    width: 100%;
    height: 46px;
    margin-top: 8px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #e8b93a, #c9971f);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all .2s;
}
.logout-btn:hover{
    background: linear-gradient(135deg, #f5cc4d, #d9a92c);
    box-shadow: 0 4px 14px rgba(240, 200, 96, .3);
}

/* 功能入口按钮（角色转职/兑换积分，在角色卡片内） */
.func-btns{
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
}
.func-btn{
    flex: 1;
    height: 34px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #e8b93a, #c9971f);
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .2s;
}
.func-btn:hover:not(:disabled){
    background: linear-gradient(135deg, #f5cc4d, #d9a92c);
    box-shadow: 0 4px 14px rgba(240, 200, 96, .3);
}
.func-btn:disabled{
    background: #3a3a3a;
    color: #777;
    cursor: not-allowed;
}
.func-tip{
    font-size: 12px;
    color: #ff6b6b;
    margin: 0 0 10px;
    text-align: center;
}
.func-tip.ok{
    color: #4cd964;
}

/* 用户中心：左右横向布局 */
.wrap-wide{
    max-width: 840px;
}
.center-layout{
    display: flex;
    gap: 26px;
    align-items: flex-start;
}
.account-col{
    flex: 0 0 210px;
    border-right: 1px solid #2c2c2c;
    padding-right: 22px;
}
.char-col{
    flex: 1;
    min-width: 0;
}
@media (max-width: 720px){
    .center-layout{
        flex-direction: column;
    }
    .account-col{
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #2c2c2c;
        padding-right: 0;
        padding-bottom: 16px;
    }
}
@media (max-width: 600px){
    .char-items{
        grid-template-columns: 1fr;  /* 窄屏恢复每行1个 */
    }
}

/* 角色列表 */
.char-list{
    margin: 4px 0 20px;
    border-top: 1px solid #2c2c2c;
    padding-top: 14px;
}
.char-title{
    font-size: 14px;
    color: #f0c860;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}
/* 角色卡片网格：每行2个 */
.char-items{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
/* 积分兑换：物品行 */
.exchange-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.exchange-info{
    font-size: 13px;
    color: #ccc;
    line-height: 1.7;
    flex: 1;
}
.exchange-info b{
    color: #f0c860;
    font-size: 14px;
}
.char-item{
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 0;
}
.char-head{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.char-name{
    color: #f0c860;
    font-weight: 700;
    font-size: 15px;
}
.char-lv{
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.char-class{
    color: #aaa;
    font-size: 13px;
}
.online{
    color: #4cd964;
    font-size: 12px;
}
.offline{
    color: #888;
    font-size: 12px;
}
.char-line{
    font-size: 12px;
    color: #aaa;
    margin-top: 6px;
    line-height: 1.8;
}
.char-empty{
    font-size: 13px;
    color: #888;
    text-align: center;
    padding: 14px 0;
    border: 1px dashed #333;
    border-radius: 8px;
}

/* 小屏适配 */
@media (max-width: 480px){
    .wrap{
        padding: 26px 20px;
        margin-top: 2vh;
    }
}

/* ============================================================
   WEB商城 样式
   ============================================================ */
/* 用户中心入口按钮（蓝色渐变区分商城） */
.shop-entry-btn{
    background: linear-gradient(135deg, #2f6fb2, #1d4e82);
    color: #fff;
    margin-top: 8px;
}
.shop-entry-btn:hover{
    background: linear-gradient(135deg, #3b83c9, #25609e);
    box-shadow: 0 4px 14px rgba(59, 131, 201, .3);
}

/* 商城头部（标题 + 积分徽章 + 管理按钮） */
.shop-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #2c2c2c;
    position: relative;
}
.shop-header:after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240,200,96,.5), transparent);
}
.shop-title-box h3{
    text-align: left;
    background: linear-gradient(135deg, #ffe9a8, #f0c860 55%, #c9971f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}
.shop-title-box .subtitle{
    text-align: left;
    margin-bottom: 0;
}
.shop-header-right{
    display: flex;
    align-items: center;
    gap: 10px;
}
.shop-balance{
    padding: 6px 14px;
    border: 1px solid rgba(240, 200, 96, .35);
    border-radius: 20px;
    background: rgba(240, 200, 96, .08);
    color: #ffdd77;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.shop-manage-btn{
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #f0c860;
    font-size: 13px;
    text-decoration: none;
    background: #242424;
    transition: all .2s;
    white-space: nowrap;
}
.shop-manage-btn:hover{
    border-color: #f0c860;
    color: #ffdd77;
}

/* 商品网格 */
.shop-items{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}
.shop-card{
    background: linear-gradient(180deg, #262626 0%, #202020 100%);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 12px 12px 14px;
    text-align: center;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.shop-card:before{
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(240,200,96,.6), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.shop-card:hover{
    transform: translateY(-4px);
    border-color: rgba(240, 200, 96, .6);
    box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 12px rgba(240,200,96,.12);
}
.shop-card:hover:before{
    opacity: 1;
}
.shop-img{
    width: 100%;
    height: 110px;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 40%, #2e2a1d 0%, #1a1a1a 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #2c2c2c;
    position: relative;
    cursor: help;
}
.shop-img img{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* 鼠标移到图片上：覆盖层显示物品说明 */
.shop-img-tip{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10,10,12,0.94);
    color: #eee;
    font-size: 12px;
    line-height: 1.6;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s;
    word-break: break-all;
}
.shop-img:hover .shop-img-tip{
    opacity: 1;
    visibility: visible;
}
.shop-noimg{
    font-size: 40px;
    color: #c9971f;
    line-height: 1;
    text-shadow: 0 0 18px rgba(240, 200, 96, .35);
}
.shop-name{
    color: #f0c860;
    font-weight: 700;
    font-size: 14px;
    margin: 10px 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
}
.shop-price{
    color: #ffdd77;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.price-ico{
    color: #f0c860;
    font-size: 12px;
}
.shop-stock{
    color: #aaa;
    font-size: 12px;
    margin-bottom: 10px;
}
.shop-desc{
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
    max-height: 36px;
    overflow: hidden;
    word-break: break-all;
}
.shop-desc-cell{
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #bbb;
}
.shop-stock.soldout{
    color: #ff6b6b;
    font-weight: 700;
}
.buy-btn.soldout-btn{
    background: #3a3a3a;
    color: #777;
    cursor: not-allowed;
    letter-spacing: 3px;
}
.buy-btn{
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #e8b93a, #c9971f);
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all .2s;
}
.buy-btn:hover:not(:disabled){
    background: linear-gradient(135deg, #f5cc4d, #d9a92c);
    box-shadow: 0 4px 14px rgba(240, 200, 96, .35);
}
.buy-btn:disabled{
    background: #3a3a3a;
    color: #777;
    cursor: not-allowed;
    letter-spacing: 3px;
}

/* 管理页：表单两列 + 表格 */
.shop-fields-row{
    display: flex;
    gap: 10px;
}
.shop-fields-row input{
    flex: 1;
}
.admin-table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    font-size: 13px;
}
.admin-table th{
    text-align: left;
    color: #f0c860;
    padding: 8px 6px;
    border-bottom: 1px solid #3a3a3a;
    font-weight: 700;
}
.admin-table td{
    padding: 8px 6px;
    border-bottom: 1px solid #2c2c2c;
    color: #ccc;
    vertical-align: middle;
}
.admin-thumb{
    width: 40px;
    height: 30px;
    object-fit: contain;
    background: #1a1a1a;
    border-radius: 4px;
}
.admin-link{
    color: #f0c860;
    text-decoration: none;
    margin-right: 8px;
}
.admin-link:hover{
    text-decoration: underline;
}
.admin-del-btn{
    border: 1px solid #7a3a3a;
    background: rgba(255, 59, 48, .1);
    color: #ff6b6b;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.admin-del-btn:hover{
    background: rgba(255, 59, 48, .25);
}

/* 商城网格响应式 */
@media (max-width: 720px){
    .shop-items{
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px){
    .shop-items{
        grid-template-columns: 1fr;
    }
    .shop-fields-row{
        flex-direction: column;
        gap: 0;
    }
}
