:root {
    --bg-color: #000000;
    --border-color: #2f3336;
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --blue-color: #1d9bf0;
    --editor-bg: #16181c;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

body {
    font-family: var(--font-family);
    background-color: var(--editor-bg);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Editor Panel */
.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background-color: var(--editor-bg);
    padding: 24px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.editor-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.editor-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.char-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.char-count.over-limit {
    color: var(--blue-color);
}

/* Info button */
.info-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.info-tooltip {
    display: none;
    position: absolute;
    top: 28px;
    right: 0;
    background-color: #1c1f23;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    width: 280px;
    z-index: 10;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.info-tooltip strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
}

.info-tooltip p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.info-tooltip p strong {
    display: inline;
    color: var(--text-primary);
}

.info-btn:hover .info-tooltip {
    display: block;
}

/* Tweet link color (URLs, hashtags, mentions) */
.tweet-link {
    color: var(--blue-color);
}

textarea {
    flex: 1;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.5;
}

textarea::placeholder {
    color: var(--text-secondary);
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--editor-bg);
    align-items: center;
    padding: 24px;
    overflow-y: auto;
}

.preview-header {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
}

.tweet-card {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.tweet-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.author-avatar {
    margin-right: 12px;
}

.author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-name-row {
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 20px;
    flex-wrap: wrap;
}

.author-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 4px;
}

.verified-icon {
    width: 18px;
    height: 18px;
    fill: #1d9bf0;
    margin-right: 4px;
}

.author-handle {
    color: var(--text-secondary);
}

.dot-separator {
    color: var(--text-secondary);
    margin: 0 4px;
}

.tweet-time {
    color: var(--text-secondary);
}

.tweet-actions-top {
    display: flex;
    align-items: center;
}

.editor-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: var(--blue-color);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

.upload-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-right: 8px;
}

.remove-btn {
    background-color: rgba(244, 33, 46, 0.1);
    color: #f4212e;
    border: 1px solid rgba(244, 33, 46, 0.5);
    border-radius: 9999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background-color: rgba(244, 33, 46, 0.2);
}

.header-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    margin-left: 12px;
    cursor: pointer;
}

.tweet-content {
    font-size: 15px;
    line-height: 20px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tweet-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.show-more-container {
    margin-top: 2px;
}

.show-more-text {
    color: var(--blue-color);
    cursor: pointer;
}

.show-more-text:hover {
    text-decoration: underline;
}

.media-container {
    margin-bottom: 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.media-container img {
    width: 100%;
    display: block;
}

.tweet-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none; /* In the feed, top border is usually removed, or just small padding */
    padding-top: 8px;
    margin-top: 4px;
    color: var(--text-secondary);
}

.action-btn-group {
    display: flex;
    flex: 1;
    justify-content: space-between;
    max-width: 425px;
}

.action-btn-group-right {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    group: hover;
}

.footer-icon {
    width: 18.75px;
    height: 18.75px;
    fill: currentColor;
    margin-right: 8px;
    padding: 8px;
    box-sizing: content-box;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.action-btn:hover {
    color: var(--blue-color);
}
.action-btn:hover .footer-icon {
    background-color: rgba(29, 155, 240, 0.1);
}

/* Specific colors for retweet and like */
.action-btn.retweet:hover {
    color: #00ba7c;
}
.action-btn.retweet:hover .footer-icon {
    background-color: rgba(0, 186, 124, 0.1);
}

.action-btn.like:hover {
    color: #f91880;
}
.action-btn.like:hover .footer-icon {
    background-color: rgba(249, 24, 128, 0.1);
}

/* =====================
   PLATFORM TABS
   ===================== */
.platform-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 5px 18px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.tab-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

.li-hidden { display: none !important; }

.preview-panel.li-mode { background-color: #f3f2ef; }

/* =====================
   LINKEDIN CARD
   ===================== */
.li-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    color: rgba(0,0,0,0.9);
}

.li-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px 8px;
    gap: 10px;
}

.li-avatar-wrap { flex-shrink: 0; }

.li-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f5c518;
}

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

.li-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.li-name {
    font-weight: 600;
    font-size: 14px;
    color: rgba(0,0,0,0.9);
}

.li-svg-icon {
    width: 16px;
    height: 16px;
    fill: #0a66c2;
    flex-shrink: 0;
}

.li-degree {
    color: rgba(0,0,0,0.6);
    font-size: 13px;
}

.li-headline {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.li-meta {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.li-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.li-follow-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #0a66c2;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.li-follow-btn:hover { background: rgba(10,102,194,0.08); }

.li-icon-sm { width: 16px; height: 16px; fill: currentColor; }
.li-icon-md { width: 20px; height: 20px; fill: rgba(0,0,0,0.6); }

.li-dots-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
}
.li-dots-btn:hover { background: rgba(0,0,0,0.08); }

.li-content {
    padding: 0 16px 8px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(0,0,0,0.9);
}

.li-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    display: inline;
}

.li-show-more-container { display: inline; }

.li-show-more {
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    font-size: 14px;
}
.li-show-more:hover { text-decoration: underline; }

.li-link { color: #0a66c2; }

.li-media-container { width: 100%; overflow: hidden; }
.li-media-container img {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.li-reactions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    font-size: 12px;
    color: rgba(0,0,0,0.6);
}

.li-reaction-icons {
    display: flex;
    align-items: center;
    gap: 2px;
}

.li-emoji { font-size: 16px; line-height: 1; }
.li-reaction-count { margin-left: 4px; font-size: 13px; }

.li-action-bar {
    display: flex;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    padding: 2px 8px;
}

.li-avatar-sm { margin-right: 4px; }
.li-avatar-sm img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.li-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: rgba(0,0,0,0.6);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 10px 4px;
    border-radius: 4px;
    transition: background 0.15s;
}
.li-action-btn:hover {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.9);
}

.li-action-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* =====================
   LINKEDIN THEME (LIGHT MODE)
   ===================== */
body.li-theme {
    background-color: #f3f2ef;
}
body.li-theme .editor-bg {
    background-color: #ffffff;
}
body.li-theme .editor-panel {
    background-color: #ffffff;
    border-right-color: #e0e0e0;
}
body.li-theme .editor-header h2 {
    color: rgba(0,0,0,0.9);
}
body.li-theme .char-count {
    color: rgba(0,0,0,0.6);
}
body.li-theme .info-btn {
    background-color: #f3f2ef;
    color: rgba(0,0,0,0.6);
    border: 1px solid #e0e0e0;
}
body.li-theme textarea {
    color: rgba(0,0,0,0.9);
}
body.li-theme textarea::placeholder {
    color: rgba(0,0,0,0.6);
}
body.li-theme .upload-btn, 
body.li-theme .remove-btn {
    color: #0a66c2;
}
body.li-theme .upload-btn svg {
    fill: #0a66c2;
}

/* Tabs LinkedIn Theme */
body.li-theme .tab-btn {
    border-color: #8c8c8c;
    color: #555555;
    padding: 3px 16px; /* offset inner visual margin if needed */
    border-width: 1px;
}
body.li-theme .tab-btn.active {
    background-color: #e8e8e8;
    color: #000000;
    border: 2px solid #0a66c2;
    font-weight: 700;
    padding: 2px 15px; /* offset 2px border vs 1px to prevent jumping */
}

/* Reactions specific */
.li-reaction-badge {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: -4px;
    border: 2px solid #fff;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.li-reaction-badge:last-child {
    margin-right: 0;
}

.li-reaction-icons {
    display: flex;
    align-items: center;
}
.li-reactions {
    padding: 8px 16px;
}
