:root {
    --bg: #09090b;
    --surface: rgba(24, 24, 27, 0.75);
    --border: #27272a;
    --fg: #fafafa;
    --fg-muted: #71717a;
    --green-1: #0e4429;
    --green-2: #006d32;
    --green-3: #26a641;
    --green-4: #39d353;
    --card-size: 176px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0.5; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #3f3f46 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text { height: 0.6rem; margin-bottom: 0.25rem; }
.skeleton-text:last-child { width: 60%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-bar { height: 6px; border-radius: 3px; margin-bottom: 0.5rem; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
    min-height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    gap: 2rem;
    align-items: center;
}

.sidebar-left { justify-self: end; display: grid; grid-template-columns: repeat(2, 176px); gap: 0.5rem; align-items: start; }
.sidebar-right { justify-self: start; display: grid; grid-template-columns: repeat(2, 176px); grid-template-rows: auto auto; gap: 0.5rem; align-items: start; }
.center { text-align: center; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeLeft { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeRight { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

.avatar, h1, .bio, .timezone, .uptime-badge, .links a, .footer { opacity: 0; animation: fadeUp 0.5s ease forwards; }
.sidebar-left { opacity: 0; animation: fadeLeft 0.5s ease forwards; animation-delay: 0.3s; }
.sidebar-right { opacity: 0; animation: fadeRight 0.5s ease forwards; animation-delay: 0.3s; }

.avatar { animation-delay: 0s; }
h1 { animation-delay: 0.08s; }
.bio { animation-delay: 0.16s; }
.timezone { animation-delay: 0.24s; }
.uptime-badge { animation-delay: 0.28s; }
.links a:nth-child(1) { animation-delay: 0.32s; }
.links a:nth-child(2) { animation-delay: 0.40s; }
.links a:nth-child(3) { animation-delay: 0.48s; }
.links a:nth-child(4) { animation-delay: 0.56s; }
.links a:nth-child(5) { animation-delay: 0.64s; }
.footer { animation-delay: 0.72s; }

.avatar { width: 88px; height: 88px; border-radius: 50%; margin-bottom: 1.25rem; transition: opacity 0.2s ease; }
.avatar:hover { opacity: 0.8; }

h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.375rem; }
.bio { color: var(--fg-muted); font-size: 0.875rem; margin-bottom: 0.5rem; font-weight: 400; }
.bio .cursor { color: var(--fg-muted); animation: blink 1s step-end infinite; margin-left: 1px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.timezone { color: var(--fg-muted); font-size: 0.75rem; margin-bottom: 0.75rem; font-weight: 400; font-variant-numeric: tabular-nums; }

.uptime-badge { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; font-size: 0.65rem; color: var(--fg-muted); margin-bottom: 2rem; transition: border-color 0.2s; cursor: default; }
.uptime-badge:hover { border-color: #3f3f46; }
.uptime-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-muted); transition: background 0.3s; }
.uptime-badge.operational .uptime-dot { background: #22c55e; animation: pulse 2s ease-in-out infinite; }
.uptime-badge.degraded .uptime-dot { background: #eab308; animation: pulse 2s ease-in-out infinite; }
.uptime-badge.down .uptime-dot { background: #ef4444; }

.links { display: flex; flex-direction: column; gap: 0.5rem; }
.links a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; color: var(--fg); text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: background 0.15s ease, border-color 0.15s ease; }
.links a:hover { background: var(--border); border-color: #3f3f46; }
.links svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.links span { flex: 1; text-align: left; }
.links .arrow { opacity: 0.4; transition: transform 0.15s ease, opacity 0.15s ease; }
.links a:hover .arrow { transform: translateX(2px); opacity: 0.7; }

.github { grid-column: span 2; height: var(--card-size); padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; overflow: hidden; }
.github:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.github-graph { display: flex; gap: 2px; margin-bottom: 0.5rem; justify-content: flex-start; }
.github-graph .week { display: flex; flex-direction: column; gap: 2px; }
.github-graph .day { width: 10px; height: 10px; background: var(--border); border-radius: 2px; transition: transform 0.15s ease; }
.github-graph .day:hover { transform: scale(1.2); }
.github-graph .day.level-1 { background: var(--green-1); }
.github-graph .day.level-2 { background: var(--green-2); }
.github-graph .day.level-3 { background: var(--green-3); }
.github-graph .day.level-4 { background: var(--green-4); }

.github .gh-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; text-align: center; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.github .gh-stat-value { display: block; font-size: 0.85rem; font-weight: 600; color: var(--fg); }
.github .gh-stat-label { font-size: 0.5rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.lang-activity { padding: 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; gap: 0.5rem; height: var(--card-size); overflow: hidden; }
.lang-activity:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.languages { }
.languages-title { font-size: 0.6rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.25rem; }
.languages-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; margin-bottom: 0.25rem; }
.languages-bar span { height: 100%; }
.languages-list { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.languages-list .lang { display: flex; align-items: center; gap: 0.2rem; font-size: 0.55rem; color: var(--fg-muted); }
.languages-list .lang-dot { width: 5px; height: 5px; border-radius: 50%; }
.languages-list .lang-percent { opacity: 0.7; }

.pinned { padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; height: var(--card-size); overflow: hidden; }
.pinned:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.pinned-title { font-size: 0.7rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.5rem; }
.pinned-list { display: flex; flex-direction: column; gap: 0.375rem; }
.pinned-repo { display: block; padding: 0.5rem 0.625rem; background: var(--bg); border: 1px solid var(--border); border-radius: 0.375rem; text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.pinned-repo:hover { border-color: #3f3f46; transform: translateY(-1px); }
.pinned-repo-name { display: flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 500; color: var(--fg); margin-bottom: 0.125rem; }
.pinned-repo-name svg { width: 12px; height: 12px; opacity: 0.5; }
.pinned-repo-desc { font-size: 0.6rem; color: var(--fg-muted); line-height: 1.3; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pinned-repo-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.55rem; color: var(--fg-muted); }
.pinned-repo-meta span { display: flex; align-items: center; gap: 0.1875rem; }
.pinned-repo-meta svg { width: 10px; height: 10px; }
.pinned-repo-lang { width: 6px; height: 6px; border-radius: 50%; }

.activity { padding-top: 0.5rem; border-top: 1px solid var(--border); }
.activity-title { font-size: 0.6rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.25rem; }
.activity-list { display: flex; flex-direction: column; gap: 0.2rem; }
.activity-item { display: flex; align-items: flex-start; gap: 0.25rem; font-size: 0.5rem; color: var(--fg-muted); line-height: 1.2; }
.activity-icon { width: 10px; height: 10px; flex-shrink: 0; margin-top: 0.05rem; opacity: 0.6; }
.activity-item a { color: var(--fg); text-decoration: none; }
.activity-item a:hover { text-decoration: underline; }
.activity-time { color: var(--fg-muted); opacity: 0.7; }

.servers { padding: 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; height: var(--card-size); overflow: hidden; display: flex; flex-direction: column; }
.servers:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.servers-title { font-size: 0.7rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.5rem; }
.servers-list { display: flex; flex-direction: column; gap: 0.375rem; }
.server { font-size: 0.6rem; padding: 0.375rem; background: var(--bg); border-radius: 0.25rem; }
.server-main { display: flex; align-items: center; gap: 0.375rem; }
.server-status { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse 2s ease-in-out infinite; }
.server.offline .server-status { background: #ef4444; animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.server-name { color: var(--fg); font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-uptime { color: var(--fg-muted); font-size: 0.55rem; flex-shrink: 0; }
.server-stats { display: flex; flex-wrap: wrap; gap: 0.25rem 0.375rem; margin-top: 0.25rem; padding-left: 0.625rem; font-size: 0.55rem; color: var(--fg-muted); }
.servers-footer { margin-top: 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.55rem; color: var(--fg-muted); }

.footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 0.25rem; font-size: 0.75rem; color: var(--fg-muted); letter-spacing: 0.02em; }
.pod-info { display: inline-flex; align-items: center; gap: 0.25rem; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.7rem; color: #326ce5; cursor: help; transition: color 0.2s; }
.pod-info:hover { color: #528bff; }
.pod-icon { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }
.commit-link { color: var(--fg-muted); text-decoration: none; transition: color 0.2s; }
.commit-link:hover { color: var(--fg); }

.steam { padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; min-height: var(--card-size); }
.steam:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.steam-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.steam-avatar { width: 32px; height: 32px; border-radius: 4px; background: var(--border); flex-shrink: 0; }
.steam-status { display: flex; flex-direction: column; min-width: 0; }
.steam-name { font-size: 0.75rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steam-state { font-size: 0.6rem; color: var(--fg-muted); }
.steam-state.online { color: #57cbde; }
.steam-state.in-game { color: #90ba3c; }

.steam-playing { padding: 0.5rem; background: linear-gradient(135deg, rgba(26,71,42,0.9) 0%, rgba(42,98,61,0.9) 100%); background-size: cover; background-position: center; border-radius: 0.375rem; margin-bottom: 0.5rem; display: none; }
.steam-playing.active { display: flex; flex-direction: column; justify-content: center; }
.steam-playing-label { font-size: 0.5rem; color: #90ba3c; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.125rem; }
.steam-playing-game { font-size: 0.65rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.steam-recent-title { font-size: 0.65rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.375rem; }
.steam-games { display: flex; flex-direction: column; gap: 0.375rem; }
.steam-game { display: flex; align-items: center; gap: 0.375rem; }
.steam-game-icon { width: 24px; height: 24px; border-radius: 4px; background: var(--border); flex-shrink: 0; }
.steam-game-info { min-width: 0; flex: 1; }
.steam-game-name { font-size: 0.6rem; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steam-game-time { font-size: 0.55rem; color: var(--fg-muted); }

.steam-footer { margin-top: 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.6rem; color: var(--fg-muted); }

.spotify-footer { margin-top: 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.6rem; color: var(--fg-muted); }
.spotify-footer a { color: var(--fg-muted); text-decoration: none; }
.spotify-footer a:hover { color: var(--fg); }

.spotify { padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; min-height: var(--card-size); }
.spotify:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.spotify-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.spotify-avatar { width: 32px; height: 32px; border-radius: 4px; background: var(--border); flex-shrink: 0; }
.spotify-status { display: flex; flex-direction: column; min-width: 0; }
.spotify-name { font-size: 0.75rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-state { font-size: 0.6rem; color: var(--fg-muted); }
.spotify-state.online { color: #1db954; }
.spotify-state.listening { color: #1db954; }

.spotify-now-playing { display: none; margin-bottom: 0.5rem; }
.spotify-now-playing.active { display: block; }
.spotify-current { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: linear-gradient(135deg, #1a1a1a 0%, #1db954 200%); border-radius: 0.375rem; text-decoration: none; transition: all 0.3s ease; }
.spotify-current:hover { opacity: 0.9; }
.spotify-current.paused { background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 200%); opacity: 0.7; filter: grayscale(30%); }
.spotify-current.paused:hover { opacity: 0.85; }
.spotify-current.paused .spotify-current-label { color: var(--fg-muted); }
.spotify-current-img { width: 48px; height: 48px; border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.spotify-current-info { min-width: 0; flex: 1; }
.spotify-current-label { font-size: 0.5rem; color: #1db954; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.125rem; }
.spotify-current-name { font-size: 0.65rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-current-artist { font-size: 0.55rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-progress { height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px; margin-top: 0.375rem; overflow: hidden; }
.spotify-progress-bar { height: 100%; background: #1db954; border-radius: 2px; transition: width 0.3s linear; }
.spotify-current.paused .spotify-progress-bar { background: var(--fg-muted); }
.spotify-time { display: flex; justify-content: space-between; font-size: 0.45rem; color: var(--fg-muted); margin-top: 0.125rem; }

.spotify-recent-title { font-size: 0.65rem; font-weight: 500; color: var(--fg-muted); margin-bottom: 0.375rem; }
.spotify-list { display: flex; flex-direction: column; gap: 0.375rem; }
.spotify-track { display: flex; align-items: center; gap: 0.375rem; text-decoration: none; transition: opacity 0.15s; }
.spotify-track:hover { opacity: 0.8; }
.spotify-track-img { width: 28px; height: 28px; border-radius: 3px; flex-shrink: 0; object-fit: cover; }
.spotify-track-info { min-width: 0; flex: 1; }
.spotify-track-name { font-size: 0.6rem; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-track-artist { font-size: 0.55rem; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shikimori { padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; height: var(--card-size); overflow: hidden; display: flex; flex-direction: column; }
.shikimori:hover { border-color: #3f3f46; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.shikimori-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.shikimori-avatar { width: 32px; height: 32px; border-radius: 4px; background: var(--border); flex-shrink: 0; }
.shikimori-info { display: flex; flex-direction: column; min-width: 0; }
.shikimori-name { font-size: 0.75rem; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shikimori-stats { font-size: 0.6rem; color: #ff69b4; }

.shikimori-list { display: flex; flex-direction: column; gap: 0.375rem; }
.shikimori-anime { display: flex; align-items: center; gap: 0.375rem; text-decoration: none; transition: opacity 0.15s; }
.shikimori-anime:hover { opacity: 0.8; }
.shikimori-anime-img { width: 28px; height: 40px; border-radius: 3px; background: var(--border); flex-shrink: 0; object-fit: cover; }
.shikimori-anime-info { min-width: 0; flex: 1; }
.shikimori-anime-name { font-size: 0.6rem; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.shikimori-anime-eps { font-size: 0.55rem; color: var(--fg-muted); }

.shikimori-footer { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.6rem; color: var(--fg-muted); }

.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, rgba(9, 9, 11, 0.8) 0%, rgba(9, 9, 11, 0.95) 100%); }
@media (prefers-reduced-motion: reduce) { .bg-video { visibility: hidden; } }

.splash { position: fixed; inset: 0; z-index: 200; width: 100%; display: flex; align-items: center; justify-content: center; background: rgba(9, 9, 11, 0.3); border: 0; color: var(--fg); font: inherit; font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; cursor: pointer; transition: opacity 0.6s ease, visibility 0.6s; }
.splash span { animation: pulse 2s ease-in-out infinite; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash:not(.gone) ~ *, .splash:not(.gone) ~ * * { animation-play-state: paused; }

.sound-btn { display: inline-flex; margin-left: 0.25rem; padding: 0; background: none; border: 0; color: var(--fg-muted); cursor: pointer; transition: color 0.2s; }
.sound-btn:hover, .sound-btn[aria-pressed="true"] { color: var(--fg); }
.sound-btn svg { width: 0.85rem; height: 0.85rem; }
.sound-btn .sound-on, .sound-btn[aria-pressed="true"] .sound-off { display: none; }
.sound-btn[aria-pressed="true"] .sound-on { display: inline; }

.corner-info { position: fixed; font-size: 0.65rem; color: var(--fg-muted); font-family: 'SF Mono', 'Fira Code', monospace; font-variant-numeric: tabular-nums; opacity: 0; animation: fadeIn 0.5s ease forwards; animation-delay: 0.8s; z-index: 100; }
.corner-time { top: 1rem; left: 1rem; }
.corner-ping { top: 1rem; right: 1rem; }
.corner-resolution { bottom: 1rem; left: 1rem; }
.corner-load { bottom: 1rem; right: 1rem; }

@media (max-width: 1000px) {
    .layout { grid-template-columns: 1fr; max-width: 360px; gap: 1.5rem; }
    .sidebar-left { justify-self: center; order: 2; grid-template-columns: repeat(2, 176px); }
    .center { order: 1; }
    .sidebar-right { justify-self: center; order: 3; grid-template-columns: repeat(2, 176px); }
    .corner-info { display: none; }
}
