/* === 工具箱样式 === */
@font-face { font-family: "NavXingShu"; src: url("/fonts/HongLeiXingShuJianTi-2.otf") format("opentype"); font-display: swap; }

:root {
    --bg: #000;
    --card: #121212;
    --border: #222;
    --text: #fff;
    --sub: #666;
    --accent: #fff;
    --font-cn: "NavXingShu", 'Noto Sans SC';
    --font-en: 'Inter';
    --font-mono: 'JetBrains Mono', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: var(--bg); color: var(--text);
    font-family: var(--font-en), var(--font-cn), sans-serif;
    font-weight: 300; -webkit-font-smoothing: antialiased;
    min-height: 100vh; padding: 40px 20px 60px;
}

/* 顶部导航 */
.top-bar {
    max-width: 800px; margin: 0 auto 40px;
    display: flex; justify-content: space-between; align-items: center;
}
.top-bar a {
    color: var(--sub); text-decoration: none; font-size: 13px;
    letter-spacing: 2px; transition: color 0.3s;
}
.top-bar a:hover { color: var(--text); }
.top-bar h1 {
    font-size: 14px; font-weight: 400; letter-spacing: 4px;
    opacity: 0.5;
}

/* 工具卡片 */
.tool-card {
    max-width: 800px; margin: 0 auto 30px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px; transition: border-color 0.3s;
}
.tool-card:hover { border-color: #444; }
.tool-title {
    font-size: 12px; font-weight: 500; letter-spacing: 3px;
    text-transform: uppercase; opacity: 0.35; margin-bottom: 20px;
}

/* 通用输入 */
input, select, button {
    font-family: var(--font-en), var(--font-cn), sans-serif;
    font-weight: 400; outline: none;
}
select, select option { background: #000; color: #fff; }
select optgroup { background: #000; color: #888; }
.input-box {
    width: 100%; padding: 12px 16px; background: #0a0a0a;
    border: 1px solid var(--border); color: var(--text);
    border-radius: 10px; font-size: 15px; transition: border-color 0.3s;
}
.input-box:focus { border-color: #555; }
.btn {
    padding: 10px 24px; background: var(--text); color: var(--bg);
    border: none; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 500; transition: opacity 0.3s;
}
.btn:hover { opacity: 0.8; }
.btn-ghost {
    padding: 10px 24px; background: transparent; color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
    font-size: 14px; transition: all 0.3s;
}
.btn-ghost:hover { border-color: #555; background: #1a1a1a; }

/* ---- 谷歌搜索 ---- */
.search-row { display: flex; gap: 10px; }
.search-row .input-box { flex: 1; }

/* ---- 图片识别 ---- */
.img-drop {
    border: 2px dashed #333; border-radius: 12px;
    padding: 40px 20px; text-align: center; cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    position: relative; min-height: 120px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.img-drop:hover, .img-drop.dragover { border-color: #666; background: rgba(255,255,255,0.02); }
.img-drop p { opacity: 0.3; font-size: 14px; pointer-events: none; }
.img-drop img {
    max-width: 100%; max-height: 300px; border-radius: 8px;
    display: none; margin-bottom: 12px;
}
.img-actions { display: none; gap: 10px; margin-top: 16px; justify-content: center; }
.img-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; }
.img-msg {
    text-align: center; font-size: 13px; margin-top: 12px;
    min-height: 20px; transition: color 0.3s;
}
.img-msg.success { color: #4caf50; }
.img-msg.success strong { color: #fff; font-weight: 600; }
.img-msg.error { color: #ef5350; }

/* 图片识别结果 */
.img-results { margin-top: 16px; }
.img-analysis {
    background: #0a0a0a; border: 1px solid var(--border);
    border-radius: 12px; padding: 20px 24px;
    font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.85);
}
.img-analysis strong {
    color: #fff; font-weight: 600;
}

/* ---- 工具链接卡片 ---- */
.tool-link {
    display: block; text-decoration: none; color: var(--text);
    cursor: pointer; transition: border-color 0.3s, background 0.3s;
}
.tool-link:hover { border-color: #555; background: #1a1a1a; }
.tool-link-desc {
    font-size: 13px; color: var(--sub); line-height: 1.6;
}

/* 响应式 */
@media (max-width: 600px) {
    body { padding: 20px 12px 40px; }
    .tool-card { padding: 20px; }
    .search-row { flex-direction: column; }
}
