html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    min-height: 100vh;
    background: #ffffff;
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Arial', sans-serif;
}
ul,ol{list-style:none;}
ins,a{text-decoration:none}

.top-header {
    width: 100%;
    background: rgba(40,60,80,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.top-header-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    box-sizing: border-box;
}
.top-logo {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}
.top-nav nav {
    display: inline-block;
}
.top-nav ul {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
}
.top-nav li {
    list-style: none;
}
.top-nav a {
    color: #f5f5f5;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
}
.top-nav a:hover {
    background: rgba(255,255,255,0.12);
}

.main-layout {
    display: flex;
    min-height: calc(100vh - 48px);
}
.sidebar {
    width: 70px;
    background: rgba(40,60,80,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 0 0;
    box-sizing: border-box;
    height: 100%;
    border-radius: 0 20px 20px 0;
}
.sidebar .logo {
    width: 38px;
    height: 38px;
    margin: 0 0 10px 0;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #1e90ff;
}
.sidebar .nav {
    flex: 1;
    width: 100%;
}
.sidebar .nav-item {
    width: 100%;
    color: #fff;
    text-align: center;
    padding: 12px 0 4px 0;
    cursor: pointer;
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s;
    font-size: 12px;
}
.sidebar .nav-item.active, .sidebar .nav-item:hover {
    background: rgba(255,255,255,0.08);
    opacity: 1;
}
.sidebar .nav-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
}
.sidebar .sidebar-bottom {
    width: 100%;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sidebar .sidebar-bottom button {
    width: 32px;
    height: 32px;
    margin: 6px 0;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar .sidebar-bottom button:hover {
    background: rgba(255,255,255,0.25);
}
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
}
.content-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.content-extra {
    width: 100%;
    max-width: 600px;
    margin: 54px auto 0 auto;
    padding: 12px 14px 10px 14px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.95);
    border-radius: 14px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.content-extra dl {
    margin: 0 0 8px 0;
}
.content-extra dt {
    font-weight: 600;
    margin-bottom: 4px;
    color: #444;
}
.content-extra dd {
    margin: 0;
    color: #666;
    font-size: 13px;
}
.content-extra a {
    color: #1e90ff;
}
.ps-bar {
    width: 100%;
    background: #f7f7f7;
    border-top: 1px solid #ececec;
    font-size: 12px;
    color: #666;
}
.ps-bar-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 6px 14px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ps-text span {
    display: inline-block;
}
.ps-close {
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
}
.ps-close:hover {
    color: #666;
}
.setting-dialog {
    background: #fff;
    padding: 20px 22px 14px 22px;
    border-radius: 16px;
    min-width: 340px;
    max-width: 96vw;
    box-shadow: 0 2px 24px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}
.setting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.setting-header h3 {
    margin: 0;
    font-size: 18px;
}
.setting-close {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
}
.setting-close:hover {
    color: #333;
}
.setting-section {
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
}
.setting-section:first-of-type {
    border-top: none;
}
.setting-section-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}
.setting-radio {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
}
.bg-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 80px;
    overflow: auto;
}
.bg-thumb {
    width: 60px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative;
}
.bg-thumb-checked {
    position: absolute;
    right: 2px;
    top: 2px;
    background: #1e90ff;
    color: #fff;
    font-size: 12px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.setting-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.setting-footer-left,
.setting-footer-right {
    display: flex;
    gap: 8px;
}
.btn-primary,
.btn-secondary,
.btn-danger-light {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: #1e90ff;
    color: #fff;
}
.btn-secondary {
    background: #f2f3f5;
    color: #333;
}
.btn-danger-light {
    background: #fff5f5;
    color: #d4380d;
}
.btn-primary:hover {
    background: #1875cc;
}
.btn-secondary:hover {
    background: #e5e6eb;
}
.btn-danger-light:hover {
    background: #ffe1e1;
}
footer {
    width: 100%;
    margin-top: 12px;
    font-size: 12px;
    color: #888;
}
footer > div {
    text-align: center;
    margin: 4px 0;
}
footer a {
    color: #666;
}
footer a:hover {
    color: #1e90ff;
}
.clock {
    color: #5c5555;
    font-size: 32px;
    font-weight: 500;
    margin-top: 18px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.date {
    color: #686363;
    font-size: 15px;
    margin-bottom: 18px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.search-bar {
    max-width: 98vw;
    background: rgba(255,255,255,0.92);
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 16px;
    margin: 0 auto 24px auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.search-bar textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    padding: 10px 0;
    font-family: inherit;
    min-height: 70px;
    line-height: 1.4;
    color: #444;
    text-align: center;
}
.search-bar textarea::placeholder {
    font-size: 14px;
}
.search-bar .search-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: #1e90ff;
    cursor: pointer;
}
.site-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin: 10px auto 0 auto;
    align-items: flex-start;
    max-width: 600px;
}
.site-section-title {
    width: 100%;
    font-size: 13px;
    color: #888;
    margin: 6px 2px 2px 2px;
    font-weight: 500;
}
.site-section-title-classic {
    margin-top: 4px;
}
.site-section-title-ai {
    margin-top: 14px;
    color: #1e90ff;
    font-size: 14px;
}
.site-card {
    min-width: 70px;
    min-height: 40px;
    background: linear-gradient(135deg, #4f9eff, #2dd3ff);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
    user-select: none;
}
.site-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px) scale(1.03);
}
.site-card img.icon-bg {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    display: block;
    margin: 0 auto 6px auto;
    object-fit: contain;
}
.site-card .site-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    padding: 2px 6px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-card.add {
    background: rgba(255,255,255,0.5);
    color: #1e90ff;
    /* border: 2px dashed #1e90ff; */
    justify-content: center;
}
.site-card.add:hover {
    background: rgba(30,144,255,0.08);
}
/* 右键菜单样式 */
.ctx-menu {
    position: fixed;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    padding: 8px 0;
    z-index: 9999;
    min-width: 120px;
    animation: fadeIn .15s;
}
.ctx-menu button {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 18px;
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    color: #333;
}
.ctx-menu button:hover {
    background: #f0f0f0;
}
.ctx-menu button.ctx-del {
    color: #e00;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}


@media (max-width: 700px) {
    .main-layout { flex-direction: row; height: auto; }
    .top-header-inner { padding: 6px 10px; }
    .top-logo { font-size: 16px; }
    .top-nav ul { gap: 6px; }
    .top-nav a { font-size: 12px; padding: 2px 6px; }
    .sidebar { width: 54px; min-width: 54px; }
    /* .sidebar .logo { margin: 0 0 10px 0; width: 24px; height: 24px; font-size: 12px; } */
    .sidebar .nav-item { font-size: 10px; padding: 8px 0 2px 0; }
    .content { padding-top: 20px; }
    .search-bar {
        max-width: calc(98vw - 54px);
        width: 80%;
    }
    .search-bar textarea {
        font-size: 14px;
        padding: 12px 0;
        min-height: 40px;
    }
    .site-list {
        max-width: calc(100vw - 70px);
        gap: 6px;
    }
    .site-card {
        min-width: 48px;
        min-height: 24px;
        max-height: 60px;
        border-radius: 8px;
        padding: 6px 3px;
    }
    .site-card img.icon-bg { width: 28px; height: 28px; }
    .site-card .site-name { font-size: 12px; line-height: 1.1; }
    .content-extra {
        margin-top: 10px;
        border-radius: 10px;
        padding: 10px 10px 8px 10px;
    }
}

/* PC端搜索框宽度优化 */
@media (min-width: 701px) {
    .search-bar {
        max-width: 600px;
        width: 80%;
    }
}
