@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface-hover: #f7f8f9;
    --border: #e4e6eb;
    --text: #2c3e50;
    --text-secondary: #65676b;
    --text-tertiary: #8a8d91;
    --accent: #602ff7;
    --accent-hover: #5526d9;
    --upvote: #602ff7;
    --downvote: #7193ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
}

/* Header */
.header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    position: relative;
}

.logo::after {
    content: 'StoryVerse Home';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 6px 12px;
    background: var(--text);
    color: var(--surface);
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    border: none;
}

.logo::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid var(--text);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.logo:hover::after,
.logo:hover::before {
    opacity: 1;
}

.logo-letter {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    padding: 4px;
    background: #602ff7;
}

.header-center {
    flex: 1;
    max-width: 720px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 48px;
    padding: 0 24px 0 48px;
    border: none;
    border-radius: 50px;
    background: var(--bg);
    font-size: 16px;
    outline: none;
}

.search-box input:focus {
    background: var(--surface-hover);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 40px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-text:hover {
    background: var(--bg);
    border-color: var(--text-secondary);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 22px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: white;
    stroke: white;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text);
}

.icon-btn:hover {
    background: var(--border);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 14px;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 24px;
}

/* Container */
.container {
    max-width: 1920px !important;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

/* Main Feed */
.main-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Create Post Card */
.create-post-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.create-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.username {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

#postTitle {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
}

#postTitle:focus {
    outline: none;
    background: var(--surface-hover);
}

#postTags {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    font-size: 14px;
    font-family: inherit;
}

#postTags:focus {
    outline: none;
    background: var(--surface-hover);
}

#postContent {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}

#postContent:focus {
    outline: none;
    background: var(--surface-hover);
}

.terms-section {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
}

.terms-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-link {
    color: var(--accent);
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.preview-toggle {
    display: flex;
    justify-content: center;
}

.post-preview {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
}

.preview-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.preview-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.preview-meta {
    flex: 1;
}

.preview-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.preview-timestamp {
    font-size: 13px;
    color: var(--text-secondary);
}

.preview-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.preview-content {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 12px;
    word-break: break-word;
    white-space: pre-wrap;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-tag {
    padding: 4px 12px;
    background: #e8dfff;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.create-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 40px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-text:hover {
    background: var(--bg);
    border-color: var(--text-secondary);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 22px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: white;
    stroke: white;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Post Card */
.post {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

.post-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.post-author:hover {
    text-decoration: underline;
    cursor: pointer;
}

.post-timestamp {
    font-size: 13px;
    color: var(--text-secondary);
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-content-wrapper {
    margin-bottom: 12px;
}

.post-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 12px;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
    transition: max-height 0.3s ease;
}

.post-text.collapsed {
    max-height: 200px;
    overflow: hidden;
}

.post-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
}

.dark .post-text.collapsed::after {
    background: linear-gradient(to bottom, transparent, var(--surface));
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.read-more-btn:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.read-more-btn:active {
    transform: translateY(0);
}

.read-more-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.read-more-btn.expanded svg {
    transform: rotate(180deg);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    padding: 4px 12px;
    background: #e8dfff;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.post-tag:hover {
    background: #d4c5ff;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.post-actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vote-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg);
    border-radius: 20px;
}

.vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.vote-btn:hover {
    background: var(--surface);
    color: var(--accent);
}

.vote-btn.active-vote {
    color: var(--accent);
}

.vote-btn svg {
    width: 20px;
    height: 20px;
}

.vote-count {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
    min-width: 32px;
    text-align: center;
}

.vote-count.positive {
    color: var(--upvote);
}

.vote-count.negative {
    color: #ff0000;
}

.post-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.post-action:hover {
    background: var(--bg);
}

.post-action svg {
    width: 20px;
    height: 20px;
}

.vote-count {
    font-weight: 700;
    color: var(--text);
}

.vote-count.positive {
    color: var(--upvote);
}

.vote-count.negative {
    color: #ff0000;
}

.post-activity {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-avatars {
    display: flex;
    align-items: center;
}

.activity-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 11px;
    border: 2px solid var(--surface);
    cursor: pointer;
    margin-left: -8px;
}

.activity-avatar:first-child {
    margin-left: 0;
}

.activity-more {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 4px;
}

/* Sidebar */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
    align-self: flex-start;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Sidebar */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px;
    align-self: flex-start;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.sidebar-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.user-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.user-card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--bg);
}

.tag-item.active {
    background: var(--bg);
}

.tag-icon {
    font-size: 18px;
}

.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg);
    border-radius: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

.community-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-row .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.guidelines-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.guidelines-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.guidelines-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 16px;
}

.empty-state {
    background: var(--surface);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Comment Section */
.comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.comments-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.comment-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.comment-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: var(--bg);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.comment-input:focus {
    background: var(--surface-hover);
}

.comment-btn {
    padding: 0 20px;
    height: 40px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.comment-btn:hover {
    background: var(--accent-hover);
}

.comment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment {
    display: flex;
    gap: 8px;
    position: relative;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    position: relative;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Top Authors */
.authors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.author-item:hover {
    background: var(--bg);
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-posts {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Rising Posts */
.rising-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rising-posts-item {
    padding: 8px;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.rising-posts-item:hover {
    background: var(--bg);
}

.rising-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rising-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.rising-post-score {
    color: var(--accent);
    font-weight: 600;
}

/* Dark Mode */
.dark {
    --bg: #18191a;
    --surface: #242526;
    --surface-hover: #3a3b3c;
    --border: #3e4042;
    --text: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-tertiary: #8a8d91;
    --accent: #602ff7;
    --accent-hover: #5526d9;
}

.dark .search-box input {
    background: #3a3b3c;
}

.dark .icon-btn {
    background: #3a3b3c;
}

.dark .icon-btn:hover {
    background: #4e4f50;
}

.dark .post-tag, .dark .preview-tag {
    background: #2a1a5e;
    color: #b8a3ff;
}

.dark .trending-tag {
    background: #2a1a5e;
    color: #b8a3ff;
}

.dark .trending-tag:hover {
    background: #3a2670;
}

.dark .trending-tag.active {
    background: #602ff7;
    color: white;
}

.dark .btn-text {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.dark .btn-text:hover {
    background: var(--surface-hover);
    border-color: var(--text-secondary);
}

/* Filter Bar Container - Full Width */
.filter-bar-container {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 0;
}

.filter-bar {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Feed Sorting */
.feed-sorting {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.sort-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.sort-tab:hover {
    background: var(--bg);
}

.sort-tab.active {
    background: var(--accent);
    color: white;
}

.sort-tab svg {
    width: 18px;
    height: 18px;
}

/* Trending Tags */
.trending-tags {
    display: flex;
    align-items: center;
    margin-left: auto;
    min-width: 0;
}

.trending-tags-list {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.trending-tags-list::-webkit-scrollbar {
    display: none;
}

.trending-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #e8dfff;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}

.trending-tag:hover {
    background: #d4c5ff;
}

.trending-tag.active {
    background: var(--accent);
    color: white;
}

/* Page Layout */
.page-layout {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-footer {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.page-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* Auth Pages */
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.auth-input:focus {
    border-color: var(--accent);
}

.auth-button {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-button:hover {
    background: var(--accent-hover);
}

.auth-footer {
    margin-top: 16px;
    text-align: center;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Not Found Page */
.not-found-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.not-found-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.not-found-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.not-found-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.not-found-button:hover {
    background: var(--accent-hover);
}

/* Share Menu */
.share-menu {
    position: relative;
}

.share-menu-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 10;
    overflow: hidden;
    margin-bottom: 8px;
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.share-menu-item:hover {
    background: var(--bg);
}

.share-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-menu-item.success {
    color: #10b981;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--surface-hover) 50%,
        var(--border) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-post {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-meta {
    flex: 1;
}

.skeleton-author {
    width: 120px;
    height: 14px;
    margin-bottom: 6px;
}

.skeleton-time {
    width: 60px;
    height: 12px;
}

.skeleton-title {
    width: 70%;
    height: 20px;
    margin-bottom: 12px;
}

.skeleton-content {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-content:last-of-type {
    width: 85%;
}

.skeleton-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.skeleton-tag {
    width: 80px;
    height: 24px;
    border-radius: 16px;
}

.skeleton-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.skeleton-action {
    width: 80px;
    height: 32px;
    border-radius: 20px;
}

/* Sidebar Skeleton */
.skeleton-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.skeleton-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skeleton-author-info {
    flex: 1;
}

.skeleton-author-name {
    width: 100px;
    height: 14px;
    margin-bottom: 4px;
}

.skeleton-author-posts {
    width: 60px;
    height: 12px;
}

.skeleton-rising-item {
    padding: 8px;
    margin-bottom: 12px;
}

.skeleton-rising-title {
    width: 100%;
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-rising-meta {
    width: 150px;
    height: 11px;
}

/* Loading Spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

.btn-loading span,
.btn-loading svg {
    visibility: hidden;
}

/* Three Dot Menu */
.post-menu {
    position: relative;
    margin-left: auto;
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.post-menu-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.post-menu-btn svg {
    width: 20px;
    height: 20px;
}

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 10;
    overflow: hidden;
    margin-top: 4px;
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.post-menu-item:hover {
    background: var(--bg);
}

.post-menu-item.delete {
    color: #ef4444;
}

.post-menu-item.delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dark .post-menu-item.delete:hover {
    background: #3a1a1a;
}

.post-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.comment {
    display: flex;
    gap: 8px;
    position: relative;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    position: relative;
}

.comment-menu {
    position: relative;
    margin-left: auto;
}

.comment-menu-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.comment-menu-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.comment-menu-btn svg {
    width: 16px;
    height: 16px;
}

/* Welcome Banner */
.welcome-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--accent) 0%, #6d28d9 100%);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    z-index: 99;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-banner.hidden {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.welcome-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.welcome-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.welcome-text strong {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.welcome-subtitle {
    font-size: 14px;
    opacity: 0.9;
    display: block;
}

.welcome-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.welcome-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.welcome-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Sidebar Footer */
.sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    font-size: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-tertiary);
    user-select: none;
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, #602ff7 0%, #5526d9 100%);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(96, 47, 247, 0.2);
}

.info-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.info-content {
    flex: 1;
}

.info-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.info-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Profile Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--surface);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header-user {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.modal-user-avatar {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.modal-username {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, #5526d9 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.modal-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.modal-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-note {
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
}

.modal-note strong {
    color: var(--text);
    font-weight: 600;
}

/* Close button in modal */
.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Clickable Username */
.clickable-username {
    cursor: pointer;
    transition: color 0.2s;
}

.clickable-username:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Notification System */
.notification-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
    align-items: center;
}

.notification {
    background: var(--accent);
    color: white;
    border-radius: 8px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 500px;
    pointer-events: all;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(96, 47, 247, 0.4);
}

.notification.success {
    background: var(--accent);
}

.notification.error {
    background: #ef4444;
}

.notification.warning {
    background: #f59e0b;
}

.notification.info {
    background: var(--accent);
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification.fade-out {
    animation: fadeOutDown 0.3s ease-out forwards;
}

@keyframes fadeOutDown {
    to {
        opacity: 0;
        transform: translateY(100px);
    }
}

.notification-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.notification-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 0;
}

.notification-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-top: 4px;
}

.notification-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    border: 2px solid var(--surface);
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-panel.hidden {
    display: none;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.notifications-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.mark-all-read {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}

.mark-all-read:hover {
    background: var(--bg);
}

.notifications-list {
    overflow-y: auto;
    max-height: 420px;
    padding: 8px 0;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.no-notifications svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-notifications p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.no-notifications span {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: var(--bg);
}

.notification-item.unread {
    background: var(--bg);
    border-left-color: var(--accent);
}

.notification-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-text .username {
    font-weight: 700;
    color: var(--accent);
}

.notification-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Loading More Posts Indicator */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.load-more-container p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode progress bar */
.dark .progress-bar-fill {
    box-shadow: 0 0 10px rgba(96, 47, 247, 0.7);
}

/* Update Banner */
.update-banner {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #602ff7 0%, #6d28d9 100%);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.update-banner.show {
    top: 0;
}

.update-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.update-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.update-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.update-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.update-text strong {
    font-size: 16px;
    font-weight: 700;
}

.update-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.update-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.update-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.update-later {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.update-later:hover {
    background: rgba(255, 255, 255, 0.3);
}

.update-now {
    background: white;
    color: var(--accent);
}

.update-now:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    border: 2px solid var(--surface);
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-panel.hidden {
    display: none;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.notifications-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.mark-all-read {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}

.mark-all-read:hover {
    background: var(--bg);
}

.notifications-list {
    overflow-y: auto;
    max-height: 420px;
    padding: 8px 0;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.no-notifications svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-notifications p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.no-notifications span {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: var(--bg);
}

.notification-item.unread {
    background: var(--bg);
    border-left-color: var(--accent);
}

.notification-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-text .username {
    font-weight: 700;
    color: var(--accent);
}

.notification-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Loading More Posts Indicator */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.load-more-container p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode progress bar */
.dark .progress-bar-fill {
    box-shadow: 0 0 10px rgba(96, 47, 247, 0.7);
}

/* Update Banner */
.update-banner {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #602ff7 0%, #6d28d9 100%);
    color: white;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transition: top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.update-banner.show {
    top: 0;
}

.update-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.update-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.update-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.update-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.update-text strong {
    font-size: 16px;
    font-weight: 700;
}

.update-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.update-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.update-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.update-later {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.update-later:hover {
    background: rgba(255, 255, 255, 0.3);
}

.update-now {
    background: white;
    color: var(--accent);
}

.update-now:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.post-action.listening {
    color: var(--accent);
    background: rgba(96, 47, 247, 0.1);
}

.post-action.listening svg {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}