/* ============================================================ */
/* 文件: style.css */
/* 说明: 全局样式 */
/* ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: #ff4d4f; }
a:hover { color: #d9363e; }

:root {
    --primary: #ff4d4f;
    --primary-hover: #d9363e;
    --primary-light: #fff1f0;
    --bg: #f5f5f5;
    --card: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

/* App布局 */
#app { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; position: relative; }
.app-header {
    background: var(--card);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left .logo {
    font-weight: 800;
    color: var(--primary);
    font-size: 20px;
}
.header-left .site-name {
    font-size: 14px;
    color: #999;
    margin-left: 4px;
}
.btn-icon {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    padding: 4px 8px;
    cursor: pointer;
}
.btn-icon:hover { color: var(--primary); }

/* 侧栏 */
.side-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--card);
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 200;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}
.side-nav.open { left: 0; }
.side-nav .nav-user {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
}
.side-nav .nav-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid var(--primary);
}
.side-nav .nav-username { font-weight: 600; font-size: 16px; }
.side-nav ul { list-style: none; padding: 0; }
.side-nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
    gap: 12px;
}
.side-nav ul li a:hover { background: var(--primary-light); color: var(--primary); }
.side-nav ul li a i { width: 20px; text-align: center; font-size: 16px; }

/* 遮罩 */
.side-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 150;
    display: none;
}
.side-nav-overlay.show { display: block; }

/* 主内容 */
.main-content { padding: 16px; padding-bottom: 80px; min-height: calc(100vh - 60px); }

/* 底部 */
.app-footer {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
    background: var(--card);
}

/* 卡片 */
.profile-card, .edit-card, .redeem-card, .comment-card, .feedback-card, .help-card, .map-card, .item-card, .room-card, .auth-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.auth-card { padding: 32px 24px; }
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo .logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.auth-logo .logo-sub {
    font-size: 14px;
    color: #999;
    display: block;
}
.auth-card h2 { text-align: center; margin-bottom: 20px; font-size: 20px; }
.auth-links { text-align: center; margin-top: 16px; display: flex; justify-content: space-between; }
.auth-links a { font-size: 13px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #555;
}
.form-group label i { margin-right: 6px; color: var(--primary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border 0.2s;
    background: #fafafa;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,77,79,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group small { display: block; font-size: 12px; color: #999; margin-top: 2px; }
.checkbox-group { display: flex; align-items: center; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

.captcha-row, .code-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-img {
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid #ddd;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-success {
    background: #52c41a;
    color: #fff;
}
.btn-success:hover { background: #389e0d; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #d9363e; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}
.modal-close:hover { color: #333; }
.modal-body { font-size: 14px; color: #555; line-height: 1.8; }
.modal-footer { margin-top: 16px; text-align: right; }

/* 地图网格 */
.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.map-item {
    background: #fafafa;
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}
.map-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
.map-item .map-icon { font-size: 24px; color: var(--primary); margin-bottom: 4px; }
.map-item .map-name { font-weight: 600; font-size: 13px; }
.map-item .map-desc { font-size: 11px; color: #999; }
.map-item .map-check {
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--primary);
    display: none;
}
.map-item.active .map-check { display: block; }

/* 物品网格 */
.item-group { margin-top: 16px; }
.item-group h3 { font-size: 16px; margin-bottom: 8px; color: #555; }
.item-group h3 i { margin-right: 6px; }
.item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.item-option {
    padding: 6px 14px;
    background: #fafafa;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.item-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
.item-option .item-check { display: none; color: var(--primary); }
.item-option.active .item-check { display: inline; }
.item-option .item-rate { font-size: 11px; color: #999; }

/* 进度条 */
.boost-progress { margin-top: 16px; }
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 4px;
}
.progress-steps .step {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #999;
    padding: 4px 0;
    border-radius: 4px;
    transition: all 0.3s;
}
.progress-steps .step.active {
    color: var(--primary);
    font-weight: 600;
}
.progress-steps .step.done { color: #52c41a; }
.progress-steps .step .step-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    margin-right: 2px;
}
.progress-steps .step.active .step-num { background: var(--primary); color: #fff; }
.progress-steps .step.done .step-num { background: #52c41a; color: #fff; }
.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ff7875);
    width: 0%;
    transition: width 0.3s;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-perm { background: #fff1f0; color: var(--primary); }
.badge-active { background: #e6f7ff; color: #1890ff; }
.badge-inactive { background: #f5f5f5; color: #999; }

/* 警告 */
.warning-box {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #cf1322;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ip-warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: #d46b08;
    font-size: 13px;
    margin-top: 8px;
}

/* 评论列表 */
.comment-list { margin-top: 20px; }
.comment-list h3 { font-size: 16px; margin-bottom: 12px; }
.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-item .c-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-item .c-body { flex: 1; }
.comment-item .c-name { font-weight: 600; font-size: 14px; }
.comment-item .c-time { font-size: 12px; color: #999; margin-left: 8px; }
.comment-item .c-content { font-size: 14px; margin-top: 2px; }
.comment-item .c-qq { font-size: 12px; color: #999; }

/* 帮助列表 */
.help-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.help-item:last-child { border-bottom: none; }
.help-item .help-title {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.help-item .help-title:hover { color: var(--primary); }
.help-item .help-content {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    display: none;
    line-height: 1.8;
}
.help-item.open .help-content { display: block; }

/* 响应式 */
@media (max-width: 480px) {
    .map-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-box { width: 95%; padding: 16px; }
    .auth-card { padding: 24px 16px; }
    .profile-card, .edit-card, .redeem-card, .comment-card, .feedback-card, .help-card, .map-card, .item-card, .room-card {
        padding: 16px;
    }
    .progress-steps .step { font-size: 10px; }
    .progress-steps .step .step-num { width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
}
@media (min-width: 768px) {
    #app { max-width: 720px; }
    .map-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    #app { max-width: 960px; }
    .map-grid { grid-template-columns: repeat(4, 1fr); }
    
    /* ============================================
   个人中心 - 剧中风格 + 细节增强
   ============================================ */

/* 整体容器：居中 + 背景氛围 */
.profile-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

/* 主卡片：玻璃质感 + 细腻阴影 */
.profile-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.06),
        0 2px 8px rgba(0,0,0,0.03),
        inset 0 1px 0 rgba(255,255,255,0.8);
    width: 100%;
    transition: transform 0.2s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.5);
}
.profile-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

/* 头部：头像 + 名称 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 16px;
}
.profile-avatar {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ff4d4f;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(255,77,79,0.2);
    transition: transform 0.3s;
}
.profile-avatar img:hover {
    transform: scale(1.02);
}
/* 在线状态 */
.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #52c41a;
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 用户名称 */
.profile-name h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}
.profile-name .username {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}
.user-badges {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.user-badges .badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* 信息网格：两列 + 精致卡片项 */
.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin: 16px 0 20px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f9fc;
    border-radius: 14px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: default;
}
.info-item:hover {
    background: #ffffff;
    border-color: rgba(255,77,79,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transform: translateY(-1px);
}
.info-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: #ff4d4f;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
}
.info-content {
    flex: 1;
    min-width: 0;
}
.info-label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.info-value {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    word-break: break-all;
    line-height: 1.4;
}
/* 卡密状态特殊样式 */
.info-card-status .info-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.info-card-status .badge {
    font-size: 13px;
    padding: 3px 12px;
}
.pause-btn {
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    transition: all 0.2s;
}
.pause-btn:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
    background: #fff1f0;
}

/* IP 警告 */
.ip-warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 12px;
    padding: 10px 16px;
    color: #d46b08;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ip-warning i {
    font-size: 18px;
}

/* 操作按钮 */
.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.profile-actions .btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.profile-actions .btn-primary {
    background: linear-gradient(135deg, #ff4d4f, #e04345);
    border: none;
    color: #fff;
}
.profile-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,77,79,0.3);
}
.profile-actions .btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
}
.profile-actions .btn-outline:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
    background: #fff1f0;
    transform: translateY(-2px);
}

/* ===== 响应式优化 ===== */
@media (max-width: 480px) {
    .profile-container {
        padding: 12px 8px;
        min-height: calc(100vh - 80px);
    }
    .profile-card {
        padding: 20px 16px 16px;
        border-radius: 20px;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .profile-avatar img {
        width: 72px;
        height: 72px;
    }
    .profile-name h2 {
        font-size: 20px;
    }
    .user-badges {
        justify-content: center;
    }
    .profile-actions {
        flex-direction: column;
        gap: 8px;
    }
    .info-item {
        padding: 8px 12px;
    }
}
}
/* ============================================
   个人中心 - 图标左+文字右 + 移动端优化
   ============================================ */

/* 所有屏幕通用 */
.profile-info-grid {
    display: grid;
    gap: 12px;
    margin: 16px 0 20px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: border-color 0.2s, background 0.2s;
}
.info-item:hover {
    border-color: #ff4d4f;
    background: #ffffff;
}
.info-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: #ff4d4f;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.info-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.info-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}
.info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    word-break: break-word;
    line-height: 1.4;
}

/* 头部卡密状态徽章 */
.card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 12px !important;
    background: #e6f7ff !important;
    color: #1890ff !important;
    border-radius: 20px;
}
.card-status-badge .pause-btn-small {
    background: #fff;
    border: 1px solid #1890ff;
    border-radius: 16px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 24px;
    color: #1890ff;
    cursor: pointer;
    transition: all 0.2s;
}
.card-status-badge .pause-btn-small:hover {
    background: #1890ff;
    color: #fff;
}
.card-status-badge .pause-btn-small:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 操作按钮 */
.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.profile-actions .btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    font-weight: 600;
    text-align: center;
}

/* 移动端 (≤480px) */
@media (max-width: 480px) {
    .profile-container {
        padding: 8px 6px;
    }
    .profile-card {
        padding: 16px 12px;
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    .profile-avatar img {
        width: 68px;
        height: 68px;
    }
    .profile-name h2 {
        font-size: 18px;
    }
    .profile-name .username {
        font-size: 13px;
    }
    .user-badges {
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    .user-badges .badge {
        font-size: 12px;
        padding: 2px 10px;
    }
    .card-status-badge {
        font-size: 13px;
        padding: 4px 10px !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    .card-status-badge .pause-btn-small {
        font-size: 12px;
        line-height: 22px;
        padding: 0 8px;
    }

    /* 信息网格单列 */
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 12px 0 16px;
    }
    .info-item {
        padding: 10px 14px;
        gap: 12px;
        border-radius: 12px;
    }
    .info-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .info-label {
        font-size: 10px;
    }
    .info-value {
        font-size: 14px;
    }

    /* 按钮纵向全宽 */
    .profile-actions {
        flex-direction: column;
        gap: 10px;
    }
    .profile-actions .btn {
        padding: 14px 0;
        font-size: 15px;
        border-radius: 14px;
        width: 100%;
    }
}