:root {
    --primary: #595aff;
    --bg: #121216;
    --card-bg: #1f232b;
    --text: #ffffff;
    --text-muted: #9ba3af;
    --border: #393f4f;
    --accent: #2b90d9;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
}

/* Global Navigation */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-user {
    margin-right: 15px;
    font-size: 0.9rem;
    color: #666;
}

.nav-user strong {
    color: #333;
}

/* Layout Grid */
.container {
    max-width: 1050px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 20px;
}

/* Profile Header */
.profile-header {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.cover-photo {
    height: 180px;
    background: linear-gradient(45deg, #282c37, #595aff);
}

.profile-info-bar {
    padding: 0 20px 20px 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.avatar-container {
    margin-top: -50px;
    width: 100px;
    height: 100px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 4px solid var(--card-bg);
    background: #282c37;
    object-fit: cover;
    display: block;
}

.avatar-small {
    width: 45px;
    height: 45px;
    border: none;
}

.profile-titles {
    padding: 0 20px 20px;
}

.profile-name {
    margin: 0;
    font-size: 1.4rem;
}

.profile-handle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin badge for the profile name */
.admin-badge {
    background-color: #eb4d4b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 700;
}

/* Admin badge for the navbar */
.admin-badge-nav {
    border: 1px solid #f0932b;
    color: #f0932b;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 10px;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.stats-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Compose Box */
.compose-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.compose-textarea {
    width: 100%;
    background: #121216;
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-size: 1rem;
}

.compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.compose-controls-left {
    display: flex;
    gap: 10px;
}

.visibility-select {
    background: var(--bg);
    color: white;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 120px;
}

/* Multi-Tab Navigation */
.feed-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    background: var(--bg);
    position: sticky;
    top: 60px;
    /* Sits below navbar */
    z-index: 900;
}

.feed-tab {
    padding: 15px 20px;
    cursor: pointer;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.feed-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.feed-tab.active {
    border-bottom: 3px solid var(--primary);
    color: var(--text);
}

/* Entry Cards */
.entry-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    transition: background-color 0.2s ease;
}

.entry-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Clickable overlay */
.entry-card .main-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.entry-layout {
    display: flex;
    gap: 12px;
}

.entry-body {
    flex: 1;
}

/* Single Entry View */
.single-entry-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
    display: block;
}

/* Ensure images within markdown don't overflow the fixed width */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.single-entry-container .entry-card {
    border-color: var(--primary);
    /* Optional: highlight the card border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}


/* Author Links */
.author-link {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s ease;
    display: inline-block;
    position: relative;
    z-index: 2;
    /* Sits above clickable overlay */
}

.author-link:hover {
    color: var(--primary);
}

.author-link .author-name {
    font-size: 1rem;
    font-weight: 700;
    vertical-align: middle;
}

.author-link:hover .author-name {
    text-decoration: underline;
}

.avatar-link {
    text-decoration: none;
    display: block;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.avatar-link:hover {
    opacity: 0.85;
}

.github-indicator {
    color: var(--accent);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.accent-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.entry-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 25px;
    position: relative;
    z-index: 2;
    /* Sits above clickable overlay */
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color, #eee);
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-outline.disabled,
.btn-primary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.btn-icon:hover {
    color: var(--primary);
}

.visibility-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: #282c37;
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-red-outline {
    background: none;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-red-outline:hover {
    background: rgba(255, 77, 77, 0.12);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Edit Profile */
.edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.photo-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.photo-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: cover;
    background: #ffffff;
    flex: 0 0 auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .feed {
        order: 3;
    }

    .profile-header {
        order: 1;
        margin-bottom: 0;
    }

    .feed-tabs {
        top: 50px;
    }
}
.author-search-page {
    display: block !important;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.author-search-top {
    width: 100%;
    box-sizing: border-box;
    margin: 24px 0 20px 0;
    padding: 20px;
}

.author-search-input-large {
    width: 100%;
    box-sizing: border-box;
    padding: 18px 20px;
    font-size: 1.08rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #121216;
    color: white;
    outline: none;
}

.author-search-input-large::placeholder {
    color: var(--text-muted);
}

.author-count-line {
    margin-top: 14px;
    margin-bottom: 0;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    width: 100%;
}

.author-search-card {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
.author-search-page {
    display: block !important;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.author-search-top {
    width: 100%;
    box-sizing: border-box;
    margin: 24px 0 20px 0;
    padding: 20px;
}

.author-search-input-large {
    width: 100%;
    box-sizing: border-box;
    padding: 18px 20px;
    font-size: 1.08rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #121216;
    color: white;
    outline: none;
}

.author-search-input-large::placeholder {
    color: var(--text-muted);
}

.author-count-line {
    margin-top: 14px;
    margin-bottom: 0;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    width: 100%;
}

.author-search-card {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}