/* 移动端优化样式 - キャレントカードローン */

/* 基础重置 - 使用更具体的选择器避免冲突 */
.mobile-container *,
.mobile-header *,
.page-content * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 移动端头部样式 - 使用更具体的选择器 */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #2c5aa0;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.page-title {
    display: none;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #2c5aa0;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    backdrop-filter: blur(10px);
}

.menu-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* 移动端菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    animation: fadeIn 0.3s ease;
}

.mobile-menu.active {
    display: block;
}

.menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-nav {
    padding: 16px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* 页面内容区域 */
.page-content {
    padding: 16px;
    padding-top: 20px;
    padding-bottom: 100px;
    max-width: 600px;
    margin: 0 auto;
}

/* 移动端容器 */
.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
    min-height: 100vh;
}

/* 契约按钮样式已还原到原始状态 */

/* 卡片样式 */
.mobile-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.mobile-card-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.mobile-card-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

.mobile-card-body {
    padding: 20px;
}

/* 按钮样式 */
.mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 12px;
}

.mobile-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mobile-btn-secondary {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
}

.mobile-btn-secondary:hover {
    background: #e9ecef;
}

.mobile-btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.mobile-btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* 表单样式 */
.mobile-form-group {
    margin-bottom: 20px;
}

.mobile-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.mobile-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.mobile-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobile-input::placeholder {
    color: #9ca3af;
}

/* 列表样式 */
.mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-list-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-item:hover {
    background-color: #f8f9fa;
}

.mobile-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.mobile-list-content {
    flex: 1;
}

.mobile-list-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #2c3e50;
}

.mobile-list-desc {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.mobile-list-arrow {
    color: #9ca3af;
    font-size: 18px;
    font-weight: 600;
}

/* 状态徽章 */
.mobile-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.mobile-badge-success {
    background: #d4edda;
    color: #155724;
}

.mobile-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.mobile-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.mobile-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 进度条 */
.mobile-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 12px 0;
}

.mobile-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* 警告框 */
.mobile-alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.mobile-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.mobile-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.mobile-alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.mobile-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

/* 加载动画 */
.mobile-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .page-content {
        padding: 12px;
        padding-top: 10px;
    }
    
    .mobile-card-header,
    .mobile-card-body {
        padding: 16px;
    }
    
    .mobile-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .mobile-input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    /* 契约按钮小屏幕优化 */

}

@media (max-width: 360px) {
    .page-content {
        padding: 8px;
    }
    
    .mobile-card-header,
    .mobile-card-body {
        padding: 12px;
    }
    

}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .mobile-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .mobile-list-item:hover {
        background-color: transparent;
    }
    
    .mobile-btn:active {
        transform: scale(0.98);
    }
    
    .mobile-list-item:active {
        background-color: #f8f9fa;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .mobile-container {
        background: #2d2d2d;
    }
    
    .mobile-card {
        background: #3d3d3d;
        border-color: #4d4d4d;
    }
    
    .mobile-input {
        background: #3d3d3d;
        border-color: #4d4d4d;
        color: #ffffff;
    }
    
    .mobile-input::placeholder {
        color: #9ca3af;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .mobile-btn {
        border: 2px solid currentColor;
    }
    
    .mobile-input {
        border-width: 2px;
    }
} 