/* 日式极简配色变量 */
:root {
    --bg-body: #F7F7F5;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F0EE;
    --text-primary: #2D2C2B;
    --text-secondary: #787774;
    --text-muted: #A3A19E;
    --border-color: #E9E9E7;
    --border-hover: #D4D4D2;
    --accent-color: #798B75;
    --accent-light: #EBF0EA;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.8s ease;
}

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

/* 顶部状态栏 */
.header { margin-bottom: 50px; }
.status-modules { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.status-card {
    display: flex; align-items: center; gap: 14px; padding: 12px 20px;
    background: var(--bg-card); border-radius: 12px;
    border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
    transition: var(--transition); text-decoration: none; color: inherit;
}
.status-card:hover {
    box-shadow: var(--shadow-md); border-color: var(--border-hover); transform: translateY(-1px);
}
a.status-card.clickable:hover {
    background: var(--bg-hover);
}

.status-icon { display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.status-text { flex: 1; }
.status-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; margin-bottom: 2px; letter-spacing: 0.05em; }
.status-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

#vpn-status.connected .status-icon { color: var(--accent-color); }
#vpn-status.disconnected .status-icon { color: #C67468; }

/* 主标题 */
.main-title { text-align: center; margin-bottom: 40px; }
.main-title h1 { font-family: 'Shippori Mincho', serif; font-size: 3.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; letter-spacing: 0.02em; }
.subtitle { font-family: 'Noto Sans JP', sans-serif; font-size: 1rem; color: var(--text-secondary); font-weight: 400; letter-spacing: 0.2em; }

/* 搜索框 */
.search-container { margin-bottom: 60px; position: relative; z-index: 20; }
.search-box {
    position: relative; max-width: 600px; margin: 0 auto; display: flex;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.search-box:focus-within { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-light); }

.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-box:focus-within .search-icon { color: var(--accent-color); }

#search-input {
    flex: 1; padding: 16px 16px 16px 50px; font-size: 16px; border: none; outline: none;
    background: transparent; color: var(--text-primary); font-family: inherit;
}
#search-input::placeholder { color: var(--text-muted); }

#search-btn {
    background: var(--accent-color); color: white; border: none;
    padding: 0 24px; border-radius: 12px; margin: 6px; cursor: pointer;
    font-size: 14px; font-weight: 500; transition: var(--transition);
}
#search-btn:hover { background: #657562; }

/* 联想下拉 */
.suggestions {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md); max-height: 280px; overflow-y: auto; list-style: none;
}
.suggestions.hidden { display: none; }
.suggestions li { padding: 12px 20px; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--bg-body); display: flex; align-items: center; }
.suggestions li::before { content: "🔍"; font-size: 12px; margin-right: 10px; opacity: 0.5; filter: grayscale(100%); }
.suggestions li:last-child { border-bottom: none; }
.suggestions li:hover { background: var(--bg-hover); }

/* 书签区域 */
.bookmarks-section { display: flex; flex-direction: column; gap: 40px; }
.bookmark-group { display: flex; flex-direction: column; gap: 16px; }
.group-title { font-size: 13px; color: var(--text-secondary); font-weight: 600; padding-left: 8px; border-left: 3px solid var(--border-hover); letter-spacing: 0.05em; }

.bookmark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; }
.bookmark-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
    text-decoration: none; color: var(--text-primary); box-shadow: var(--shadow-sm); transition: var(--transition);
}
.bookmark-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-hover); background: var(--bg-hover); }

.bookmark-icon {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.bookmark-icon img { width: 20px; height: 20px; object-fit: contain; filter: grayscale(20%); transition: var(--transition); }
.bookmark-card:hover .bookmark-icon img { filter: grayscale(0%); transform: scale(1.1); }
.bookmark-card span { font-size: 12px; font-weight: 500; text-align: center; }

@media (max-width: 600px) {
    .container { padding: 40px 16px; }
    .main-title h1 { font-size: 2.8rem; }
    .status-modules { flex-direction: column; }
    .status-card { width: 100%; }
    .bookmark-grid { grid-template-columns: repeat(3, 1fr); }
    #search-btn { padding: 0 16px; }
}