:root {
    --bg-body: #f7f9fc;
    --bg-surface: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --accent: #3498db;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.06);
    --radius-lg: 16px;
    --radius-md: 12px;
    --header-height: 60px;
    --footer-height: 50px;
    --search-height: 90px;
    --page-padding: 40px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding: 0 var(--page-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.brand {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.fixed-search-panel {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--search-height);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    padding: 0 var(--page-padding);
}

.search-group {
    background: var(--bg-surface);
    width: 100%;
    max-width: none;
    height: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    padding: 0 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.search-group.loading {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.3);
}

.search-prefix {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-right: 15px;
    user-select: none;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.search-btn {
    background: var(--bg-body);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background: #eef2f5;
}


.results-viewport {
    position: absolute;
    top: calc(var(--header-height) + var(--search-height) + 10px);
    bottom: calc(var(--footer-height) + 10px);
    left: var(--page-padding);
    right: var(--page-padding);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 0;
    scrollbar-width: none;
}

.results-viewport::-webkit-scrollbar {
    display: none;
}

.results-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.record-entry {
    width: 100%;
    display: flex;
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeUp 0.5s ease-out forwards;
}

.record-entry:last-child {
    margin-bottom: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trace-col {
    width: 40px;
    position: relative;
    flex-shrink: 0;
}

.trace-col::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: -30px;
    width: 2px;
    background: #e0e6ed;
    transform: translateX(-50%);
}

.record-entry:last-child .trace-col::before {
    bottom: 0;
    background: #e0e6ed;
}

.trace-col::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    width: 12px;
    height: 12px;
    background: var(--bg-body);
    border: 3px solid var(--accent);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-body);
}

.record-content {
    flex: 1;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    margin-left: 20px;
    transition: transform 0.2s;
}

.record-content:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.record-meta {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 15px;
}

.server-highlight {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.record-body {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

.footer-minimal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
}