/* 基础重置 - 老年人友好版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;  /* 适合手机浏览器的字体大小 */
    line-height: 1.6;
    color: #222;
    background: #f5f5f5;
}

.hidden {
    display: none !important;
}

/* 登录页面 */
.login-container {
    max-width: 480px; /* 稍微加宽 */
    margin: 0 auto;
    padding: 30px 20px; /* 增加内边距 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-notice {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.notice-text {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.mobile-notice-app {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.notice-text-app {
    color: white;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 600;
    margin: 0;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.logo {
    font-size: 64px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #222;
}

.login-subtitle {
    color: #555;
    font-size: 16px;
}

.login-form {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 16px;
    min-height: 48px;
}

.form-input:focus {
    outline: none;
    border-color: #0066cc; /* 更深的蓝色 */
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: clamp(12px, 2.5vw, 16px);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    min-height: 48px;
    font-weight: 600;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0055aa;
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

.btn-danger {
    background: #cc3333;
    color: white;
}

.btn-danger:hover {
    background: #aa2222;
}

.btn-sm {
    padding: 14px 18px;
    font-size: 36px;
    min-height: 50px;
}

.btn-login {
    width: 100%;
    margin-top: 10px;
}

/* 主应用页面 */
.app-header {
    background: white;
    padding: 20px 15px; /* 增加垂直内边距 */
    border-bottom: 3px solid #ddd; /* 加粗边框 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 头部左侧区域 - 头像和用户信息横向排列 */
.header-left {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: clamp(40px, 10vw, 56px);
    height: clamp(40px, 10vw, 56px);
    background: #0066cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(24px, 6vw, 36px);
    flex-shrink: 0;
}

.user-info {
    margin-left: 15px;
}

.user-phone {
    font-weight: bold;
    font-size: clamp(14px, 3.5vw, 20px);
}

.user-status {
    font-size: clamp(12px, 3vw, 16px);
    color: #555;
}

/* 主内容区域 */
.app-main {
    padding: 20px;
    padding-bottom: 90px; /* 为底部导航留出更多空间 */
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* 卡片样式 - 增大尺寸 */
.parent-info-card,
.share-phone-card {
    background: white;
    border-radius: 12px; /* 增大圆角 */
    padding: 20px; /* 增加内边距 */
    margin-bottom: 20px;
    border: 2px solid #ddd; /* 加粗边框 */
}

/* 下载按钮区域 */
.download-buttons-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1;
    aspect-ratio: 1 / 1;
    min-height: 100px;
}

.download-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.download-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.download-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* 上级信息卡片内容 - 图标和文字横向排列 */
.parent-info-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.parent-info-content .btn {
    flex: 1;
    min-width: 30%;
    font-size: clamp(12px, 2vw, 16px);
}

.parent-info-content #rebind-parent-btn {
    flex: 0 0 30%;
}

.parent-info-content #bind-parent-btn {
    flex: 1;
}

.parent-avatar {
    font-size: 36px;
    margin-right: 15px;
}

.parent-details {
    flex: 1;
}

.parent-phone {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.parent-nickname {
    font-size: 14px;
    color: #666;
}

.share-phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.share-phone-header .btn-danger {
    flex: 0 0 20%;
    font-size: clamp(10px, 2vw, 14px);
    padding: 8px 12px;
}

.share-phone-title {
    display: flex;
    align-items: center;
    flex: 0 0 70%;
}

.share-phone-title .share-phone-text {
    font-size: clamp(14px, 3vw, 18px);
}

.share-phone-icon {
    margin-right: 12px;
    font-size: 28px;
}

.share-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

.share-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-btn:active {
    transform: scale(0.95);
}

.share-phone-text {
    font-weight: bold;
    font-size: 18px;
}

.default-share-tag {
    margin-left: 10px;
    padding: 2px 8px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
}

/* 链接样式 */
.share-link-display {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.link-label {
    margin-right: 10px;
    font-weight: 600;
    color: #444;
}

.link-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0066cc;
    margin-right: 10px;
}

.links-container {
    margin-top: 15px;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px; /* 增加内边距 */
    background: #f8f9fa;
    border-radius: 8px; /* 增大圆角 */
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 29px; /* 缩小20% */
}

.link-actions {
    display: flex;
    gap: 10px; /* 增加间距 */
}

/* APP链接输入框样式 */
.app-link-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* APP按钮容器样式 */
.app-button-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.app-button-container .btn {
    flex: 1;
}

/* 添加手机号按钮区域 */
.add-phone-section {
    margin-top: 10px;
    padding-top: 15px;
    padding-bottom: 80px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.add-phone-section .btn {
    width: 100%;
    max-width: 400px;
    font-size: clamp(12px, 2.5vw, 16px);
}

.app-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.app-input-group {
    display: flex;
    gap: 15px; /* 增加间距 */
}

.app-link-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
}

.app-link-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* 底部导航 - 图标文字横排 */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    padding: 8px 0;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 6px 5px;
    cursor: pointer;
    min-height: 50px;
    gap: 5px;
}

.nav-item.active {
    color: #0066cc;
    background: #f0f8ff;
    border-radius: 8px;
}

.nav-icon {
    font-size: clamp(16px, 4vw, 24px);
    margin-bottom: 0;
}

.nav-text {
    font-size: clamp(10px, 2.5vw, 14px);
    font-weight: 600;
}

/* 其他样式 */
.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #555;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .app-main {
        padding: 15px;
        padding-bottom: 90px;
    }
    
    .share-phone-card {
        padding: 18px;
    }
    
    .form-input {
        padding: 14px;
        font-size: 36px;
    }
    
    .btn {
        padding: 16px 20px;
        font-size: 36px;
    }
}
/* 模态框样式 - 老年人友好版 */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    font-size: 14px;
}

.modal-header {
    margin-bottom: 15px;
    text-align: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

.modal-body {
    margin-bottom: 30px; /* 增加间距 */
}

.modal-text {
    margin-bottom: 20px;
    font-size: 36px; /* 增大字体 */
    color: #555;
    line-height: 1.5;
}

.modal-input-group {
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 16px;
    min-height: 48px;
    text-align: center;
}

.modal-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.modal-footer {
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 16px;
    min-height: 48px;
}

/* 消息提示样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    background: #333;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: rgba(76, 175, 80, 0.9);
}

.toast.error {
    background: rgba(244, 67, 54, 0.9);
}

.tutorial-link {
    display: block;
    color: #ff4444;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    margin-top: 10px;
    text-align: center;
    padding: 10px;
}

.tutorial-link:hover {
    text-decoration: underline;
}

/* 教程卡片样式 */
.tutorial-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-content {
    flex: 1;
}

.tutorial-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.tutorial-card .tutorial-link {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    background: #f0f8ff;
    border-radius: 6px;
    margin-top: 0;
}

.tutorial-card .tutorial-link:hover {
    background: #e6f2ff;
    text-decoration: none;
}

.toast.info {
    background: rgba(33, 150, 243, 0.9);
}
