/**
 * x_11qcassino 响应式布局优化
 * 移动端优先设计 + 悬浮登录注册按钮
 */

/* ========== 移动端悬浮登录注册按钮（简洁版）========== */
.mobile-auth-buttons {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 50px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mobile-auth-buttons .btn {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    min-width: 90px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border: none !important;
    text-decoration: none !important;
    display: inline-block;
    transition: all 0.3s ease;
}

.mobile-auth-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.mobile-auth-buttons .btn-register {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%) !important;
    color: #1a1a2e !important;
}

/* ========== 响应式断点 ========== */

/* 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-h1,
    .hero h1,
    .main-title {
        font-size: 2.8rem !important;
    }
    
    .games-grid,
    .best-games,
    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

/* 移动端 (最大 768px) */
@media (max-width: 768px) {
    /* 显示移动端悬浮按钮 */
    .mobile-auth-buttons {
        display: flex;
    }
    
    /* 隐藏桌面端登录注册按钮 */
    .header-right .btn,
    .header-top-row .btn,
    .navbar .btn-primary,
    .navbar .btn-success {
        display: none !important;
    }
    
    /* Hero 区域优化 */
    .hero,
    .hero-section,
    #plataforma,
    .main-banner {
        padding: 60px 0 100px; /* 底部留空给悬浮按钮 */
    }
    
    .hero-h1,
    .hero h1,
    .main-title {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem;
    }
    
    .hero-description,
    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    /* 游戏网格优化 */
    .games-grid,
    .best-games,
    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 1rem 0;
    }
    
    /* 卡片优化 */
    .card,
    .game-card,
    .feature-card,
    .promo-card {
        border-radius: 12px !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    /* 按钮优化 */
    .btn,
    button:not(.close):not(.navbar-toggler) {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
    }
    
    /* 导航优化 */
    .header-nav-links,
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
    }
    
    .nav-link,
    .header-nav-links a {
        padding: 12px 16px !important;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Footer 优化 */
    .footer,
    footer {
        padding: 40px 0 100px; /* 底部留空给悬浮按钮 */
    }
    
    .footer-nav,
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-nav__list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* 特性区域 */
    .features,
    .features-section {
        padding: 40px 0;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    /* E-E-A-T 区域 */
    .responsible-gaming,
    .licensing-info {
        padding: 16px !important;
        margin: 16px 0 !important;
    }
    
    .footer-legal-eeat {
        margin-top: 20px !important;
    }
    
    /* 表格响应式 */
    table {
        font-size: 0.85rem;
    }
    
    thead {
        display: none;
    }
    
    tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1rem;
    }
    
    tbody td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 12px !important;
    }
}

/* 小屏手机 (最大 480px) */
@media (max-width: 480px) {
    .hero-h1,
    .hero h1,
    .main-title {
        font-size: 1.8rem !important;
    }
    
    .games-grid,
    .best-games,
    .slots-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .mobile-auth-buttons {
        width: calc(100% - 40px);
        max-width: 400px;
        justify-content: center;
    }
    
    .mobile-auth-buttons .btn {
        flex: 1;
        min-width: auto;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ========== 横屏优化 ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero,
    .hero-section {
        padding: 40px 0 80px;
    }
    
    .hero-h1,
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .mobile-auth-buttons {
        bottom: 10px;
        padding: 8px;
    }
    
    .mobile-auth-buttons .btn {
        padding: 8px 16px !important;
        font-size: 0.8rem !important;
    }
}

/* ========== 触摸优化 ========== */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备优化 */
    .btn,
    button,
    a {
        min-height: 44px; /* iOS 推荐的最小触摸目标 */
        min-width: 44px;
    }
    
    .nav-link,
    .footer-nav a {
        padding: 14px 16px !important;
    }
    
    /* 禁用悬停效果，使用点击效果 */
    .card:hover,
    .game-card:hover {
        transform: none;
    }
    
    .card:active,
    .game-card:active {
        transform: scale(0.98);
    }
}

/* ========== 平板横屏优化 ========== */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .games-grid,
    .best-games,
    .slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== 大屏优化 ========== */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .games-grid,
    .best-games,
    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2.5rem;
    }
    
    .hero-h1,
    .hero h1 {
        font-size: 4rem !important;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .mobile-auth-buttons,
    .header,
    .footer,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
}

/* ========== 辅助功能优化 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== 深色模式支持 ========== */
@media (prefers-color-scheme: dark) {
    .mobile-auth-buttons {
        background: rgba(26, 26, 46, 0.95);
    }
    
    .card,
    .game-card {
        background: #1a1a2e;
        color: white;
    }
}

/* ========== 网格布局辅助类 ========== */
.row-cols-mobile-1 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

@media (max-width: 768px) {
    .row-cols-mobile-1 > * {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .row-cols-mobile-2 > * {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* ========== 间距辅助类 ========== */
@media (max-width: 768px) {
    .p-mobile-0 { padding: 0 !important; }
    .p-mobile-1 { padding: 0.25rem !important; }
    .p-mobile-2 { padding: 0.5rem !important; }
    .p-mobile-3 { padding: 1rem !important; }
    .p-mobile-4 { padding: 1.5rem !important; }
    
    .m-mobile-0 { margin: 0 !important; }
    .m-mobile-1 { margin: 0.25rem !important; }
    .m-mobile-2 { margin: 0.5rem !important; }
    .m-mobile-3 { margin: 1rem !important; }
    .m-mobile-4 { margin: 1.5rem !important; }
    
    .mb-mobile-5 { margin-bottom: 3rem !important; }
    .pb-mobile-5 { padding-bottom: 3rem !important; }
}

/* ========== 文字大小辅助类 ========== */
@media (max-width: 768px) {
    .fs-mobile-1 { font-size: 2rem !important; }
    .fs-mobile-2 { font-size: 1.5rem !important; }
    .fs-mobile-3 { font-size: 1.25rem !important; }
    .fs-mobile-4 { font-size: 1rem !important; }
    .fs-mobile-5 { font-size: 0.875rem !important; }
    .fs-mobile-6 { font-size: 0.75rem !important; }
}

/* ========== 显示/隐藏辅助类 ========== */
@media (max-width: 768px) {
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
    .d-mobile-flex { display: flex !important; }
    .d-mobile-grid { display: grid !important; }
}

@media (min-width: 769px) {
    .d-desktop-none { display: none !important; }
}
