:root {
    --primary-bg: rgba(255, 255, 255, 0.12);
    --hover-bg: rgba(255, 255, 255, 0.25);
    --text-color: #fff;
    --accent-color: #ff9a9e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 核心改动：应用霞鹜文楷，如果不生效则回退到系统字体 */
    font-family: 'LXGW WenKai Screen', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-color);
}

/* 背景层设置 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2c3e50;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.7) blur(3px);
    transition: background-image 0.5s ease-in-out;
}

/* 主容器 */
.container {
    width: 90%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    text-align: center;
    animation: fadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 头像 */
.avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    object-fit: cover; 
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.avatar img:hover {
    transform: rotate(360deg) scale(1.1);
}

h1 {
    margin: 15px 0 5px;
    font-size: 2.2em;
    font-weight: 700; /* 霞鹜文楷的粗体很有质感 */
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hitokoto {
    font-size: 1.1em; /* 稍微放大一点诗句 */
    opacity: 0.9;
    margin-bottom: 35px;
    font-weight: 400;
    min-height: 1.2em;
}

/* --- 搜索框区域 --- */
.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 100;
}

.search-engine-selector {
    position: relative;
    height: 48px;
}

.selected-engine {
    width: 50px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
    border-right: 1px solid #eee;
    transition: background 0.3s;
}

.selected-engine:hover {
    background: #fff;
}

.engine-options {
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    width: 150px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.engine-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #444;
    transition: background 0.2s;
    font-size: 0.95rem;
    font-weight: 600;
}

.option i {
    width: 24px;
    margin-right: 8px;
    text-align: center;
}

.option:hover {
    background: #f0f0f0;
    color: var(--accent-color);
}

.search-box input {
    height: 48px;
    padding: 0 16px;
    border-radius: 0;
    border: none;
    outline: none;
    width: 55%;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    color: #333;
    font-weight: 600; /* 输入框字体加粗一点更清晰 */
}

.search-box button {
    height: 48px;
    width: 64px;
    border-radius: 0 24px 24px 0;
    border: none;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.search-box button:hover {
    background: #ff758c;
    width: 74px;
    box-shadow: 0 0 15px rgba(255, 154, 158, 0.5);
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--primary-bg);
    padding: 25px 20px;
    border-radius: 18px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card:hover {
    background: var(--hover-bg);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.4);
}

.card .icon {
    font-size: 2.4em;
    margin-bottom: 12px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 154, 158, 0.3);
}

.card h3 {
    font-size: 1.15em;
    margin-bottom: 6px;
    font-weight: 700;
}

.card p {
    font-size: 0.85em;
    opacity: 0.8;
}

/* 底部区域 */
footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    font-size: 0.85em;
    opacity: 0.9;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

#clock {
    font-size: 2.8em; /* 数码字体适合大一点 */
    font-weight: 400; /* 数码字体通常不需要加粗 */
    margin-bottom: 8px;
    /* 核心改动：应用数码字体 */
    font-family: 'DS-Digital', sans-serif; 
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 30px 20px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 1.8em; }
    .search-box input { width: 45%; }
}