body {
    /* background-image: url("../images/bg.png"); */
    background-repeat: repeat;
    background-position: top left;
    background-attachment: scroll;
    padding-top: 50px;
    font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}

code {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    display: inline-block;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
    font-size: 0.875em;
    font-weight: bold;
    padding: 1px 6px;
    vertical-align: baseline;
}

.bookmark {
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
    color: #212121;
    border: 1px solid transparent;
}

.bookmarkTitle {
    color: #333;
    font-size: 16px;
    line-height: 24px;
    display: -webkit-box;
    text-overflow: ellipsis;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bookmarkNormalHover {
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
    color: #212121;
    background: #f5f5f5;
    cursor: pointer;
    border: 1px solid transparent;
}

.bookmarkOperaterHover {
    cursor: pointer;
}

.tags {
    cursor: default;
}

.bookmarkEditHover {
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
    color: #212121;
    cursor: default;
    border: 1px dashed #3388ff;
}

.bookmarkInfo {
    cursor: url("../images/detail.ico"), auto;
}

.img-fixed-size {
    width: 16px;
    height: 16px;
}

td {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

table {
    table-layout: fixed;
}

.wrap {
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
}

.js-navigate-bookmark a {
    color: #212121;
}

.ui.menu .selected.item {
    background: rgba(1, 1, 1, 0.05);
}

img.operator {
    width: 16px;
    height: 16px;
}

.js-bookmark-info .content img {
    max-width: 100%;
    max-height: 100%;
    padding-right: 20px;
}

.hot-image {
    max-width: 100%;
    max-height: 160px;
    min-height: 160px;
    background-color: yellow;
    overflow: hidden;
}

.sourceName {
    display: inline-block;
    position: relative;
    top: 4px;
    max-width: 55px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #333;
}

.favCount {
    position: relative;
    top: 1px;
    font-size: 12px;
    color: #bfc0c6;
}

.urlSpan {
    word-wrap: break-word;
    word-break: break-all;
    cursor: default;
}

.ui.sortable.table thead th.forbid_sorted:hover {
    cursor: default;
    background: #f9fafb;
}

.ui.selection.list .list > .item,
.ui.selection.list > .item {
    border-radius: 0;
}

.js-p-info p {
    margin-bottom: 5px;
    font-size: 16px;
}

.note-content {
    font: 15px "Lucida Grande", Helvetica, Arial, sans-serif;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
}

.fontgreen {
    color: RGB(33, 186, 69);
}

.fontred {
    color: #f00;
}

.js-history-word:hover {
    background: #f0f0f0;
}

.js-weixin-content img {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0 auto;
}

.js-search-input {
    font-size: 14px;
}

/* ------------------------------------------------------------------
   响应式改造的基础部分
   ------------------------------------------------------------------ */

/* 菜单中的搜索区域自适应剩余宽度。
   原来写死 width:1500px，会把整个页面撑到 1500px 以上，
   手机上出现严重的横向溢出，现改为弹性宽度。 */
#js-search {
    flex: 1 1 auto;
    min-width: 0;
}

/* 菜单右侧的图标区。
   原先放在搜索框内部，手机上想单独隐藏搜索框就没法保留操作图标，
   所以拆成菜单的独立一项。 */
.js-search-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    align-self: center;
    padding-right: 1em;
}

.js-search-actions>span {
    display: flex;
    align-items: center;
}

/* 手机端才显示的搜索开关（桌面端搜索框常驻） */
.js-search-actions>.js-search-toggle {
    display: none;
    margin-right: 0.5em;
    cursor: pointer;
}

/* ------------------------------------------------------------------
   整页滚动（重要）

   CSS 规范：一个元素只要某个方向的 overflow 不是 visible，另一个方向的
   visible 就会被强制计算成 auto —— 也就是变成「滚动容器」。
   Semantic 默认给 body 加了 overflow-x:hidden，于是 body 成了滚动容器；
   桌面浏览器会把滚动上交给视口，所以 PC 上正常；但部分安卓内核
   （vivo / OPPO / 微信 WebView 等）会保留 body 自己的滚动容器，
   结果就是内容比屏幕高却怎么都划不动。

   这里不再给 html / body 设置任何 overflow：
     - body 只取消 Semantic 的横向裁剪（overflow-x:visible）；
     - html 高度交还给内容；
     - 其余完全使用浏览器默认的整页滚动行为。
   横向溢出由页面内的 min-width / word-break / 省略号控制，
   不再靠 body 裁切，避免再次踩到上面这个坑。
   ------------------------------------------------------------------ */
html {
    height: auto;
}

body {
    overflow-x: visible !important;
}

/* 图片不超出父容器（带内联固定宽高的小图标不受影响） */
img {
    max-width: 100%;
}

/* 屏幕上没有 hover 的设备（手机/平板），不要因为 hover 才显示的操作而无法使用 */
@media (hover: none) {
    /* 热门卡片：操作栏改为常驻显示，信息栏隐藏，避免两栏重复 */
    .js-hot-cards .js-card-info {
        display: none !important;
    }

    .js-hot-cards .js-card-actions.ng-hide {
        display: block !important;
    }
}

/* ---------------------------------------------------------------------
   分类栏图标（+ / 铅笔 / 表格 / 列表）的悬浮提示
   原来用 Semantic popup，气泡会偏到图标下方、和标签文字重叠，
   这里改成纯 CSS 气泡：始终贴在图标正上方，不被遮挡。
   手机端不显示（app-angular.js 里会把 data-content 去掉，另有 hover 判断兜底）。
   注意：不能再占用 i.icon 的 ::before，那是 Semantic 画图标用的。
   --------------------------------------------------------------------- */
@media (hover: hover) {
    .js-tag-label>i.icon {
        position: relative;
    }

    .js-tag-label>i.icon[data-content]:hover::after {
        content: attr(data-content);
        position: absolute;
        left: 50%;
        bottom: calc(100% + 5px);
        transform: translateX(-50%);
        padding: 0.35rem 0.6rem;
        background: #fff;
        color: #1b1c1d;
        font-family: inherit;
        font-size: 0.75rem;
        font-style: normal;
        font-weight: 400;
        line-height: 1.5;
        white-space: nowrap;
        border: 1px solid rgba(34, 36, 38, .15);
        border-radius: 0.28571429rem;
        box-shadow: 0 2px 6px rgba(34, 36, 38, .18);
        pointer-events: none;
        z-index: 1900;
    }
}

/* ---------------------------------------------------------------------
   登录页的「体验账号」提示
   原来是 float:right，会顶到卡片右边框外面，改成普通文本右对齐
   --------------------------------------------------------------------- */
.js-demo-tip {
    margin-top: 8px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    word-break: break-word;
}
