/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a1a;
    line-height: 1.5;
    /* 移除移动端 body 的大内边距 */
    padding: 0; 
}

/* 容器布局 */
.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部优化：缩小高度，强化视觉 */
.header {
    background: linear-gradient(135deg, #1e3799, #4a69bd);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* 内容区域 */
.content {
    padding: 24px 16px;
    flex: 1;
}

/* WiFi 模块：卡片化设计 */
.wifi-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #eef0f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.wifi-section h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wifi-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column; /* 移动端默认纵向堆叠 */
    gap: 6px;
}

.label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.value-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.value {
    flex: 1;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
}

.password {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

/* 按钮优化：加大点击热区 */
.copy-btn {
    background: #1d4ed8;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.copy-btn:active {
    transform: scale(0.98);
    background: #1e3a8a;
}

/* 地图部分：修复裁剪问题 */
.map-section h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #2c3e50;
}

.map-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.map-container img {
    width: 100%;
    height: auto; /* 允许高度根据图片比例自动调整 */
    display: block;
    object-fit: contain; /* 确保图片不被裁剪 */
}

.map-caption {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

/* 提示部分 */
.tips-section {
    background: #fffbeb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
}

.tips-section h3 {
    color: #92400e;
    font-size: 1rem;
    margin-bottom: 10px;
}

.tips-section ul {
    list-style: none;
}

.tips-section li {
    font-size: 0.85rem;
    color: #b45309;
    padding: 6px 0;
    position: relative;
    padding-left: 18px;
}

.tips-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 页脚 */
.footer {
    padding: 30px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    background: #ffffff;
}

/* 针对桌面端的微调 */
@media (min-width: 768px) {
    body {
        padding: 40px 20px;
    }
    .container {
        border-radius: 16px;
        min-height: auto;
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    }
    .detail-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .label {
        flex: 1;
    }
    .value-wrapper {
        flex: 2;
    }
}