/* 前台样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: white;
}

.container {
    max-width: 9.5rem; /* 950px */
    margin: 0 auto;
    padding: 0;
}

header {
    background-color: #fff;
    padding: 0rem;
    text-align: center;
    box-shadow: 0 0.02rem 0.05rem rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 0.4rem; /* 40px */
}

main {
    margin: 0;
}

/* 图片展示区域样式 */
.image-gallery {
    margin-bottom: 0.4rem; /* 40px */
    margin-top: 0;
}

.images-container {
    display: flex;
    flex-direction: column;
}

.image-item {
    width: 100%;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.video-item {
    width: 100%;
    margin: 0;
}

.video-item video {
    width: 100%;
    height: auto;
}

footer {
    background-color: #3366cc;
    color: white;
    text-align: center;
    padding: 0.2rem; /* 20px */
    margin-top: 0.4rem; /* 40px */
}

footer p {
    margin: 0.05rem 0; /* 5px */
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ICP备案信息样式 */
.icp-info {
    font-size: 0.18rem; /* 18px */
    margin-top: 0.1rem; /* 10px */
}

.icp-info a {
    color: white;
    text-decoration: none;
}

.icp-info a:hover {
    color: white;
    text-decoration: underline;
}

/* 公安备案图标样式 */
.icp-info img {
    vertical-align: middle;
    width: 0.2rem; /* 20px */
    height: 0.2rem; /* 20px */
    margin-right: 0.05rem; /* 5px */
}

/* IP信息显示样式 */
.ip-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 0.25rem; /* 25px */
    border-radius: 0.1rem; /* 10px */
    box-shadow: 0 0.04rem 0.08rem rgba(0,0,0,0.1);
    margin: 0.25rem; /* 25px */
    border: 0.01rem solid #e1e8ed;
}

.ip-info h3 {
    color: #2c3e50;
    margin-bottom: 0.15rem; /* 15px */
    text-align: center;
    font-size: 0.28rem; /* 28px */
    font-weight: bold;
}

.ip-info p {
    margin-bottom: 0.1rem; /* 10px */
    font-size: 0.2rem; /* 20px */
    color: #34495e;
}

.ip-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.ip-info pre {
    background-color: #f8f9fa;
    padding: 0.15rem; /* 15px */
    border-radius: 0.05rem; /* 5px */
    overflow-x: auto;
    font-size: 0.14rem; /* 14px */
    white-space: pre-wrap;
    border: 0.01rem solid #e1e8ed;
    box-shadow: inset 0 0.01rem 0.02rem rgba(0,0,0,0.05);
}

/* 经销商卡片样式 */
.local-agents {
    background-color: white;
    padding: 0.2rem; /* 20px */
    border-radius: 0.05rem; /* 5px */
    box-shadow: 0 0.02rem 0.05rem rgba(0,0,0,0.1);
    margin-top: 0.2rem; /* 20px */
}

.local-agents h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0.2rem; /* 20px */
    font-size: 0.32rem;
}

#agentInfo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.3rem; /* 30px */
    border-radius: 0.1rem; /* 10px */
    box-shadow: 0 0.08rem 0.16rem rgba(0,0,0,0.1);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#agentInfo::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

#agentInfo h2 {
    color: white;
    margin-bottom: 0.2rem; /* 20px */
    font-size: 0.6rem; /* 60px */
    font-weight: bold;
    position: relative;
    text-shadow: 0 0.02rem 0.04rem rgba(0,0,0,0.3);
}

#agentInfo p {
    color: #e0e0ff;
    font-size: 0.22rem; /* 22px */
    margin: 0.1rem 0; /* 10px */
}

.agent-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 0.01rem solid #e1e8ed;
    border-radius: 0.12rem; /* 12px */
    padding: 0.3rem; /* 30px */
    margin-bottom: 0.2rem; /* 20px */
    box-shadow: 0 0.08rem 0.16rem rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-0.05rem);
    box-shadow: 0 0.12rem 0.24rem rgba(0,0,0,0.15);
}

.agent-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.04rem; /* 4px */
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 公司名称自动调整字体大小以适应屏幕宽度 */
.agent-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.2rem; /* 20px */
    padding-bottom: 0.15rem; /* 15px */
    border-bottom: 0.01rem solid #eee;
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    position: relative;
}

.agent-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0.6rem; /* 60px */
    height: 0.03rem; /* 3px */
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 0.02rem;
}

.agent-name .name-text {
    font-size: 0.4rem; /* 40px */
    white-space: nowrap;
    width: 100%;
    display: block;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-weight: 600;
    letter-spacing: 0.01rem;
    margin: 0 auto;
    padding: 0 0.1rem;
}

/* 公司地址最多显示2行，超出自动缩小字体 */
.agent-address {
    color: #2c3e50;
    font-size: 0.28rem; /* 28px */
    position: relative;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0.2rem 0; /* 20px */
    line-height: 1.5;
}

.agent-address .address-text {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 auto;
    padding: 0 0.1rem;
}

/* 电话号码链接样式 */
.agent-phone {
    margin: 0.1rem 0; /* 10px */
    line-height: 1;
    font-size: 0.5rem; /* 50px */
    text-align: center;
}

.agent-phone a {
    display: block;
    color: #667eea;
    text-decoration: none;
    margin: 0.1rem auto; /* 10px auto */
    font-weight: bold;
    font-size: 0.4rem; /* 40px */
    padding: 0.15rem 0.3rem 0.15rem 0.3rem; /* 5px 15px */
    border: 0.01rem solid #667eea;
    border-radius: 0.5rem; /* 50px */
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 0.02rem 0.04rem rgba(102, 126, 234, 0.3);
    width: fit-content;
    max-width: 90%;
    box-sizing: border-box;
}

.agent-phone a:hover {
    transform: translateY(-0.02rem);
    box-shadow: 0 0.04rem 0.08rem rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.agent-phone a::before {
    content: "📞";
    margin-right: 0.1rem; /* 10px */
    color: white;
    font-size: 0.3rem; /* 30px */
}

/* 欢迎加盟卡片样式 */
.join-text {
    margin: 0.15rem 0; /* 15px */
    font-size: 0.22rem; /* 22px */
    color: #2c3e50;
    font-weight: 500;
}

.join-phone-container {
    margin: 0.25rem 0; /* 25px */
    font-size: 0.5rem; /* 50px */
}

.join-phone {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.15rem 0.3rem; /* 15px 30px */
    border-radius: 0.5rem; /* 50px */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.28rem; /* 28px */
    transition: all 0.3s ease;
    box-shadow: 0 0.04rem 0.08rem rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
}

.join-phone:hover {
    transform: translateY(-0.02rem);
    box-shadow: 0 0.08rem 0.16rem rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    header h1 {
        font-size: 0.32rem; /* 32px */
    }
    
    #agentInfo {
        padding: 0.2rem; /* 20px */
    }
    
    .agent-card {
        padding: 0.2rem; /* 20px */
        margin: 0.15rem; /* 15px */
    }
    
    .agent-phone a {
        display: block;
        margin: 0.1rem auto; /* 10px auto */
        font-size: 0.28rem; /* 28px */
        padding: 0.12rem 0.2rem; /* 12px 20px */
        width: fit-content;
        max-width: 90%;
    }
    
    .agent-phone a::before {
        content: "📞";
        margin-right: 0.1rem; /* 10px */
        color: white;
        font-size: 0.2rem; /* 20px */
    }
    
    .agent-name .name-text {
        font-size: 0.36rem; /* 36px */
    }
    
    .agent-address {
        font-size: 0.24rem; /* 24px */
    }
    
    #agentInfo h2 {
        font-size: 0.6rem; /* 60px */
    }
    
    .local-agents h2 {
        font-size: 0.28rem; /* 28px */
    }
    
    .join-phone {
        font-size: 0.24rem; /* 24px */
        padding: 0.12rem 0.25rem; /* 12px 25px */
    }
    
    .ip-info {
        padding: 0.2rem; /* 20px */
        margin: 0.2rem; /* 20px */
    }
    
    .ip-info h3 {
        font-size: 0.24rem; /* 24px */
    }
    
    .ip-info p {
        font-size: 0.18rem; /* 18px */
    }
}