:root {
    --bg: #000;
    --fg: #fff;
    --muted: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
    --bg: #fff;
    --fg: #000;
    --muted: rgba(0, 0, 0, 0.65);
    --card-border: rgba(0, 0, 0, 0.08);
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

header a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.15s;
}

header a:hover {
    opacity: 1;
}

.wrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 28px;
    padding: 24px;
    padding-top: 48px;
    box-sizing: border-box;
    text-align: center;
}

.site-title {
    margin: 0;
    line-height: 1;
}

.site-title .name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.site-title .subtitle {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 720px;
    align-items: stretch;
    padding: 6px 0;
}

.post {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: transparent;
    text-align: left;
    transition:
        transform 0.12s,
        background 0.12s;
}

.post:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.02);
}

.post .thumb {
    flex: 0 0 96px;
    height: 64px;
    border-radius: 8px;
    background: linear-gradient(135deg, #666, #444);
    display: inline-block;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.post .thumb.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
}

.post .meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.post .title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--fg);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post .date {
    font-size: 0.85rem;
    color: var(--muted);
}


.theme-toggle {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
}

a {
    text-decoration: none;
}

.links .meta .title {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}


@media (max-width: 640px) {
    .post {
        padding: 12px;
        gap: 10px;
    }

    .post .thumb {
        flex: 0 0 72px;
        height: 52px;
    }

    .site-title .name {
        font-size: 1.6rem;
    }

    .links {
        max-width: 420px;
    }
}

@media (max-width: 380px) {
    .post {
        flex-direction: row;
        gap: 10px;
    }

    .post .title {
        font-size: 1rem;
    }

    .post .thumb {
        flex: 0 0 60px;
        height: 44px;
    }
}