:root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, 0.9);
    --text: #0f1929;
    --muted: #5c6c85;
    --accent: #4c7dff;
    --accent-2: #54d6bb;
    --border: rgba(15, 25, 41, 0.08);
    --shadow: 0 16px 40px rgba(15, 25, 41, 0.12);
    --frame-pad: 32px;
}
.theme-dark {
    --bg: #0f1c2e;
    --panel: rgba(18, 31, 50, 0.88);
    --text: #e9f1ff;
    --muted: #9fb4d3;
    --accent: #4c7dff;
    --accent-2: #54d6bb;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', 'Space Grotesk', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, rgba(76, 125, 255, 0.12), transparent 40%),
                radial-gradient(circle at 80% 10%, rgba(84, 214, 187, 0.14), transparent 35%),
                radial-gradient(circle at 70% 80%, rgba(76, 125, 255, 0.08), transparent 45%),
                var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 18px 64px;
}
.frame {
    width: min(1100px, 100%);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(12px);
    position: relative;
}
header {
    padding: 56px var(--frame-pad) 36px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-start;
    gap: 12px 18px;
}
.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Space Grotesk', 'DM Sans', sans-serif;
}
.brand h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.tagline {
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.5;
}
.theme-toggle {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 25, 41, 0.04);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 25, 41, 0.14);
}
.theme-dark .theme-toggle {
    background: rgba(255, 255, 255, 0.03);
}
.theme-dark .theme-toggle:hover {
    border-color: rgba(76, 125, 255, 0.5);
}
.theme-toggle-fab {
    box-shadow: 0 10px 24px rgba(15, 25, 41, 0.12);
}
.theme-dark .theme-toggle-fab {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.back-link:hover {
    text-decoration: underline;
}
.theme-dark .back-link {
    color: #9eb6ff;
}
.content {
    padding: 32px var(--frame-pad) 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.chips {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chip {
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}
.panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 18px;
    position: relative;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.panel:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 25, 41, 0.12);
    background: rgba(255, 255, 255, 0.06);
}
.theme-dark .panel {
    background: rgba(255, 255, 255, 0.02);
}
.theme-dark .panel:hover {
    border-color: rgba(76, 125, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
}
.panel h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.panel p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.5;
}
.links-panel {
    grid-column: 1 / -1;
}
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 25, 41, 0.02);
    color: var(--text);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 25, 41, 0.12);
    background: rgba(15, 25, 41, 0.04);
}
.theme-dark .link-card {
    background: rgba(255, 255, 255, 0.03);
}
.theme-dark .link-card:hover {
    border-color: rgba(76, 125, 255, 0.5);
    background: rgba(255, 255, 255, 0.04);
}
.link-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
.link-name {
    letter-spacing: 0.2px;
}
.content.commits-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.commits-panel {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.commits-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.commits-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.commits-title h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    letter-spacing: -0.4px;
}
.error {
    font-size: 0.95rem;
    color: #ff7b7b;
}
.commit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.commit-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 32px rgba(15, 25, 41, 0.12);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.commit-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 25, 41, 0.12);
    background: rgba(255, 255, 255, 0.06);
}
.theme-dark .commit-card {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}
.theme-dark .commit-card:hover {
    border-color: rgba(76, 125, 255, 0.4);
}
.commit-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.subject {
    font-weight: 700;
    font-size: 1.02rem;
    word-break: normal;
    overflow-wrap: anywhere;
    flex: 1;
    min-width: 0;
}
.hash-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: wrap;
}
.hash {
    font-family: 'Space Grotesk', 'DM Sans', monospace;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.theme-dark .hash {
    color: #9eb6ff;
}
.hash:hover {
    text-decoration: underline;
}
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.meta-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.author {
    font-weight: 600;
    color: var(--text);
}
.email {
    color: var(--accent);
    font-family: 'DM Sans', 'Space Grotesk', monospace;
}
.theme-dark .email {
    color: #9eb6ff;
}
.date {
    color: var(--text);
}
.commits-panel .chips {
    margin: 6px 0 4px;
    gap: 8px;
}
.commits-panel .chip {
    padding: 8px 12px;
    font-size: 0.9rem;
}
.chip-primary {
    border-color: rgba(76, 125, 255, 0.7);
    color: var(--text);
    background: rgba(76, 125, 255, 0.14);
}
.chip-commit {
    border-color: rgba(84, 214, 187, 0.8);
    background: rgba(84, 214, 187, 0.12);
    color: var(--text);
}
.copy-btn {
    background: rgba(84, 214, 187, 0.16);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.copy-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(84, 214, 187, 0.7);
    background: rgba(84, 214, 187, 0.24);
}
.body {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    color: var(--text);
}
.body-empty {
    color: var(--muted);
    font-style: italic;
}
.body-toggle {
    margin-top: 4px;
    font-size: 0.9rem;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
}
.theme-dark .body-toggle {
    color: #9eb6ff;
}
.body-toggle:hover {
    text-decoration: underline;
}
.back-link-row {
    margin-top: 6px;
}
.no-commits {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 12px;
}
.skeleton-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
}
.skeleton-line {
    height: 0.85rem;
    background: linear-gradient(90deg, rgba(84, 214, 187, 0.2), rgba(76, 125, 255, 0.18), rgba(84, 214, 187, 0.2));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 999px;
    margin-bottom: 8px;
}
.skeleton-line.short {
    width: 30%;
}
.skeleton-line.medium {
    width: 60%;
}
.skeleton-line.long {
    width: 90%;
}
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
@media (max-width: 640px) {
    :root {
        --frame-pad: 20px;
    }
    body {
        padding: 24px 16px 40px;
    }
    header {
        padding: 24px var(--frame-pad) 18px;
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        align-items: flex-start;
    }
    .content {
        padding: 24px var(--frame-pad) 32px;
    }
    .theme-toggle {
        justify-self: start;
    }
    .commits-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .hash-area {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }
}
@media (min-width: 960px) {
    .links-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
