/**
 * 小智云移动端样式表
 * 支持Android手机、平板，横竖屏适配
 */

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    padding-top: 60px;
    padding-bottom: 70px;
    background-attachment: fixed;
}

/* ========== 顶部导航栏 ========== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 28px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
}

.login-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-btn:active {
    transform: scale(0.95);
    background: #fff;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.user-avatar:active {
    transform: scale(0.9);
}

/* ========== 主内容区域 ========== */
.mobile-main {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== 欢迎卡片 ========== */
.welcome-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.welcome-text h2 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.welcome-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.quick-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* ========== Hero区域（未登录） ========== */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.hero-section h1 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.cta-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.cta-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========== App区域 ========== */
.app-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== App网格 ========== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 16px;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.app-card:active {
    transform: scale(0.92);
}

.app-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: visible;
}

.app-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
}

.app-icon-char {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.trial-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #FF9800;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    font-weight: 700;
}

.app-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trial-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ffd93d 0%, #ff9a00 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 154, 0, 0.4);
}

.expired-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
}

.app-card.app-expired .app-icon-wrapper {
    filter: grayscale(100%);
    opacity: 0.6;
}

.app-info-btn {
    position: absolute;
    bottom: 25px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: #667eea;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: serif;
    font-style: italic;
}

/* ========== 特色区域 ========== */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* ========== 统计区域 ========== */
.stats-section {
    margin-bottom: 24px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #fff;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-num {
    font-weight: 700;
}

/* ========== 底部导航栏 ========== */
.mobile-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    padding: 8px 16px;
}

.nav-item.active {
    color: #fff;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

.nav-item:active {
    transform: scale(0.9);
}

/* ========== 弹窗通用样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    line-height: 1;
}

.modal-close:active {
    background: #e0e0e0;
}

/* ========== 登录弹窗 ========== */
.login-modal {
    padding: 30px 24px;
}

.drag-hint {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    padding: 5px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.error-msg {
    background: #fff5f5;
    color: #e53e3e;
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.mobile-input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    font-size: 16px;
    color: #333;
    background: #f9f9f9;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.remember-group {
    display: flex;
    align-items: center;
}

.remember-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.remember-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ========== 个人资料弹窗 ========== */
.profile-modal {
    padding: 24px;
}

.profile-header-m {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.profile-info h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 14px;
    color: #888;
}

.profile-menu {
    margin-bottom: 24px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.menu-item:active {
    background: #f5f5f5;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.menu-item .arrow {
    color: #ccc;
    font-size: 20px;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    background: #fff5f5;
    color: #e53e3e;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:active {
    background: #fed7d7;
}

/* ========== App信息弹窗 ========== */
.app-info-modal {
    padding: 24px;
}

.app-detail-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.detail-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.detail-title h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 6px;
}

.detail-title p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.detail-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.detail-link {
    display: block;
    padding: 14px 16px;
    background: #f5f5f5;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.detail-link:active {
    background: #e0e0e0;
}

.open-app-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    transition: all 0.2s;
}

.open-app-btn:active {
    transform: scale(0.98);
}

/* ========== App打开选择弹窗 ========== */
.app-open-modal {
    padding: 24px;
    text-align: center;
}

.app-open-header {
    margin-bottom: 20px;
}

.app-open-header img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    margin-bottom: 12px;
    object-fit: cover;
}

.app-open-header h3 {
    font-size: 18px;
    color: #333;
}

.app-open-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.open-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.open-option-btn:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

.option-icon {
    font-size: 28px;
}

.option-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: block;
}

.option-desc {
    font-size: 12px;
    color: #888;
    display: block;
}

.cancel-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:active {
    background: #f5f5f5;
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== App下载选择弹窗 ========== */
.app-download-modal {
    padding: 24px;
    text-align: center;
}

.download-header {
    margin-bottom: 24px;
}

.download-header img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    margin-bottom: 12px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.download-header h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.download-hint {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.download-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.download-option-btn:active {
    transform: scale(0.98);
}

.download-option-btn .option-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.download-option-btn .option-text {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.download-option-btn .option-desc {
    font-size: 12px;
    display: block;
}

/* iOS App Store 按钮样式 */
.download-option-btn.ios-btn {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.download-option-btn.ios-btn .option-text {
    color: #fff;
}

.download-option-btn.ios-btn .option-desc {
    color: rgba(255, 255, 255, 0.7);
}

.download-option-btn.ios-btn:active {
    background: linear-gradient(135deg, #2d2d44 0%, #1f2d4a 100%);
}

/* Android 官网下载按钮样式 */
.download-option-btn.android-btn {
    background: linear-gradient(135deg, #3ddc84 0%, #00c853 100%);
}

.download-option-btn.android-btn .option-text {
    color: #fff;
}

.download-option-btn.android-btn .option-desc {
    color: rgba(255, 255, 255, 0.8);
}

.download-option-btn.android-btn:active {
    background: linear-gradient(135deg, #4de594 0%, #00d65e 100%);
}

/* 网页版按钮样式 */
.download-option-btn.web-btn {
    background: #f0f4ff;
    border: 2px solid #667eea;
}

.download-option-btn.web-btn .option-text {
    color: #667eea;
}

.download-option-btn.web-btn .option-desc {
    color: #8395c3;
}

.download-option-btn.web-btn:active {
    background: #e0e8ff;
}

/* ========== 横屏适配 ========== */
@media screen and (orientation: landscape) {
    body {
        padding-top: 50px;
        padding-bottom: 60px;
    }

    .mobile-header {
        height: 50px;
    }

    .brand-icon {
        font-size: 22px;
    }

    .brand-name {
        font-size: 18px;
    }

    .mobile-navbar {
        height: 55px;
    }

    .nav-icon {
        font-size: 20px;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 20px;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-content {
        border-radius: 24px;
        max-height: 90vh;
        max-width: 450px;
    }

    .hero-section {
        padding: 30px 20px;
    }

    .hero-icon {
        font-size: 50px;
    }

    .hero-section h1 {
        font-size: 22px;
    }
}

/* ========== 平板适配 ========== */
@media screen and (min-width: 768px) {
    body {
        padding-top: 70px;
        padding-bottom: 75px;
    }

    .mobile-header {
        height: 70px;
        padding: 0 24px;
    }

    .brand-name {
        font-size: 24px;
    }

    .brand-icon {
        font-size: 32px;
    }

    .mobile-navbar {
        height: 70px;
    }

    .nav-icon {
        font-size: 26px;
    }

    .nav-label {
        font-size: 13px;
    }

    .mobile-main {
        padding: 24px;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 24px;
    }

    .app-icon-wrapper {
        width: 90px;
        height: 90px;
        border-radius: 22px;
    }

    .app-icon-img {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }

    .app-icon-char {
        font-size: 36px;
    }

    .app-name {
        font-size: 14px;
        max-width: 110px;
    }

    .welcome-card {
        padding: 28px;
    }

    .welcome-text h2 {
        font-size: 26px;
    }

    .stat-value {
        font-size: 34px;
    }

    .hero-section {
        padding: 50px 30px;
    }

    .hero-icon {
        font-size: 70px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .hero-section p {
        font-size: 16px;
    }

    .cta-btn {
        padding: 16px 50px;
        font-size: 18px;
    }

    .section-header h3 {
        font-size: 22px;
    }

    .features-section {
        gap: 20px;
    }

    .feature-card {
        padding: 24px;
    }

    .feature-icon {
        font-size: 36px;
    }

    .feature-card h4 {
        font-size: 16px;
    }

    .feature-card p {
        font-size: 13px;
    }

    .modal-content {
        max-width: 500px;
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-content {
        border-radius: 24px;
    }
}

/* ========== 大型平板适配 ========== */
@media screen and (min-width: 1024px) {
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 30px;
    }

    .app-icon-wrapper {
        width: 100px;
        height: 100px;
    }

    .app-icon-img {
        width: 85px;
        height: 85px;
    }

    .features-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* ========== 小屏手机适配 ========== */
@media screen and (max-width: 360px) {
    .brand-name {
        font-size: 17px;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 12px;
    }

    .app-icon-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .app-icon-img {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }

    .app-name {
        font-size: 11px;
        max-width: 70px;
    }

    .features-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .feature-card {
        padding: 12px 8px;
    }

    .feature-icon {
        font-size: 24px;
    }

    .feature-card h4 {
        font-size: 11px;
    }

    .feature-card p {
        font-size: 9px;
    }
}

/* ========== 安全区域适配 ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .mobile-navbar {
        height: calc(65px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ========== 暗色模式支持 ========== */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #1a1a2e;
    }

    .login-modal h2,
    .profile-info h3,
    .detail-title h3,
    .app-open-header h3 {
        color: #fff;
    }

    .mobile-input {
        background: #2d2d44;
        border-color: #3d3d5c;
        color: #fff;
    }

    .mobile-input:focus {
        background: #2d2d44;
        border-color: #667eea;
    }

    .modal-close {
        background: #3d3d5c;
        color: #ccc;
    }

    .menu-item,
    .detail-link {
        color: #ddd;
    }

    .detail-link,
    .open-option-btn {
        background: #2d2d44;
    }

    .stats-card,
    .feature-card,
    .welcome-card {
        background: rgba(0, 0, 0, 0.3);
    }

    .profile-header-m {
        border-bottom-color: #3d3d5c;
    }

    .menu-item {
        border-bottom-color: #3d3d5c;
    }
}

/* ========== 拖拽排序样式 ========== */
.app-card {
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.app-card.dragging {
    pointer-events: none;
    cursor: grabbing;
}

.app-card:not(.dragging):not(.drag-placeholder) {
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drag-placeholder {
    transition: none;
}

/* 拖拽提示 */
.drag-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    padding: 10px;
    margin-top: 10px;
}

/* 长按时的视觉反馈 */
.app-card:active:not(.dragging) {
    transform: scale(0.95);
    opacity: 0.8;
}

/* ========== 底部导航栏 ========== */
.mobile-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    padding: 5px;
    flex: 1;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}
/* Entry notice keeps its own row so the brand and login remain readable. */
.cloud-entry { padding-top: 0; }
.cloud-entry .mobile-header { position: sticky; height: auto; min-height: 60px; padding: 12px 16px; gap: 12px; align-items: flex-start; }
.cloud-entry .header-left { display: grid; grid-template-columns: auto minmax(0, 1fr); flex: 1; min-width: 0; gap: 4px 8px; }
.cloud-entry .brand-name { white-space: nowrap; align-self: center; }
.cloud-entry .device-notice { grid-column: 1 / -1; color: rgba(255,255,255,.9); font-size: 12px; line-height: 1.5; }
.cloud-entry .header-right { flex: 0 0 auto; }
.cloud-entry .login-btn { display: inline-block; white-space: nowrap; }
