:root {
    --primary: #0066cc;
    --button-primary: #0066cc;
    --primary-dark: #0052a3;
    --secondary: #6c757d;
    --success: #28a745;
    --success-bg: #d4edda;
    --warning: #ffc107;
    --warning-bg: #fff3cd;
    --danger: #dc3545;
    --danger-bg: #f8d7da;
    --bg: #ffffff;
    --fg: #1a1a1a;
    --border-dark: #666;
    --border: #e0e0e0;
    --code-bg: #f5f5f5;
    --hover-bg: #f9f9f9;
    --star: #fbbf24;

    /* Navbar colors - stay consistent in dark mode */
    --navbar-bg: #1a1a1a;
    --navbar-fg: #ffffff;

    /* Button text color */
    --btn-text: #ffffff;

    /* Theme toggle icon */
    --theme-icon: '🌙';

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Metadata badge */
    --metadata-badge-bg: #f0f0f0;
    --metadata-badge-text: var(--fg);

    /* Version badge */
    --version-badge-bg: #f3e5f5;
    --version-badge-text: #7b1fa2;
    --version-badge-border: #ba68c8;

    /* Hero section colors */
    --hero-bg-start: #f8f9fa;
    --hero-bg-end: #e9ecef;

    /* Terminal colors */
    --terminal-bg: var(--fg);
    --terminal-header-bg: #2d2d2d;
    --terminal-text: var(--border);
    --terminal-prompt: #4ec9b0;
    --terminal-comment: #6a9955;
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --button-primary: #1d4ed8;
    --primary-dark: #1e40af;
    --secondary: #9ca3af;
    --success: #34d399;
    --success-bg: #064e3b;
    --warning: #fbbf24;
    --warning-bg: #78350f;
    --danger: #dc3545;
    --danger-bg: #7f1d1d;
    --bg: #2a2a2a;
    --fg: #e0e0e0;
    --border-dark: #9ca3af;
    --border: #404040;
    --code-bg: #1e1e1e;
    --hover-bg: #333333;
    --star: #fbbf24;

    /* Navbar colors - stay consistent (always black) */
    --navbar-bg: #1a1a1a;
    --navbar-fg: #ffffff;

    /* Button text color */
    --btn-text: #ffffff;

    /* Theme toggle icon */
    --theme-icon: '☀️';

    /* Shadows - lighter for dark backgrounds */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5);

    /* Metadata badge - darker in dark mode */
    --metadata-badge-bg: #1e1e1e;
    --metadata-badge-text: #ffffff;

    /* Version badge - swapped colors with softer purple background */
    --version-badge-bg: #9b59b6;
    --version-badge-text: #ffffff;
    --version-badge-border: #ba68c8;

    /* Hero section colors */
    --hero-bg-start: #2d2d2d;
    --hero-bg-end: #1a1a1a;

    /* Terminal colors - keep similar since already dark */
    --terminal-bg: #0d0d0d;
    --terminal-header-bg: #1a1a1a;
    --terminal-text: #d0d0d0;
    --terminal-prompt: #4ec9b0;
    --terminal-comment: #6a9955;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: var(--navbar-bg);
    color: var(--navbar-fg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.nav-brand a {
    color: var(--navbar-fg);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand .at-protocol {
    color: var(--primary);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.nav-search input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: var(--navbar-fg);
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-links a:hover {
    background:var(--secondary);
    border-radius: 4px;
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--navbar-fg);
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background:var(--secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--button-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
}

/* Profile page avatars */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--button-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--btn-text);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-profile h1 {
    font-size: 1.8rem;
    margin: 0;
}

.user-handle {
    color: var(--navbar-fg);
    font-size: 0.95rem;
}

.dropdown-arrow {
    transition: transform 0.2s;
}

.user-menu-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background:var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-menu[hidden] {
    display: none;
}

.dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--fg);
    text-decoration: none;
    border: none;
    background:var(--bg);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.dropdown-menu .dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--border);
}

.dropdown-menu .logout-btn {
    color: var(--danger);
    font-weight: 500;
}

/* Buttons */
button, .btn, .btn-primary, .btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--button-primary);
    color: var(--btn-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

button:hover, .btn:hover, .btn-primary:hover, .btn-secondary:hover {
    opacity: 0.9;
}

/* Override nav-links color for primary button */
.nav-links .btn-primary {
    color: var(--btn-text);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-link {
    background: transparent;
    color: var(--navbar-fg);
    text-decoration: none;
}

.theme-toggle-btn::before {
    content: var(--theme-icon);
    font-size: 1.2rem;
    cursor: pointer;
}

.delete-btn {
    background: var(--danger);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.copy-btn {
    padding: 0.25rem 0.75rem;
    background: var(--button-primary);
    color: var(--btn-text);
    font-size: 0.85rem;
}

/* Cards */
.push-card, .repository-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background:var(--bg);
    box-shadow: var(--shadow-sm);
}

.push-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.push-user {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.push-user:hover {
    text-decoration: underline;
}

.push-separator {
    color: var(--border-dark);
    margin: 0 0.25rem;
}

.push-repo {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.push-repo:hover {
    color: var(--primary);
    text-decoration: underline;
}

.push-tag {
    color: var(--secondary);
}

.push-details {
    color: var(--border-dark);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.digest {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    background: var(--code-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

/* Digest with copy button container */
.digest-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Digest tooltip on hover - using title attribute for native browser tooltip */
.digest {
    cursor: default;
}

/* Digest copy button */
.digest-copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--secondary);
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.digest-copy-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.separator {
    color: var(--border);
}

/* Push card icon and layout */
.push-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.push-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--button-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--btn-text);
    flex-shrink: 0;
}

.push-info {
    flex: 1;
    min-width: 0;
}

.push-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.push-title {
    font-size: 1.1rem;
    flex: 1;
}

.push-description {
    color: var(--border-dark);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0.25rem 0 0 0;
}

/* Push stats */
.push-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.push-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--border-dark);
    font-size: 0.9rem;
}

.push-stat .star-icon {
    color: var(--star);
    font-size: 1rem;
}

.push-stat .pull-icon {
    color: var(--primary);
    font-size: 1rem;
}

.push-stat .stat-count {
    font-weight: 600;
    color: var(--fg);
}

/* Repository Cards */
.repo-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--hover-bg);
    border-radius: 8px 8px 0 0;
    margin: -1rem -1rem 0 -1rem;
}

.repo-header:hover {
    background: var(--hover-bg);
}

.repo-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.repo-info {
    flex: 1;
    min-width: 0;
}

.repo-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.repo-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.repo-title-link {
    color: var(--fg);
    text-decoration: none;
}

.repo-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.repo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    white-space: nowrap;
}

.license-badge {
    background: var(--code-bg);
    color: var(--primary);
    border: 1px solid #90caf9;
}

/* Clickable license badges */
a.license-badge {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

a.license-badge:hover {
    background: var(--button-primary);
    color: var(--btn-text);
    border-color: var(--button-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.version-badge {
    background: var(--version-badge-bg);
    color: var(--version-badge-text);
    border: 1px solid var(--version-badge-border);
}

.repo-description {
    color: var(--border-dark);
    font-size: 0.95rem;
    margin: 0.25rem 0 0.5rem 0;
    line-height: 1.4;
}

.repo-stats {
    color:var(--border-dark);
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.repo-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.repo-link:hover {
    text-decoration: underline;
}

.expand-btn {
    background: transparent;
    color: var(--fg);
    padding: 0.25rem 0.5rem;
    font-size: 1.2rem;
}

.repo-details {
    padding-top: 1rem;
}

.tags-section, .manifests-section {
    margin-bottom: 1.5rem;
}

.tags-section h3, .manifests-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.tag-row, .manifest-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.tag-row:last-child, .manifest-row:last-child {
    border-bottom: none;
}

.tag-name {
    font-weight: 500;
    min-width: 100px;
}

.tag-arrow {
    color: var(--border-dark);
}

/* Note: .tag-digest and .manifest-digest styling now handled by .digest class above */

/* Settings Page */
.settings-page {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background:var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.settings-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--border-dark);
    font-size: 0.85rem;
}

.info-row {
    margin-bottom: 0.75rem;
}

.info-row strong {
    display: inline-block;
    min-width: 150px;
    color: var(--secondary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.modal-close:hover {
    color: var(--fg);
}

.manifest-json {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--border-dark);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--hover-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--secondary);
}

.empty-state pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    display: inline-block;
}

.empty-message {
    color: var(--border-dark);
    font-style: italic;
    padding: 1rem;
}

/* Status Messages / Callouts */
.note {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    margin: 1rem 0;
}

.success {
    background: var(--success-bg);
    border-left: 4px solid var(--success);
    padding: 1rem;
    margin: 1rem 0;
}

.error {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    margin: 1rem 0;
}

/* Load More Button */
.load-more {
    width: 100%;
    margin-top: 1rem;
    background: var(--secondary);
}

/* Login Page */
.login-page {
    max-width: 450px;
    margin: 4rem auto;
    padding: 2rem;
}

.login-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-page > p {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.login-form {
    background:var(--bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-form input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.login-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-large {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.login-help {
    text-align: center;
    margin-top: 2rem;
    color: var(--secondary);
}

.login-help a {
    color: var(--primary);
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

/* Repository Page */
.repository-page {
    /* Let container's max-width (1200px) control page width */
    margin: 0 auto;
}

.repository-header {
    background:var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.repo-hero {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.repo-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.repo-hero-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--button-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--btn-text);
    flex-shrink: 0;
}

.repo-hero-info {
    flex: 1;
}

.repo-hero-info h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.owner-link {
    color: var(--primary);
    text-decoration: none;
}

.owner-link:hover {
    text-decoration: underline;
}

.repo-separator {
    color: var(--border-dark);
    margin: 0 0.25rem;
}

.repo-name {
    color: var(--fg);
}

.repo-hero-description {
    color: var(--border-dark);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0.5rem 0 0 0;
}

.repo-info-row {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 1.5rem;
}

.repo-actions {
    flex: 0 0 auto;
}

.star-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--fg);
}

.star-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--hover-bg);
}

.star-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.star-btn.starred {
    border-color:var(--star);
    background: var(--code-bg);
}

.star-btn.starred:hover:not(:disabled) {
    background: var(--hover-bg);
}

.star-icon {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease;
    color:var(--star);
}

.star-btn:hover:not(:disabled) .star-icon {
    transform: scale(1.1);
}

.star-count {
    font-weight: 600;
    color: var(--fg);
}

.repo-metadata {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.metadata-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 16px;
    white-space: nowrap;
}

.metadata-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.metadata-link:hover {
    text-decoration: underline;
}

.pull-command-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pull-command-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.repo-section {
    background:var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.repo-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.tags-list, .manifests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tag-item, .manifest-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    background: var(--hover-bg);
}

.tag-item-header, .manifest-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tag-name-large {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fg);
}

.tag-timestamp {
    color: var(--border-dark);
    font-size: 0.9rem;
}

.tag-item-details {
    margin-bottom: 0.75rem;
}

.manifest-item-details {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--border-dark);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Offline manifest badge */
.offline-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Checking manifest badge (health check in progress) */
.checking-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #1976d2;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Hide offline manifests by default */
.manifest-item[data-reachable="false"] {
    display: none;
}

/* Show offline manifests when toggle is checked */
.manifests-list.show-offline .manifest-item[data-reachable="false"] {
    display: block;
    opacity: 0.6;
}

/* Show offline images toggle styling */
.show-offline-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.show-offline-toggle input[type="checkbox"] {
    cursor: pointer;
}

.show-offline-toggle span {
    font-size: 0.9rem;
    color: var(--border-dark);
}

.manifest-detail-label {
    font-weight: 500;
    color: var(--secondary);
}

/* Multi-architecture badges */
.badge-multi {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--button-primary);
    color: var(--btn-text);
    white-space: nowrap;
    margin-left: 0.5rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background: var(--code-bg);
    color: var(--fg);
    border: 1px solid var(--border);
    white-space: nowrap;
    font-family: 'Monaco', 'Courier New', monospace;
}

.platforms-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.manifest-type {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
}

.platform-count {
    color: var(--border-dark);
    font-size: 0.85rem;
    font-style: italic;
}

.text-muted {
    color: var(--border-dark);
    font-style: italic;
}

/* Featured Repositories Section */
.featured-section {
    margin-bottom: 3rem;
}

.featured-section h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.featured-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--bg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.featured-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.featured-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.featured-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.featured-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--button-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--btn-text);
    flex-shrink: 0;
}

.featured-info {
    flex: 1;
    min-width: 0;
}

.featured-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-owner {
    color: var(--primary);
}

.featured-separator {
    color: var(--border-dark);
    margin: 0 0.25rem;
}

.featured-name {
    color: var(--fg);
}

.featured-description {
    color: var(--border-dark);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.featured-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.featured-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--border-dark);
    font-size: 0.95rem;
}

.featured-stat .star-icon {
    color: var(--star);
    font-size: 1.1rem;
}

.featured-stat .pull-icon {
    color: var(--primary);
    font-size: 1.1rem;
}

.featured-stat .stat-count {
    font-weight: 600;
    color: var(--fg);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
    padding: 4rem 2rem;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--fg);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--border-dark);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-terminal {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    background: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.terminal-header {
    background: var(--terminal-header-bg);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-dark);
}

.terminal-dot:nth-child(1) {
    background: #ff5f56;
}

.terminal-dot:nth-child(2) {
    background: #ffbd2e;
}

.terminal-dot:nth-child(3) {
    background: #27c93f;
}

.terminal-content {
    padding: 1.5rem;
    margin: 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--terminal-text);
    overflow-x: auto;
}

.terminal-prompt {
    color: var(--terminal-prompt);
    font-weight: bold;
}

.terminal-comment {
    color: var(--terminal-comment);
    font-style: italic;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn-hero-primary,
.btn-hero-secondary {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-hero-primary {
    background: var(--button-primary);
    color: var(--btn-text);
    border: 2px solid var(--button-primary);
}

.btn-hero-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--button-primary);
}

.btn-hero-secondary:hover {
    background: var(--button-primary);
    color: var(--btn-text);
    transform: translateY(-2px);
}

.hero-benefits {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.benefit-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.benefit-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--fg);
}

.benefit-card p {
    color: var(--border-dark);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Install Page */
.install-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.install-section {
    margin: 2rem 0;
}

.install-section h2 {
    margin-bottom: 1rem;
    color: var(--fg);
}

.install-section h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--border-dark);
    font-size: 1.1rem;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin: 0.5rem 0 1rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.platform-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}

.platform-tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--border-dark);
    transition: all 0.2s;
}

.platform-tab:hover {
    color: var(--fg);
}

.platform-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-search {
        max-width: 100%;
        margin: 0;
    }

    .push-details {
        flex-wrap: wrap;
    }

    .tag-row, .manifest-row {
        flex-wrap: wrap;
    }

    .login-page {
        margin: 2rem auto;
        padding: 1rem;
    }

    .repo-hero {
        flex-direction: column;
    }

    .repo-hero-info h1 {
        font-size: 1.5rem;
    }

    .tag-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .manifest-item-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .featured-card {
        min-height: auto;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-terminal {
        margin-bottom: 2rem;
    }

    .terminal-content {
        font-size: 0.85rem;
        padding: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        margin-bottom: 3rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }

    .hero-benefits {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-benefits {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* README and Repository Layout */
.repo-content-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 2rem;
    margin-top: 2rem;
}

.readme-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    min-width: 0;
    box-sizing: border-box;
}

.readme-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.readme-content {
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.repo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Markdown Styling */
.markdown-body {
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
}

.markdown-body h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
}

.markdown-body h3 {
    font-size: 1.25rem;
}

.markdown-body h4 {
    font-size: 1rem;
}

.markdown-body h5 {
    font-size: 0.875rem;
}

.markdown-body h6 {
    font-size: 0.85rem;
    color: var(--secondary);
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-body li {
    margin-bottom: 0.25rem;
}

.markdown-body li > p {
    margin-bottom: 0.5rem;
}

.markdown-body a {
    color: var(--primary);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
    max-width: 100%;
    box-sizing: border-box;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

.markdown-body blockquote {
    padding: 0 1rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    border-left: 4px solid var(--border);
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

.markdown-body table th,
.markdown-body table td {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.markdown-body table th {
    background: var(--code-bg);
    font-weight: 600;
}

.markdown-body table tr:nth-child(even) {
    background: var(--hover-bg);
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.markdown-body hr {
    height: 0.25rem;
    margin: 1.5rem 0;
    background: var(--border);
    border: 0;
}

/* Task lists */
.markdown-body input[type="checkbox"] {
    margin-right: 0.5rem;
}

.markdown-body .task-list-item {
    list-style-type: none;
}

.markdown-body .task-list-item input {
    margin: 0 0.2rem 0.25rem -1.6rem;
    vertical-align: middle;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .repo-content-layout {
        grid-template-columns: 1fr;
    }

    .repo-sidebar {
        order: -1; /* Show sidebar first on mobile */
    }
}

@media (max-width: 768px) {
    .readme-section {
        padding: 1rem;
    }

    .markdown-body h1 {
        font-size: 1.5rem;
    }

    .markdown-body h2 {
        font-size: 1.25rem;
    }

    .markdown-body pre {
        padding: 0.75rem;
    }
}
