* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #f7f7f7;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

header {
    padding: 12px 20px;
    background-color: #1185fe;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 20px;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
}

input[type="text"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.date-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.date-group:last-of-type {
    gap: 0;
}

.date-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 0 0 auto;
    min-width: 140px;
}

.date-input-wrapper label {
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 600;
}

.sort-wrapper {
    flex: 1 1 100%;
    min-width: unset;
    width: 100%;
}

.sort-wrapper select {
    width: 100%;
    box-sizing: border-box;
}

input[type="datetime-local"] {
    padding: 8px 5px 8px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

input[type="datetime-local"]::placeholder {
    color: rgba(255,255,255,0.6);
}

select {
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-size: 13px;
    cursor: pointer;
    width: auto;
}

select option {
    background-color: #333;
    color: white;
}

button {
    padding: 10px 20px;
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

button:hover {
    background-color: rgba(255,255,255,0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-info {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
}

#feed {
    padding: 10px 0;
}

.post {
    padding: 15px 20px;
    border-bottom: 1px solid #efefef;
    animation: fadeIn 0.3s ease-in;
}

.post:hover {
    background-color: #f7f7f7;
}

.post-is-reply {
    border-left: 3px solid #1185fe;
}

.post-is-reply:hover {
    background-color: #eef7ff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1185fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar-link {
    text-decoration: none;
    color: inherit;
}

.post-author-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-author-link:hover .post-author {
    text-decoration: underline;
}

.post-repost-info {
    font-size: 12px;
    color: #657786;
    margin-top: 4px;
}

.post-repost-link {
    text-decoration: none;
    color: #657786;
}

.post-repost-link:hover {
    text-decoration: underline;
    color: #1185fe;
}

.post-reply-info {
    font-size: 12px;
    color: #657786;
    margin-top: 4px;
}

.post-reply-link {
    text-decoration: none;
    color: #657786;
}

.post-reply-link:hover {
    text-decoration: underline;
    color: #1185fe;
}

.post-parent-container {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #efefef;
    border-radius: 8px;
    background-color: #f7f7f7;
}

.post-parent-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-parent-link-wrapper:hover .post-parent-container {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
}

.post-parent-header {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.post-parent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e1e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.post-parent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-parent-author-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.post-parent-author-name {
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.post-parent-author-name a {
    text-decoration: none;
    color: inherit;
}

.post-parent-author-name a:hover {
    text-decoration: underline;
}

.post-parent-author-handle {
    color: #657786;
    font-size: 13px;
}

.post-parent-author-handle span {
    cursor: help;
    border-bottom: 1px dotted #657786;
}

.post-parent-author-handle span:hover {
    text-decoration: underline;
}

.post-parent-body {
    padding-left: 0;
}

.post-parent-link {
    text-decoration: none;
    color: inherit;
}

.post-parent-link:hover {
    opacity: 0.8;
}

.post-parent-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.post-parent-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}

.post-parent-image:hover {
    opacity: 0.9;
}

.post-parent-text {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.post-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-info > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.post-author {
    font-weight: 600;
    color: #000;
}

.post-handle {
    color: #657786;
    font-size: 13px;
    margin-left: 4px;
}

.post-time {
    color: #657786;
    font-size: 13px;
    margin-left: 4px;
}

.post-timestamp {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px dotted #657786;
    cursor: help;
}

.post-timestamp:hover {
    text-decoration: underline;
}

.post-text {
    margin-bottom: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.word-break-indicator {
    color: #aaa;
    font-size: 0.75em;
    user-select: none;
    margin-left: 2px;
}

.post-images {
    margin: 12px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.post-image {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.post-image:hover {
    opacity: 0.9;
}

.post-video {
    margin: 12px 0;
}

.post-video video {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    background-color: #000;
    cursor: pointer;
}

.post-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #657786;
    margin-top: 12px;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-action-button {
    background: none;
    border: 1px solid transparent;
    color: #657786;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    border-radius: 6px;
}

.post-action-button:hover {
    color: #1185fe;
    background-color: rgba(17, 133, 254, 0.15);
}

.post-action-button.liked {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.3);
    font-weight: 700;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.2);
}

.post-action-button.liked:hover {
    background-color: rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.3);
}

.post-action-button.reposted {
    color: #1db679;
    background-color: rgba(29, 182, 121, 0.2);
    border-color: rgba(29, 182, 121, 0.3);
    font-weight: 700;
    box-shadow: 0 0 8px rgba(29, 182, 121, 0.2);
}

.post-action-button.reposted:hover {
    background-color: rgba(29, 182, 121, 0.3);
    box-shadow: 0 0 12px rgba(29, 182, 121, 0.3);
}

.post-stat-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-separator {
    width: 1px;
    height: 18px;
    background-color: rgba(150, 150, 150, 0.3);
}

.stat-buttons {
    display: flex;
    gap: 6px;
}

.post-action-button.dual-acct-btn {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 32px;
    justify-content: center;
    font-weight: 600;
    border: 1px solid rgba(17, 133, 254, 0.4);
    color: #1185fe;
    background-color: rgba(17, 133, 254, 0.08);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.post-action-button.dual-acct-btn:hover {
    background-color: rgba(17, 133, 254, 0.15);
    border-color: rgba(17, 133, 254, 0.6);
}

.post-action-button.dual-acct-btn.liked {
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.post-action-button.dual-acct-btn.liked:hover {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.6);
}

.post-action-button.dual-acct-btn.reposted {
    border-color: rgba(29, 182, 121, 0.4);
    color: #1db679;
    background-color: rgba(29, 182, 121, 0.08);
}

.post-action-button.dual-acct-btn.reposted:hover {
    background-color: rgba(29, 182, 121, 0.15);
    border-color: rgba(29, 182, 121, 0.6);
}

.skeleton {
    padding: 15px 20px;
    border-bottom: 1px solid #efefef;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-header {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e0e0e0;
    flex-shrink: 0;
}

.skeleton-text {
    flex: 1;
}

.skeleton-line {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line:last-child {
    width: 80%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: #657786;
}

.error {
    padding: 20px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    margin: 10px;
}

.success {
    padding: 10px 20px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 13px;
}

#sentinel {
    padding: 20px;
    text-align: center;
    color: #657786;
    font-size: 13px;
}

.feed-stats {
    position: sticky;
    top: 0;
    padding: 12px 20px;
    background-color: #f7f7f7;
    font-size: 13px;
    color: #657786;
    border-bottom: 1px solid #efefef;
    z-index: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.scroll-to-top-btn {
    background: none;
    border: none;
    color: #1185fe;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.scroll-to-top-btn:hover {
    background-color: rgba(17, 133, 254, 0.1);
    color: #0d5fb5;
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.image-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 4px;
    z-index: 1001;
}

.image-modal-nav:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal-prev {
    left: 10px;
}

.image-modal-next {
    right: 10px;
}

.image-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1001;
}

.login-modal[style*="display: flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #1185fe, #0d5fb5);
    width: 0%;
    z-index: 999;
    transition: width 0.1s ease-out;
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background-color: white;
    border-left: 1px solid #efefef;
    overflow: hidden;
    transition: width 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
    z-index: 997;
}

.right-sidebar.open {
    width: 300px;
}

.sidebar-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: #1185fe;
    border: none;
    border-radius: 4px 0 0 4px;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    color: white;
}

.sidebar-toggle:hover {
    background-color: #0d5fb5;
    padding-right: 2px;
}

.right-sidebar.open ~ .sidebar-toggle {
    right: 300px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.sidebar-tab {
    display: none;
}

.sidebar-tab.active {
    display: block;
}

.sidebar-tab h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

#searchInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #efefef;
    border-radius: 4px;
    background-color: #f7f7f7;
    color: #333;
    font-size: 13px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

#searchInput:focus {
    outline: none;
    border-color: #1185fe;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(17, 133, 254, 0.1);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.search-result-item {
    padding: 10px;
    border: 1px solid #efefef;
    border-radius: 4px;
    background-color: #f7f7f7;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.search-result-item:hover {
    background-color: #eef7ff;
    border-color: #1185fe;
}

.search-result-item.highlight {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.search-result-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.search-result-text {
    color: #657786;
    line-height: 1.3;
    word-break: break-word;
}

.search-no-results {
    text-align: center;
    color: #657786;
    padding: 20px 0;
    font-size: 13px;
}

.close-thread-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-thread-btn:hover {
    background-color: rgba(231, 76, 60, 0.3);
}

.thread-viewer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.thread-post {
    padding: 10px;
    border: 1px solid #efefef;
    border-radius: 4px;
    background-color: #f7f7f7;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.thread-post:hover {
    background-color: #eef7ff;
    border-color: #1185fe;
}

.thread-post.current {
    background-color: #fff3cd;
    border-color: #ffc107;
    border-left: 3px solid #ffc107;
}

.thread-post-header {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.thread-post-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #1185fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.thread-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thread-post-author {
    font-weight: 600;
    color: #333;
}

.thread-post-handle {
    color: #657786;
    font-size: 11px;
}

.thread-post-text {
    color: #333;
    line-height: 1.3;
    word-break: break-word;
    margin-bottom: 4px;
}

.thread-connection {
    width: 2px;
    height: 8px;
    margin-left: 13px;
    background-color: #1185fe;
    opacity: 0.3;
}

.thread-no-thread {
    text-align: center;
    color: #657786;
    padding: 20px 0;
    font-size: 13px;
}

.thread-post-images {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.thread-post-image {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.thread-post-image:hover {
    opacity: 0.8;
}

/* Dark Mode Styles */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background-color: #0a0e27;
    color: #e4e6eb;
}

[data-theme="dark"] .container {
    background: #161b22;
}

[data-theme="dark"] header {
    background-color: #0d1b2a;
    border-bottom: 1px solid #30363d;
}

[data-theme="dark"] .input-group input[type="text"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] select {
    background-color: rgba(255,255,255,0.05);
    color: #e4e6eb;
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .input-group input[type="text"]::placeholder,
[data-theme="dark"] input[type="datetime-local"]::placeholder {
    color: rgba(255,255,255,0.4);
}

[data-theme="dark"] select option {
    background-color: #0d1b2a;
    color: #e4e6eb;
}

[data-theme="dark"] .post {
    border-bottom-color: #30363d;
}

[data-theme="dark"] .post:hover {
    background-color: #1c2128;
}

[data-theme="dark"] .post-is-reply {
    border-left-color: #1f6feb;
}

[data-theme="dark"] .post-is-reply:hover {
    background-color: #0d1929;
}

[data-theme="dark"] .post-author,
[data-theme="dark"] .post-handle,
[data-theme="dark"] .post-text {
    color: #e4e6eb;
}

[data-theme="dark"] .post-repost-info,
[data-theme="dark"] .post-reply-info {
    color: #79c0ff;
}

[data-theme="dark"] .post-time {
    color: #8b949e;
}

[data-theme="dark"] .post-stat {
    color: #8b949e;
}

[data-theme="dark"] #sentinel {
    color: #8b949e;
}

[data-theme="dark"] .feed-stats {
    background-color: #0d1b2a;
    color: #e4e6eb;
    border-bottom: 1px solid #30363d;
}

[data-theme="dark"] .post-parent-container {
    background-color: #0d1b2a;
    border-color: #30363d;
}

[data-theme="dark"] .post-parent-text,
[data-theme="dark"] .post-parent-author-name,
[data-theme="dark"] .post-parent-author-handle {
    color: #e4e6eb;
}

[data-theme="dark"] .post-link-wrapper {
    color: #79c0ff;
}

[data-theme="dark"] .image-modal {
    background-color: rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .login-modal {
    background-color: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .login-modal > div {
    background-color: #161b22;
    color: #e4e6eb;
    border: 1px solid #30363d;
}

[data-theme="dark"] .login-modal p {
    color: #8b949e;
}

[data-theme="dark"] #loginHandle,
[data-theme="dark"] #loginPassword {
    background-color: #0d1b2a;
    color: #e4e6eb;
    border-color: #30363d;
}

[data-theme="dark"] #loginHandle::placeholder,
[data-theme="dark"] #loginPassword::placeholder {
    color: #6e7681;
}

[data-theme="dark"] #loginError {
    color: #f85149;
}

[data-theme="dark"] .post-action-button {
    color: #8b949e;
    background-color: transparent;
    border: 1px solid #30363d;
}

[data-theme="dark"] .post-action-button:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: #58a6ff;
    color: #79c0ff;
}

[data-theme="dark"] .post-action-button.liked {
    color: #f85149;
    border-color: #f85149;
}

[data-theme="dark"] .post-action-button.reposted {
    color: #3fb950;
    border-color: #3fb950;
}

[data-theme="dark"] .post-action-button.dual-acct-btn {
    color: #79c0ff;
    border-color: #58a6ff;
    background-color: rgba(88, 166, 255, 0.12);
}

[data-theme="dark"] .post-action-button.dual-acct-btn:hover {
    background-color: rgba(88, 166, 255, 0.2);
    border-color: #79c0ff;
}

[data-theme="dark"] .post-action-button.dual-acct-btn.liked {
    color: #f85149;
    border-color: #f85149;
    background-color: rgba(248, 81, 73, 0.12);
}

[data-theme="dark"] .post-action-button.dual-acct-btn.liked:hover {
    background-color: rgba(248, 81, 73, 0.2);
}

[data-theme="dark"] .post-action-button.dual-acct-btn.reposted {
    color: #3fb950;
    border-color: #3fb950;
    background-color: rgba(63, 185, 80, 0.12);
}

/* ── Suggested Accounts ────────────────────────────────────── */

.sidebar-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #efefef;
}

.sidebar-nav-link {
    font-size: 12px;
    color: #1185fe;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-nav-link:hover {
    text-decoration: underline;
}

.find-suggestions-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    background-color: #1185fe;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.find-suggestions-btn:hover {
    background-color: #0d6eea;
}

.find-suggestions-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.suggestion-item:hover {
    background-color: #f0f4ff;
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1185fe;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.suggestion-display-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-handle {
    font-size: 11px;
    color: #657786;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-pill {
    font-size: 11px;
    font-weight: 700;
    background-color: rgba(17, 133, 254, 0.1);
    color: #1185fe;
    border-radius: 10px;
    padding: 2px 7px;
    flex-shrink: 0;
}

[data-theme="dark"] .sidebar-nav {
    border-color: #30363d;
}

[data-theme="dark"] .find-suggestions-btn {
    background-color: #1185fe;
}

[data-theme="dark"] .find-suggestions-btn:hover {
    background-color: #0d6eea;
}

[data-theme="dark"] .suggestion-item:hover {
    background-color: rgba(17, 133, 254, 0.12);
}

[data-theme="dark"] .suggestion-display-name {
    color: #e4e6eb;
}

[data-theme="dark"] .suggestion-handle {
    color: #8b949e;
}

[data-theme="dark"] .score-pill {
    background-color: rgba(17, 133, 254, 0.2);
    color: #58a6ff;
}

[data-theme="dark"] .post-action-button.dual-acct-btn.reposted:hover {
    background-color: rgba(63, 185, 80, 0.2);
}

[data-theme="dark"] .error {
    background-color: #161b22;
    color: #f85149;
    border-color: #f85149;
}

/* Dark mode login modal */
[data-theme="dark"] #loginModal {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

[data-theme="dark"] #loginModal > div {
    background: #161b22 !important;
    border: 1px solid #30363d;
}

[data-theme="dark"] #loginModal h2 {
    color: #e4e6eb !important;
}

[data-theme="dark"] #loginModal p {
    color: #8b949e !important;
}

[data-theme="dark"] #loginModal label {
    color: #e4e6eb !important;
}

[data-theme="dark"] #loginModal a {
    color: #58a6ff !important;
}

[data-theme="dark"] #loginHandle,
[data-theme="dark"] #loginPassword {
    background-color: #0d1b2a !important;
    color: #e4e6eb !important;
    border-color: #30363d !important;
}

[data-theme="dark"] #loginHandle::placeholder,
[data-theme="dark"] #loginPassword::placeholder {
    color: #6e7681;
}

[data-theme="dark"] #loginModal button[onclick="app.attemptLogin()"] {
    background-color: #1f6feb !important;
    color: #ffffff !important;
}

[data-theme="dark"] #loginModal button[onclick="app.attemptLogin()"]:hover {
    background-color: #388bfd !important;
}

[data-theme="dark"] #loginModal button[onclick="app.hideLoginModal()"] {
    background-color: #30363d !important;
    color: #e4e6eb !important;
}

[data-theme="dark"] #loginModal button[onclick="app.hideLoginModal()"]:hover {
    background-color: #484f58 !important;
}

[data-theme="dark"] #loginError {
    color: #f85149 !important;
}

/* External link card styling */
.post-external-link {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.post-external-link img {
    width: 100%;
    display: block;
}

.post-external-link-info {
    padding: 10px;
    background: #f5f5f5;
}

.post-external-link-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}

.post-external-link-domain {
    font-size: 12px;
    color: #657786;
}

[data-theme="dark"] .post-external-link {
    border-color: #30363d;
}

[data-theme="dark"] .post-external-link-info {
    background: #1c2128;
}

[data-theme="dark"] .post-external-link-title {
    color: #e4e6eb;
}

[data-theme="dark"] .post-external-link-domain {
    color: #8b949e;
}
/* Dark mode sidebar styles */
[data-theme="dark"] .right-sidebar {
    background-color: #161b22;
    border-left-color: #30363d;
}

[data-theme="dark"] #searchInput {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #e4e6eb;
}

[data-theme="dark"] #searchInput::placeholder {
    color: rgba(255,255,255,0.4);
}

[data-theme="dark"] .sidebar-tab h3 {
    color: #e4e6eb;
}

[data-theme="dark"] .search-result-item {
    background-color: #0d1b2a;
    border-color: #30363d;
    color: #e4e6eb;
}

[data-theme="dark"] .search-result-item:hover {
    background-color: #1c2128;
    border-color: #1f6feb;
}

[data-theme="dark"] .search-result-author {
    color: #e4e6eb;
}

[data-theme="dark"] .search-result-text {
    color: #8b949e;
}

/* Account-grouped interaction layout styles */
.new-interaction-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.account-interaction-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.account-separator {
    color: #ccc;
    font-size: 14px;
    font-weight: 300;
    user-select: none;
}

@media (max-width: 600px) {
    .new-interaction-bar {
        gap: 8px;
    }
    
    .account-interaction-group {
        gap: 2px;
    }
}

[data-theme="dark"] .account-separator {
    color: #30363d;
}

[data-theme="dark"] .thread-post {
    background-color: #0d1b2a;
    border-color: #30363d;
}

[data-theme="dark"] .thread-post:hover {
    background-color: #1c2128;
    border-color: #1f6feb;
}

[data-theme="dark"] .thread-post.current {
    background-color: #1d1a08;
    border-color: #9e6a03;
}

[data-theme="dark"] .thread-post-author {
    color: #e4e6eb;
}

[data-theme="dark"] .thread-post-handle {
    color: #8b949e;
}

[data-theme="dark"] .thread-post-text {
    color: #e4e6eb;
}

[data-theme="dark"] .close-thread-btn {
    background-color: rgba(248,81,73,0.2);
    border-color: rgba(248,81,73,0.3);
    color: #f85149;
}

[data-theme="dark"] .close-thread-btn:hover {
    background-color: rgba(248,81,73,0.3);
}

[data-theme="dark"] .thread-connection {
    background-color: #1f6feb;
    opacity: 0.5;
}

[data-theme="dark"] .thread-no-thread {
    color: #8b949e;
}

/* Batch Loading Indicator */
#batch-loading-indicator {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 133, 254, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 10px 20px;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.batch-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: batchSpin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes batchSpin {
    to { transform: rotate(360deg); }
}

[data-theme="dark"] #batch-loading-indicator {
    background: rgba(17, 133, 254, 0.85);
}

/* Batch divider — appears between scroll-triggered batches while loading */
.batch-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 12px;
    color: #657786;
    transition: opacity 0.5s ease;
}

.batch-divider::before,
.batch-divider::after {
    content: '';
    flex: 1;
    border-top: 1px dashed #d0d7de;
}

.batch-divider--loading .batch-divider-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #d0d7de;
    border-top-color: #1185fe;
    border-radius: 50%;
    animation: batchSpin 0.7s linear infinite;
    flex-shrink: 0;
}

.batch-divider--done .batch-divider-spinner {
    display: none;
}

.batch-divider--done::before,
.batch-divider--done::after {
    border-top-style: solid;
    border-color: #e8e8e8;
}

[data-theme="dark"] .batch-divider {
    color: #8b949e;
}

[data-theme="dark"] .batch-divider::before,
[data-theme="dark"] .batch-divider::after {
    border-color: #30363d;
}

[data-theme="dark"] .batch-divider--loading .batch-divider-spinner {
    border-color: #30363d;
    border-top-color: #1185fe;
}

[data-theme="dark"] .batch-divider--done::before,
[data-theme="dark"] .batch-divider--done::after {
    border-color: #21262d;
}
