/* 移动端响应式优化样式 */

/* 移动端响应式样式调整 */
:root {
  --brand: #e11d48;
  --brand-dark: #b91c1c;
  --text: #2d2f36;
  --muted: #6c757d;
  --bg: #f5f6fa;
  --card-bg: #ffffff;
  --border: #e9ecef;
  --link: #e11d48;
  --ease-standard: cubic-bezier(.4,0,.2,1);
}

/* 夜间模式变量覆盖（兼容 .dark-mode） */
body[data-theme="dark"], body.dark-mode {
  --bg: #121317;
  --text: #e6e6e6;
  --muted: #a0a4ad;
  --card-bg: #1a1c22;
  --border: #2a2d36;
  --brand: #ff4d6d;
  --brand-dark: #e11d48;
  --link: #ff8fa3;
}

@media (max-width: 768px) {
    /* 基础样式调整 */
    html {
        font-size: 14px;
    }
    
    body {
        padding-top: 60px; /* 为移动端顶部导航留出空间 */
    }
    
    /* 导航栏调整 */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        margin-top: 0.5rem;
    }
    
    /* 首页Hero区域调整 */
    .hero-section, .hero-banner {
        padding: 3rem 0;
        min-height: 60vh;
        margin-top: 12px;
        background: radial-gradient(800px 300px at right -150px top -150px, rgba(225,29,72,0.08), transparent),
                    linear-gradient(180deg, #fff, #fff);
        border-bottom: 1px solid var(--border);
    }
    
    .hero-inner {
        position: relative;
        z-index: 2;
        padding: 2rem 0;
    }
    
    .hero-content {
        text-align: center;
        color: var(--text);
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 15px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        color: var(--muted);
    }
    
    .hero-buttons, .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn, .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-stat {
        flex: 0 0 50%;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    /* 装饰性背景元素 */
    .hero-decoration {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        overflow: hidden;
    }
    
    .hero-circle {
        position: absolute;
        border-radius: 50%;
        background: rgba(225, 29, 72, 0.05);
    }
    
    .hero-circle-1 {
        width: 150px;
        height: 150px;
        top: -30px;
        right: -30px;
        animation: float 15s infinite ease-in-out;
    }
    
    .hero-circle-2 {
        width: 100px;
        height: 100px;
        bottom: -20px;
        left: 10%;
        animation: float 12s infinite ease-in-out reverse;
    }
    
    .hero-circle-3 {
        width: 80px;
        height: 80px;
        top: 50%;
        left: 5%;
        animation: float 10s infinite ease-in-out;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-20px); }
    }
    
    /* 特色功能区块调整 */
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 产品卡片调整 */
    .product-card-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .product-footer {
        padding: 1rem;
    }
    
    /* 流量卡推荐区块调整 */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 游戏和软件推荐区块调整 */
    .game-grid, .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-card, .software-card {
        padding: 1rem;
    }
    
    .game-image, .software-image {
        height: 120px;
    }
    
    /* 页脚调整 */
    footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    /* 移动端底部导航 */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 0.5rem 0;
    }
    
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        color: var(--secondary-color);
        text-decoration: none;
        transition: color 0.3s ease;
        font-size: 0.8rem;
    }
    
    .mobile-nav-item.active {
        color: var(--primary-color);
    }
    
    .mobile-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    /* 用户认证页面调整 */
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
    
    /* 个人中心页面调整 */
    .profile-container {
        padding: 1rem;
    }
    
    .profile-header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .profile-content {
        padding: 1rem;
    }
    
    .profile-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .quick-action {
        padding: 1rem;
    }
    
    /* 管理后台移动端调整 */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
        position: fixed;
        top: 60px;
        left: 0;
        width: 280px;
        height: calc(100vh - 60px);
        background: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    .sidebar-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color);
        padding: 0.5rem;
        cursor: pointer;
    }
    
    .main-content {
        margin-left: 0;
        transition: margin-left 0.3s ease;
    }
    
    .top-navbar {
        padding: 0.75rem 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .page-title {
        font-size: 1.2rem;
        margin: 0;
        flex: 1;
        text-align: center;
    }
    
    .user-menu {
        gap: 0.5rem;
        display: flex;
        align-items: center;
    }
    
    .sidebar-header {
        padding: 1rem;
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .sidebar-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 0.25rem;
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    .sidebar-close:hover {
        background-color: #f8f9fa;
        color: #333;
    }
    
    .sidebar-footer {
        padding: 1rem;
        border-top: 1px solid #eee;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
    }
    
    .content-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stats-icon {
        font-size: 2rem;
    }
    
    .stats-label {
        font-size: 1rem;
    }
    
    .welcome-section {
        padding: 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    /* 表格移动端调整 */
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    /* 表单移动端调整 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 卡片网格调整 */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 选项卡调整 */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 模态框调整 */
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* 分页调整 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-item {
        margin: 0.25rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 警告框调整 */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 面包屑调整 */
    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 徽章调整 */
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* 进度条调整 */
    .progress {
        height: 0.5rem;
    }
    
    /* 列表组调整 */
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* 下拉菜单调整 */
    .dropdown-menu {
        width: 100%;
        max-width: 300px;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
    }
    
    /* 工具提示调整 */
    .tooltip-inner {
        font-size: 0.8rem;
    }
    
    /* 轮播图调整 */
    .carousel-item {
        height: 200px;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.2rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    /* 图片调整 */
    .img-fluid {
        max-width: 100%;
        height: auto;
    }
    
    /* 代码块调整 */
    pre {
        padding: 1rem;
        font-size: 0.8rem;
        overflow-x: auto;
    }
    
    /* 引用块调整 */
    blockquote {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* 按钮组调整 */
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1;
        margin-bottom: 0.25rem;
    }
    
    /* 输入组调整 */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .input-group .btn {
        border-radius: 0.5rem;
    }
    
    /* 自定义控件调整 */
    .custom-control {
        margin-bottom: 0.5rem;
    }
    
    /* 文件上传调整 */
    .custom-file {
        margin-bottom: 1rem;
    }
    
    /* 范围滑块调整 */
    .form-range {
        margin-bottom: 1rem;
    }
    
    /* 开关调整 */
    .custom-switch {
        margin-bottom: 0.5rem;
    }
    
    /* 选择器调整 */
    .custom-select {
        margin-bottom: 1rem;
    }
    
    /* 颜色选择器调整 */
    .custom-color {
        margin-bottom: 1rem;
    }
    
    /* 日期时间选择器调整 */
    .datetime-picker {
        margin-bottom: 1rem;
    }
    
    /* 搜索框调整 */
    .search-box {
        margin-bottom: 1rem;
    }
    
    /* 过滤器调整 */
    .filter-section {
        margin-bottom: 1rem;
    }
    
    /* 排序调整 */
    .sort-section {
        margin-bottom: 1rem;
    }
    
    /* 分页调整 */
    .pagination-section {
        margin-top: 1rem;
    }
    
    /* 加载更多按钮调整 */
    .load-more {
        margin: 1rem 0;
    }
    
    /* 返回顶部按钮调整 */
    .back-to-top {
        bottom: 70px; /* 避免与移动端底部导航重叠 */
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    /* 通知调整 */
    .notification {
        top: 60px; /* 避免与移动端顶部导航重叠 */
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* 菜单调整 */
    .menu-section {
        margin-bottom: 1rem;
    }
    
    .menu-item {
        padding: 0.75rem 1rem;
        margin-bottom: 0.25rem;
    }
    
    /* 子菜单调整 */
    .submenu {
        padding-left: 1rem;
    }
    
    /* 侧边栏菜单调整 */
    .sidebar-menu {
        padding: 1rem 0;
    }
    
    .sidebar-menu-item {
        padding: 0.75rem 1rem;
        margin-bottom: 0.25rem;
    }
    
    /* 用户菜单调整 */
    .user-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        margin: 0;
    }
    
    .user-dropdown .dropdown-menu {
        position: fixed;
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* 购物车调整 */
    .cart-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        margin: 0;
    }
    
    .cart-dropdown .dropdown-menu {
        position: fixed;
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* 搜索调整 */
    .search-form {
        margin-bottom: 1rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    /* 语言切换调整 */
    .language-switcher {
        margin-bottom: 1rem;
    }
    
    /* 主题切换调整 */
    .theme-switcher {
        margin-bottom: 1rem;
    }
    
    /* 社交媒体分享调整 */
    .social-share {
        margin-bottom: 1rem;
    }
    
    .social-share-item {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* 标签云调整 */
    .tag-cloud {
        margin-bottom: 1rem;
    }
    
    .tag-cloud-item {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* 评论区调整 */
    .comment-section {
        margin-bottom: 1rem;
    }
    
    .comment-form {
        margin-bottom: 1rem;
    }
    
    .comment-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    
    .comment-content {
        margin-left: 50px;
    }
    
    .comment-actions {
        margin-top: 0.5rem;
    }
    
    /* 评分调整 */
    .rating-section {
        margin-bottom: 1rem;
    }
    
    .rating-star {
        font-size: 1.2rem;
        margin-right: 0.25rem;
    }
    
    /* 产品详情页调整 */
    .product-detail {
        margin-bottom: 1rem;
    }
    
    .product-gallery {
        margin-bottom: 1rem;
    }
    
    .product-gallery-item {
        height: 200px;
    }
    
    .product-info {
        margin-bottom: 1rem;
    }
    
    .product-title {
        font-size: 1.3rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-description {
        font-size: 0.9rem;
    }
    
    .product-specs {
        margin-bottom: 1rem;
    }
    
    .product-reviews {
        margin-bottom: 1rem;
    }
    
    /* 购物车页面调整 */
    .cart-section {
        margin-bottom: 1rem;
    }
    
    .cart-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-info {
        margin-left: 90px;
    }
    
    .cart-summary {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    /* 结账页面调整 */
    .checkout-section {
        margin-bottom: 1rem;
    }
    
    .checkout-form {
        margin-bottom: 1rem;
    }
    
    .checkout-summary {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    /* 订单页面调整 */
    .order-section {
        margin-bottom: 1rem;
    }
    
    .order-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .order-status {
        margin-bottom: 1rem;
    }
    
    /* 用户账户页面调整 */
    .account-section {
        margin-bottom: 1rem;
    }
    
    .account-menu {
        margin-bottom: 1rem;
    }
    
    .account-content {
        margin-bottom: 1rem;
    }
    
    /* 帮助页面调整 */
    .help-section {
        margin-bottom: 1rem;
    }
    
    .help-category {
        margin-bottom: 1rem;
    }
    
    .help-article {
        margin-bottom: 1rem;
    }
    
    /* 联系页面调整 */
    .contact-section {
        margin-bottom: 1rem;
    }
    
    .contact-form {
        margin-bottom: 1rem;
    }
    
    .contact-info {
        margin-bottom: 1rem;
    }
    
    /* 关于页面调整 */
    .about-section {
        margin-bottom: 1rem;
    }
    
    .team-section {
        margin-bottom: 1rem;
    }
    
    .team-member {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .team-member-image {
        width: 120px;
        height: 120px;
        margin: 0 auto 1rem;
    }
    
    /* 错误页面调整 */
    .error-section {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .error-code {
        font-size: 4rem;
        margin-bottom: 1rem;
    }
    
    .error-message {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* 维护页面调整 */
    .maintenance-section {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .maintenance-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }
    
    .maintenance-message {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* 平板设备调整 */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 导航栏调整 */
    .navbar {
        padding: 0.75rem 1.5rem;
    }
    
    /* 首页Hero区域调整 */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* 特色功能区块调整 */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* 产品卡片调整 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* 游戏和软件推荐区块调整 */
    .game-grid, .software-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* 页脚调整 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* 个人中心页面调整 */
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* 管理后台调整 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* 表格调整 */
    .table {
        font-size: 0.95rem;
    }
    
    /* 表单调整 */
    .form-control {
        font-size: 0.95rem;
    }
    
    .btn {
        font-size: 0.95rem;
    }
}

/* 大屏幕设备调整 */
@media (min-width: 1200px) {
    /* 首页Hero区域调整 */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* 特色功能区块调整 */
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* 产品卡片调整 */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* 游戏和软件推荐区块调整 */
    .game-grid, .software-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* 页脚调整 */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* 个人中心页面调整 */
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* 管理后台调整 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}