/* ========================================
   认证通数智管控平台 - 移动端适配样式
   适配断点：768px / 480px / 375px
   ======================================== */

/* ----------------------------------------
   1. 页面整体悬浮容器 - 移动端去掉悬浮效果
   ---------------------------------------- */
@media (max-width: 768px) {
    body {
        background: #0d0b18;
    }

    .page-float-wrapper {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        animation: none;
    }

    .page-float-wrapper > .header {
        border-radius: 0;
    }

    .page-float-wrapper > .footer {
        border-radius: 0;
    }
}

/* ----------------------------------------
   2. 汉堡菜单按钮
   ---------------------------------------- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    cursor: pointer;
    gap: 5px;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #d4af37;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
}

/* ----------------------------------------
   3. 顶部导航 - 移动端
   ---------------------------------------- */
@media (max-width: 768px) {
    .header .container,
    .header .header-content {
        flex-direction: row !important;
        flex-wrap: nowrap;
        height: auto;
        padding: 12px 16px;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo h1 {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .video-logo {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
    }

    /* 桌面导航隐藏 */
    .nav {
        display: none !important;
    }

    /* 登录注册按钮隐藏，移入抽屉 */
    .auth-buttons {
        display: none !important;
    }
}

/* ----------------------------------------
   4. 移动端导航抽屉
   ---------------------------------------- */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,8,25,0.75);
    z-index: 1050;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(160deg, #1a1228 0%, #0f0c1e 60%, #1a1228 100%);
    border-left: 1.5px solid rgba(212,175,55,0.3);
    z-index: 1051;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
    overflow-y: auto;
}

.mobile-nav-drawer.open {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid rgba(212,175,55,0.15);
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav-logo span {
    color: #f5e07a;
    font-size: 0.9rem;
    font-weight: 600;
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 50%;
    color: #d4af37;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mobile-nav-links {
    flex: 1;
    padding: 16px 0;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #c8b878;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: #f5e07a;
    background: rgba(212,175,55,0.08);
    border-left-color: #d4af37;
}

.mobile-nav-links .nav-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(212,175,55,0.12);
    margin: 8px 24px;
}

.mobile-nav-auth {
    padding: 16px 20px 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-auth .m-btn-login {
    padding: 12px;
    background: transparent;
    border: 1.5px solid #d4af37;
    color: #d4af37;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.mobile-nav-auth .m-btn-register {
    padding: 12px;
    background: linear-gradient(135deg, #d4af37, #f5e07a);
    border: none;
    color: #1a1228;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

/* ----------------------------------------
   5. Hero / 平台介绍区
   ---------------------------------------- */
@media (max-width: 768px) {
    .platform-intro {
        padding: 28px 0 24px 0;
    }

    .intro-card {
        padding: 24px 20px;
    }

    .intro-card h2 {
        font-size: 1.5rem !important;
        line-height: 1.35;
    }

    .intro-subtitle {
        font-size: 0.9rem;
    }

    .intro-features {
        flex-direction: column;
        gap: 10px !important;
    }

    .feature-item {
        padding: 12px 16px !important;
        font-size: 0.85rem;
    }

    .intro-cta {
        flex-direction: column;
        gap: 10px;
    }

    .intro-cta .btn-primary,
    .intro-cta .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .intro-card h2 {
        font-size: 1.25rem !important;
    }
}

/* ----------------------------------------
   6. 入口卡片网格
   ---------------------------------------- */
@media (max-width: 768px) {
    .entrance-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0 16px;
    }

    .entrance-grid-four {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 0 16px;
    }

    .entrance-card {
        padding: 20px 16px;
    }

    .entrance-card h3 {
        font-size: 1rem;
    }

    .entrance-card p {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .entrance-grid-four {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ----------------------------------------
   7. Section 通用间距
   ---------------------------------------- */
@media (max-width: 768px) {
    .section {
        padding: 32px 0;
    }

    .section-header {
        padding: 0 16px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 1.35rem !important;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .container {
        padding: 0 16px;
    }
}

/* ----------------------------------------
   8. 新闻/动态卡片
   ---------------------------------------- */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .news-card {
        padding: 16px;
    }

    .news-card h3 {
        font-size: 0.95rem;
    }

    .news-card .news-meta {
        font-size: 0.78rem;
    }
}

/* ----------------------------------------
   9. 价值主张 / 特色模块
   ---------------------------------------- */
@media (max-width: 768px) {
    .value-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .value-item {
        padding: 20px 16px;
    }

    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}

/* ----------------------------------------
   10. 知识书架 / 培训课程
   ---------------------------------------- */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .training-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ----------------------------------------
   11. 供需大厅
   ---------------------------------------- */
@media (max-width: 768px) {
    .supply-demand-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .detail-section {
        padding: 20px 16px !important;
    }
}

/* ----------------------------------------
   12. 登录 / 注册 弹窗
   ---------------------------------------- */
@media (max-width: 768px) {
    .modal-container {
        margin: 10px;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 16px 20px 20px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 11px 14px;
        font-size: 0.9rem;
    }

    .modal-footer {
        padding: 12px 20px 16px;
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* ----------------------------------------
   13. 内测公告弹窗
   ---------------------------------------- */
@media (max-width: 480px) {
    #betaAnnouncementOverlay > div {
        padding: 28px 20px 24px 20px !important;
        width: 94% !important;
        max-width: none !important;
    }

    #betaAnnouncementOverlay h2 {
        font-size: 1.3rem !important;
    }

    #betaAnnouncementOverlay p {
        font-size: 0.9rem !important;
    }
}

/* ----------------------------------------
   14. Footer
   ---------------------------------------- */
@media (max-width: 768px) {
    .footer {
        padding: 28px 16px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        font-size: 0.8rem;
    }
}

/* ----------------------------------------
   15. 客服浮窗
   ---------------------------------------- */
@media (max-width: 480px) {
    .chat-widget {
        right: 16px !important;
        bottom: 70px !important;
    }

    .chat-dialog {
        width: calc(100vw - 24px) !important;
        right: 12px !important;
        left: 12px !important;
        height: 420px !important;
    }

    #betaFloatBtn {
        right: 16px !important;
        bottom: 130px !important;
        font-size: 0.72rem !important;
        padding: 8px 12px !important;
    }
}

/* ----------------------------------------
   16. 表格、详情页
   ---------------------------------------- */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .detail-section h2 {
        font-size: 1.2rem;
    }

    .detail-section h3 {
        font-size: 1rem;
    }
}

/* ----------------------------------------
   17. 滚动条优化（移动端隐藏）
   ---------------------------------------- */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

/* ----------------------------------------
   18. 手机版入口按钮（桌面端显示，移动端隐藏）
   ---------------------------------------- */

.btn-mobile-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.08));
    border: 1.5px solid rgba(212,175,55,0.4);
    border-radius: 20px;
    color: #d4af37;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 10px;
}

.btn-mobile-version:hover {
    background: linear-gradient(135deg, #d4af37, #c9a227);
    color: #1a1a2e;
    box-shadow: 0 2px 12px rgba(212,175,55,0.35);
}

.btn-mobile-version .mobile-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-mobile-version .mobile-text {
    line-height: 1;
}

/* 移动端隐藏手机版入口按钮（因为已经在手机版了） */
@media (max-width: 768px) {
    .btn-mobile-version {
        display: none !important;
    }
}
