/* 移动端专用样式 */

/* 默认隐藏移动端元素（桌面端） */
.mobile-container,
.mobile-header,
.mobile-bottom-nav,
.mobile-sidebar,
.mobile-fab,
.mobile-overlay {
    display: none !important;
}

/* 基础移动端适配 */
@media (max-width: 768px) {
    /* 隐藏桌面版导航 */
    .desktop-nav {
        display: none !important;
    }
    
    /* 重新显示移动端元素 */
    .mobile-container,
    .mobile-header,
    .mobile-bottom-nav,
    .mobile-sidebar,
    .mobile-fab,
    .mobile-overlay {
        display: block !important;
    }
    
    /* 移动端主容器 */
    .mobile-container {
        display: flex !important;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    /* 移动端顶部导航栏 */
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        position: relative;
        z-index: 1000;
    }
    
    .mobile-header h1 {
        font-size: 18px;
        font-weight: 600;
        margin: 0;
    }
    
    .mobile-menu-btn {
        background: none;
        border: none;
        color: white;
        font-size: 20px;
        padding: 8px;
        border-radius: 6px;
        transition: background-color 0.2s;
    }
    
    .mobile-menu-btn:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* 移动端底部导航 */
    .mobile-bottom-nav {
        display: flex !important;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 8px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        position: relative;
        z-index: 1000;
    }
    
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 4px;
        text-decoration: none;
        color: #6b7280;
        transition: all 0.2s;
        border-radius: 8px;
        margin: 0 4px;
    }
    
    .mobile-nav-item.active {
        color: #3b82f6;
        background-color: #eff6ff;
    }
    
    .mobile-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .mobile-nav-item span {
        font-size: 11px;
        font-weight: 500;
    }
    
    /* 移动端主内容区域 */
    .mobile-main {
        flex: 1;
        overflow: hidden;
        position: relative;
    }
    
    .mobile-iframe {
        width: 100%;
        height: 100%;
        border: none;
        background: #f9fafb;
    }
    
    /* 移动端侧边菜单 */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 2000;
        overflow-y: auto;
    }
    
    .mobile-sidebar.open {
        left: 0;
    }
    
    .mobile-sidebar-header {
        padding: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .mobile-sidebar-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
    }
    
    .mobile-sidebar-header p {
        margin: 4px 0 0 0;
        font-size: 14px;
        opacity: 0.9;
    }
    
    .mobile-sidebar-menu {
        padding: 20px 0;
    }
    
    .mobile-sidebar-item {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: #374151;
        text-decoration: none;
        transition: background-color 0.2s;
        border-left: 3px solid transparent;
    }
    
    .mobile-sidebar-item:hover {
        background-color: #f3f4f6;
    }
    
    .mobile-sidebar-item.active {
        background-color: #eff6ff;
        color: #3b82f6;
        border-left-color: #3b82f6;
    }
    
    .mobile-sidebar-item i {
        width: 24px;
        margin-right: 12px;
        font-size: 18px;
    }
    
    /* 移动端遮罩层 */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1500;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* 移动端快速操作按钮 */
    .mobile-fab {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 24px;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .mobile-fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    }
    
    /* 移动端页面特定样式 */
    .mobile-page-header {
        padding: 16px;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .mobile-page-title {
        font-size: 20px;
        font-weight: 600;
        color: #111827;
        margin: 0;
    }
    
    .mobile-page-subtitle {
        font-size: 14px;
        color: #6b7280;
        margin: 4px 0 0 0;
    }
    
    /* 移动端表单样式 */
    .mobile-form-group {
        margin-bottom: 16px;
    }
    
    .mobile-form-label {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        margin-bottom: 6px;
    }
    
    .mobile-input {
        width: 100%;
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 16px;
        transition: border-color 0.2s;
    }
    
    .mobile-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .mobile-textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 16px;
        resize: vertical;
        min-height: 120px;
        transition: border-color 0.2s;
    }
    
    .mobile-textarea:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* 移动端按钮样式 */
    .mobile-btn {
        width: 100%;
        padding: 14px;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .mobile-btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .mobile-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    
    .mobile-btn-secondary {
        background: #f3f4f6;
        color: #374151;
        border: 1px solid #d1d5db;
    }
    
    .mobile-btn-secondary:hover {
        background: #e5e7eb;
    }
    
    /* 移动端卡片样式 */
    .mobile-card {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border: 1px solid #e5e7eb;
    }
    
    .mobile-card-header {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-card-title {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin: 0;
    }
    
    .mobile-card-icon {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
        font-size: 18px;
    }
    
    /* 移动端选择按钮样式 */
    .mobile-option-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .mobile-option-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background: white;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }
    
    .mobile-option-btn:hover {
        border-color: #3b82f6;
        background: #eff6ff;
    }
    
    .mobile-option-btn.active {
        border-color: #3b82f6;
        background: #3b82f6;
        color: white;
    }
    
    .mobile-option-btn .icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .mobile-option-btn .text {
        font-size: 12px;
        font-weight: 500;
    }
    
    /* 移动端通知样式 */
    .mobile-toast {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        background: white;
        border-radius: 8px;
        padding: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        z-index: 3000;
        transform: translateY(-100px);
        transition: transform 0.3s ease;
    }
    
    .mobile-toast.show {
        transform: translateY(0);
    }
    
    .mobile-toast-success {
        border-left: 4px solid #10b981;
    }
    
    .mobile-toast-error {
        border-left: 4px solid #ef4444;
    }
    
    .mobile-toast-warning {
        border-left: 4px solid #f59e0b;
    }
    
    .mobile-toast-info {
        border-left: 4px solid #3b82f6;
    }
}

/* 强制移动端模式 */
.force-mobile {
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-container {
        display: flex !important;
    }
    
    .mobile-header,
    .mobile-bottom-nav {
        display: flex !important;
    }
    
    .mobile-sidebar,
    .mobile-fab,
    .mobile-overlay {
        display: block !important;
    }
}

/* 移动端页面内容滚动优化 */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-main {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 移动端输入框优化 */
    input, textarea, select {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 移动端点击优化 */
    .mobile-nav-item,
    .mobile-sidebar-item,
    .mobile-option-btn,
    .mobile-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
} 