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

.main-layout {
    display: flex;
    height: 100vh;
}
.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;
}
.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: center;
    justify-content: flex-start;
    min-width: 0;
}
.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-card {
    min-width: 70px;
    min-height: 40px;
    background: rgba(255,255,255,0.72);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    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 6px 16px rgba(30,144,255,0.18);
    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; }
    .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; }
}

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