/* ==========================================================================
   123CAD 移动端柔化样式（2026-10-29）
   目标：手机端使用更大的圆角 + 更柔和的阴影，去掉生硬的直角观感。
   仅在宽度 <= 767px 时生效，桌面端完全不受影响。
   ========================================================================== */

@media (max-width: 767px) {

  /* ---------- 卡片 / 大容器：圆角加大到 18px，阴影变淡变散 ---------- */
  .wow_content,
  .wowonder-well,
  .post .panel,
  .panel-white,
  .profile-container .card,
  .user-ad-container .panel-white,
  .wow_memories_friends .panel,
  .wo_user_profile .user-bottom-nav,
  .wo_loading_post {
    border-radius: 18px !important;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06), 0 1px 3px rgba(17, 24, 39, 0.04) !important;
  }

  /* 帖子底部点赞/评论区域：跟随卡片做出下方的圆角 */
  .post .post-footer {
    border-radius: 0 0 18px 18px !important;
  }

  /* 个人主页封面卡片顶部保持直边，避免封面图片露出直角（沿用原设计） */
  .profile-container .card {
    border-radius: 0 0 18px 18px !important;
  }

  /* ---------- 导航栏移到底部，做成手机 APP 的底部标签栏 ---------- */
  .navbar.navbar-default.navbar-fixed-top {
    top: auto !important;
    bottom: 0;
    height: auto;
    min-height: 56px;
    border-width: 0;
    border-top: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 18px 18px 0 0;
    padding-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -6px 18px rgba(17, 24, 39, 0.08) !important;
    z-index: 1030;
  }

  .navbar.navbar-default.navbar-fixed-top .header-fixed1000,
  .navbar.navbar-default.navbar-fixed-top .header-fixed1000 > .container-fluid {
    height: 56px;
    max-width: 100%;
  }

  /* 图标均匀分布在整条底栏上 */
  .navbar.navbar-default.navbar-fixed-top .header-fixed1000 > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0;
  }

  /* 让两段 ul 里的图标参与整条底栏的等分排列 */
  .navbar.navbar-default.navbar-fixed-top .wow_hdr_innr_left,
  .navbar.navbar-default.navbar-fixed-top .wow_hdr_innr_left > .nav,
  .navbar.navbar-default.navbar-fixed-top #head_menu_rght {
    display: contents;
  }

  /* 登录用户：底栏只放功能图标，不显示站点 logo */
  body.user-loggedin .navbar.navbar-default.navbar-fixed-top .header-brand {
    display: none !important;
  }

  /* 游客：留一个 logo 作为标识（登录/注册入口在右侧菜单里） */
  body.user-guest .navbar.navbar-default.navbar-fixed-top .header-brand {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 14px;
  }

  body.user-guest .navbar.navbar-default.navbar-fixed-top .header-brand img {
    max-height: 24px;
    width: auto;
  }

  .navbar.navbar-default.navbar-fixed-top .navbar-nav > li {
    position: relative;
  }

  .navbar.navbar-default.navbar-fixed-top .navbar-nav > li > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 10px !important;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease;
  }

  /* 手指按下时给一点反馈，接近原生 APP 的手感 */
  .navbar.navbar-default.navbar-fixed-top .navbar-nav > li > a:active {
    opacity: 0.55;
  }

  /* “创建”按钮做成圆形的中间主按钮 */
  .navbar.navbar-default.navbar-fixed-top .head_name_links .btn-main {
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  /* 底栏上的弹出菜单统一改成「从底栏上方整宽弹出」的 APP 面板
     用 fixed 是为了不再依赖 li 的定位：主题在小屏会把打开的 li 设为 static，
     菜单若还按 li 定位，右侧的「通知 / 我的」菜单会被撑到屏幕外。
     这里全部固定成：贴住底栏上方、左右各留 0、整屏宽、顶部圆角。 */
  @keyframes wo_app_sheet_up {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .navbar.navbar-default.navbar-fixed-top .dropdown-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 56px !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    transform-origin: center bottom !important;
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: wo_app_sheet_up 0.22s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }

  /* 面板顶部的小横条，提示这是一个可从下方关闭的 APP 面板 */
  .navbar.navbar-default.navbar-fixed-top .dropdown-menu:before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: 8px auto 2px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.16);
  }

  /* 「创建」是网格面板，不用小横条；同时盖掉主题原来那个白色小三角 */
  .navbar.navbar-default.navbar-fixed-top .create_head_menu:before {
    content: none !important;
    display: none !important;
  }

  /* 账号切换菜单：固定在底栏上方 */
  .navbar.navbar-default.navbar-fixed-top .dropdown-switch-account {
    position: absolute !important;
    height: 0;
  }

  .navbar.navbar-default.navbar-fixed-top .dropdown-switch-account .dropdown-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 56px !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0;
    right: 0;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* 搜索框：从底栏上方弹出 */
  #wo_home_search {
    top: auto !important;
    bottom: 56px !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 14px rgba(17, 24, 39, 0.06) !important;
    z-index: 1029;
  }

  /* 搜索面板贴在屏幕底部，结果列表改为向上展开，避免被底栏和屏幕边缘裁掉 */
  #wo_home_search .search-dropdown-container {
    position: absolute !important;
    top: auto !important;
    bottom: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 16px 16px 0 0 !important;
    transform-origin: center bottom !important;
  }

  /* 底栏占掉的底部空间，正文补回来 */
  .content-container.container {
    margin-top: 0 !important;
    padding-bottom: 64px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .content-container.wo-msg-container {
    margin-top: 0 !important;
  }

  /* 帖子筛选栏原本贴在顶部导航下方，现在贴顶即可 */
  ul#filterby-post {
    top: 0 !important;
  }

  /* ---------- 消息页：给底部导航让位 ---------- */
  #wo_nw_msg_page .msg_under_hood .mobilerightpane,
  #wo_nw_msg_page .msg_under_hood .mobileleftpane {
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
  }

  .mobileleftpane {
    top: 0;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
  }

  /* ---------- 短视频（Reels）页面：全屏沉浸，隐藏底栏 ---------- */
  body.page-reels .navbar.navbar-default.navbar-fixed-top {
    display: none !important;
  }

  body.page-reels .reels_list,
  body.page-reels .hidden_reels {
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  body.page-reels .wo_reels_cont {
    margin-top: 0;
    height: 100vh;
    height: 100dvh;
  }

  body.page-reels .wo_reels_cont .plyr--video {
    height: 100vh;
    height: 100dvh;
  }

  /* ---------- 按钮 ---------- */
  .btn,
  .btn-mat,
  .btn-default,
  .btn-main,
  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-warning,
  .btn-info,
  .wow_form_fields .btn {
    border-radius: 12px !important;
  }

  /* 原本就是圆形的图标按钮保持圆形 */
  .btn-circle,
  .btn-round,
  .btn-mat.btn-circle,
  .add-emoticons .dropdown-toggle {
    border-radius: 50% !important;
  }

  /* ---------- 输入框 / 下拉选择 ---------- */
  input.form-control,
  textarea.form-control,
  select.form-control,
  .wow_form_fields input,
  .wow_form_fields textarea,
  .wow_form_fields select,
  .wow_form_fields .bootstrap-select > .dropdown-toggle {
    border-radius: 14px !important;
  }

  /* ---------- 弹出层 / 下拉菜单 / 模态框 ---------- */
  .dropdown-menu:not(.notfi-dropdown):not([role=combobox]) {
    border-radius: 16px !important;
  }

  .modal-content {
    border-radius: 20px !important;
    overflow: hidden;
  }

  .alert,
  .errors,
  .success {
    border-radius: 14px !important;
  }

  /* ---------- 列表分组（设置页、筛选等） ---------- */
  .list-group {
    border-radius: 16px;
  }

  .list-group-item:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .list-group-item:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  /* ---------- 动态故事（顶部头像条） ---------- */
  .user-status-home ul.status-list li a {
    border-radius: 14px !important;
  }

  .user-status-home ul.status-list li a:after {
    border-radius: 0 0 14px 14px !important;
  }

  /* ---------- 帖子里的媒体与链接卡片 ---------- */
  .post .post-file img,
  .post .post-file video,
  .post .post-file .media-video-file,
  .post-fetched-url,
  .post-fetched-url .fetched-url-text,
  .wow_shared_posts,
  .messages-container .message-media img,
  .messages-container .message-media video {
    border-radius: 14px !important;
  }

  .post-fetched-url {
    overflow: hidden;
  }

  /* ---------- 视频播放器 / 视频详情页 ---------- */
  .plyr,
  .plyr video,
  .plyr iframe,
  .video-js-responsive-container,
  .watch_player_movie,
  .watch_player_movie iframe,
  .post-youtube,
  .post-youtube iframe,
  .post .post-file iframe,
  .post .post-file .media-video-file {
    border-radius: 16px !important;
  }

  /* .plyr--video 自带 overflow:hidden，无需额外裁剪；这里只处理其它容器 */
  .video-js-responsive-container,
  .watch_player_movie,
  .post-youtube,
  .post .post-file iframe {
    overflow: hidden;
  }

  /* 全屏播放时去掉圆角，避免屏幕四角露底 */
  .plyr--fullscreen-fallback,
  .plyr:fullscreen {
    border-radius: 0 !important;
  }

  /* 播放器设置菜单 */
  .plyr__menu__container {
    border-radius: 12px !important;
  }

  /* 下一个视频卡片里的缩略图 */
  .wo_watch_next .thumb {
    border-radius: 16px;
    overflow: hidden;
  }

  /* ---------- 电影 / 视频列表页 ---------- */
  .movies .movies-film-wrapper figure img,
  .related-movies-wrapper .related-movies-carousel .related-film-wrapper img {
    border-radius: 16px !important;
  }

  .movies-nav-wrapper .movies-nav-item,
  .wow_movie_infos .mve_thmb .badge {
    border-radius: 999px !important;
  }

  .movies-search .search-result {
    border-radius: 16px !important;
    overflow: hidden;
  }

  .wow_movie_infos .mve_thmb img {
    border-radius: 16px !important;
  }

  /* ---------- 评论气泡 ---------- */
  .post .post-footer .comments-list .comment .comment-heading {
    border-radius: 14px !important;
  }

  /* ---------- 私信气泡 ---------- */
  .text-sender-container .message-model .message {
    border-radius: 16px !important;
  }

  /* ---------- 关闭按钮等小圆点 ---------- */
  .modal-header .close,
  .close {
    border-radius: 50%;
  }

  /* ---------- 登录 / 注册页 ---------- */
  #welcomeheader {
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.10) !important;
  }

  #welcomeheader .mdbtn {
    border-radius: 999px !important;
  }

  .login .wow_form_fields input,
  .login .wow_form_fields textarea,
  .login .wow_form_fields select {
    border-radius: 16px !important;
  }

  .login_signup_combo .login__ .btn {
    border-radius: 16px !important;
  }

  /* ---------- APP 式交互手感 ---------- */
  /* 去掉安卓/苹果点击时闪出的灰色方块，ios 上还顺带去掉双击缩放带来的 300ms 延迟 */
  a,
  button,
  .btn,
  label,
  .dropdown-toggle,
  .nav-tabs > li > a,
  .nav-pills > li > a,
  .list-group-item,
  .dropdown-menu > li > a,
  .wow_content .post .post-actions a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* 按压反馈：按钮/列表项轻按变淡，接近原生 APP */
  .btn:active,
  .btn-mat:active,
  .dropdown-menu > li > a:active,
  .list-group-item:active,
  .nav-tabs > li > a:active,
  .wow_content .post .post-actions a:active {
    opacity: 0.6;
    transition: opacity 0.08s ease;
  }

  /* 当前所在页面：底栏图标下方显示一个小圆点，和 APP 的标签栏一致 */
  body.page-home .wow_hdr_innr_left .navbar-nav > li:first-child > a::after,
  body.page-messages #head_menu_rght .messages-notification-container > a::after,
  body.page-timeline #head_menu_rght > li > a.user-menu-combination::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
  }

  /* 页面内可滚动的浮层用惯性滚动，滑动更顺 */
  .dropdown-menu,
  .search-dropdown-container,
  .wow_liv_comments_feed,
  .messages-container {
    -webkit-overflow-scrolling: touch;
  }

  /* ---------- 直播页：全屏沉浸，隐藏底栏（和 Reels 一致） ---------- */
  body.page-live .navbar.navbar-default.navbar-fixed-top {
    display: none !important;
  }

  body.page-live .content-container {
    padding-bottom: 0 !important;
  }

  /* ---------- 登录 / 注册页：没有标签栏，隐藏底栏 ---------- */
  body.page-welcome .navbar.navbar-default.navbar-fixed-top {
    display: none !important;
  }

  body.page-welcome .content-container {
    padding-bottom: 0 !important;
  }
}
