/* ============================================================
   browser.css — 回声搜索：搜索引擎风格
   首页居中 logo + 搜索框；结果页顶栏 + 结果列表；乱码彩蛋
   ============================================================ */

.browser-app {
    width: 100%;
    height: 100%;
    background: #fff;
    color: #202124;
    font-size: 14px;
    overflow-y: auto;
}
.browser-app::-webkit-scrollbar { width: 8px; }
.browser-app::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* ==================== 首页 ==================== */
.browser-home {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 32px;
}
.browser-logo {
    font-size: 56px;
    font-weight: 300;
    letter-spacing: 2px;
}
.logo-text { color: #1b263b; }
.logo-sub { color: #4da6ff; margin-left: 4px; }

.browser-search-box {
    display: flex;
    width: 100%;
    max-width: 520px;
    gap: 10px;
}
.browser-search-box input {
    flex: 1;
    height: 46px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 0 20px;
    font-size: 15px;
    outline: none;
    box-shadow: 0 1px 6px rgba(32,33,36,0.08);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.browser-search-box input:focus {
    border-color: #4da6ff;
    box-shadow: 0 1px 10px rgba(77,166,255,0.2);
}
.browser-search-box button {
    height: 46px;
    padding: 0 26px;
    border: none;
    border-radius: 24px;
    background: #4da6ff;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s;
}
.browser-search-box button:hover { background: #2f8fe6; }

.browser-hint {
    color: #9aa0a6;
    font-size: 13px;
    letter-spacing: 1px;
}

/* 搜索记录 + 热门搜索 */
.browser-history, .browser-hot {
    margin-top: 16px;
    text-align: left;
    width: 100%;
    max-width: 480px;
}
.section-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    display: block;
}
.history-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.history-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: #f8f8f8;
    color: #aaa;
    user-select: none;
}
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag {
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    background: #f1f3f4;
    color: #5f6368;
    cursor: pointer;
    border: 1px solid #e8eaed;
    transition: all 0.15s;
}
.hot-tag:hover { background: #e8f0fe; color: #1a73e8; border-color: #d2e3fc; }

/* 不可点击的搜索结果 */
.result-disabled { opacity: 0.65; cursor: not-allowed; }
.result-disabled .result-title { color: #5f6368; }

/* ==================== 结果页 ==================== */
.browser-results {
    min-height: 100%;
}
.results-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 30px;
    border-bottom: 1px solid #ebebeb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
}
.results-logo {
    font-size: 26px;
    font-weight: 300;
    color: #1b263b;
    flex-shrink: 0;
}
.results-search-box {
    display: flex;
    flex: 1;
    max-width: 560px;
    gap: 8px;
}
.results-search-box input {
    flex: 1;
    height: 40px;
    border: 1px solid #dfe1e5;
    border-radius: 22px;
    padding: 0 18px;
    font-size: 14px;
    outline: none;
}
.results-search-box input:focus { border-color: #4da6ff; }
.results-search-box button {
    height: 40px;
    padding: 0 22px;
    border: none;
    border-radius: 22px;
    background: #4da6ff;
    color: #fff;
    cursor: pointer;
}

.results-body {
    padding: 20px 30px 40px;
    max-width: 680px;
}
.result-stats {
    color: #70757a;
    font-size: 13px;
    margin-bottom: 18px;
}

.result-item {
    margin-bottom: 26px;
    animation: resultFade 0.35s ease;
}
@keyframes resultFade {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.result-title {
    font-size: 19px;
    color: #1a0dab;
    margin-bottom: 3px;
    line-height: 1.4;
}
.result-url {
    font-size: 13px;
    color: #006621;
    margin-bottom: 4px;
}
.result-desc {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.6;
}
.result-clickable {
    cursor: pointer;
    padding: 12px;
    margin: -12px -12px 14px;
    border-radius: 8px;
    transition: background 0.15s;
}
.result-clickable:hover {
    background: #f5f9ff;
    box-shadow: 0 1px 6px rgba(77,166,255,0.15);
}
.result-clickable .result-title { text-decoration: underline; }

/* 乱码彩蛋结果 */
.result-glitch {
    background: #0a0a0a;
    color: #ff3344;
    padding: 14px 16px;
    border-radius: 6px;
    font-family: var(--font-mono);
    border-left: 3px solid #ff3344;
    animation: resultGlitch 1.5s steps(3) infinite;
}
.result-glitch .result-title { color: #ff5566; text-decoration: none; }
.result-glitch .result-url { color: #883333; }
.result-glitch .result-desc { color: #cc4455; letter-spacing: 1px; }
@keyframes resultGlitch {
    0%, 88%, 100% { transform: none; opacity: 1; }
    90% { transform: translateX(2px); opacity: 0.7; }
    92% { transform: translateX(-2px); }
    94% { transform: translateX(1px); opacity: 0.9; }
}

/* ============================================================
   移动端适配（html.mobile）：全屏窗口内容触控放大
   ============================================================ */
html.mobile .browser-home { padding: 24px 18px; gap: 24px; }
html.mobile .browser-logo { font-size: 42px; }
html.mobile .browser-search-box input { height: 48px; font-size: 16px; }
html.mobile .browser-search-box button { height: 48px; padding: 0 24px; font-size: 16px; }
html.mobile .results-header { padding: 14px 18px; gap: 14px; }
html.mobile .results-search-box input { height: 44px; font-size: 15px; }
html.mobile .results-search-box button { height: 44px; }
html.mobile .results-body { padding: 18px 18px 40px; max-width: none; }
html.mobile .result-title { font-size: 20px; }
html.mobile .result-desc { font-size: 15px; }
html.mobile .result-clickable { padding: 14px; margin: -14px -14px 14px; }

/* 触摸设备中和 hover 残留态 */
@media (hover: none) {
    .result-clickable:hover { background: transparent; box-shadow: none; }
    .browser-search-box button:hover { background: #4da6ff; }
}
