* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff; /* 全局默认白色，适应深色背景 */
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    z-index: -1;
}

/* 【修改】导航栏改为深色半透明 */
.navbar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-links a {
    margin-left: 15px;
    text-decoration: none;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links .disabled-toolbox {
    margin-left: 15px;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
    font-size: 14px;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links .logout {
    color: #ff6b6b;
}

.container {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center; /* 核心：所有子元素水平居中 */
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    height: 18px;
    vertical-align: middle;
}

footer a.beian-link {
    display: inline-flex;
    align-items: center;
    height: 18px;
    line-height: 18px;
}

footer a:hover {
    color: #fff;
}

.separator {
    color: rgba(255, 255, 255, 0.4);
}

.beian-icon {
    height: 14px;
    width: auto;
    vertical-align: middle;
}


/* 公共主页样式 */
.pub-wrapper {
    width: 100%;
    /* 【核心修改】占据容器剩余高度，并开启垂直均匀分布 */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.time {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.date {
    font-size: 1.4rem;
    color: rgba(255,255,255,0.85);
    margin-top: 5px;
    text-align: center;
}

.search-box {
    width: 100%;
    max-width: 500px;
    margin: 30px auto;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 15px;
    outline: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #333;
}

/* 【修改】信息框居中 */
.info-card {
    text-align: left;
    margin: 0 auto 20px auto;
    font-size: 14px;
    color: #333; /* 信息框内文字保持深色以保证可读性 */
    background: rgba(255,255,255,0.92);
    padding: 18px 24px;
    border-radius: 12px;
    display: block; /* 改为 block 配合 margin: 0 auto 实现居中 */
    width: fit-content; /* 宽度随内容自适应 */
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    line-height: 1.8;
    backdrop-filter: blur(5px);
}

/* 【修改】名言单行居中 */
.quote {
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 500;
    margin-top: 15px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.9);
    white-space: nowrap; /* 强制单行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超长显示省略号 */
    max-width: 100%;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .time { font-size: 3.5rem; }
    .container { padding: 70px 15px 30px; }
    .quote { font-size: 1rem; }
}

@media (max-width: 480px) {
    .time { font-size: 2.5rem; }
    .nav-content {
        justify-content: center;
        gap: 10px;
    }
    .nav-links a { margin: 0 8px; }
    footer { flex-direction: column; gap: 5px; }
}
