:root {
    --card-r: 12px;
    --card-pad: 12px;
    --card-bg: rgba(0, 0, 0, 0.6);
    --text-main: #fff;
    --muted: rgba(255, 255, 255, 0.82);
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", Segoe, Tahoma, Arial, Verdana, sans-serif;
    background: #000;
    color: var(--text-main);
    overflow: hidden;
}

/* 页面 Google 搜索框：默认距顶部 220px，窗口不足时自动压缩 */
.search-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(0px, calc((100vh - 50px) / 2), 220px);
    z-index: 1;
    pointer-events: none;
}

.search-box {
    pointer-events: auto;
    display: flex;
    align-items: center;
    width: min(580px, 90vw);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.search-box .search-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.search-box input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 16px;
    color: #222;
    margin-left: 12px;
    padding: 4px 0;
}

.search-box input[type="text"]::placeholder {
    color: #888;
}

.bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
    opacity: 0;
}

.bg.show {
    opacity: 1;
}

/* 控制区域：右下角 */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    z-index: 10;
}

/* card-container 包含 brief-card 和按钮，正常流布局 */
.card-container {
    display: flex;
    align-items: stretch;
    gap: 8px;
    position: relative;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    padding: var(--card-pad);
    border-radius: var(--card-r);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    color: var(--text-main);
}

.brief-card {
    display: flex;
    text-align: right;
    white-space: nowrap;
    font-size: 14px;
    max-width: 50vw;
    align-items: center;
    cursor: pointer;
}

/* detail-card：绝对定位浮在 card-container 上方 */
.detail-card {
    display: flex;
    flex-direction: column;
    width: 360px;
    max-width: 90vw;
    cursor: pointer;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.detail-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.detail-card .meta {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
}

.detail-card .hr {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

/* 鼠标悬停在 controls 区域时，显示 detail-card */
.controls:hover .detail-card {
    opacity: 1;
    pointer-events: auto;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: var(--card-r);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    font-size: 16px;
    line-height: 1;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.8);
}

.nav-btn:disabled {
    background: rgba(0, 0, 0, 0.85);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}
