/* Tweet Feed Panel Styles */

#tweet-panel,
#live-feed-panel {
    background: #0d0d12 !important;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
    transition: filter 0.3s ease;
    z-index: 0;
}

/* Blur tweet panel when ANY modal is open (modular) */
body:has(#settings-modal:not(.hidden)) #live-feed-panel,
body:has(#statistics-modal:not(.hidden)) #live-feed-panel,
body:has(#deploy-modal:not(.hidden)) #live-feed-panel,
body:has(#launch-modal:not(.hidden)) #live-feed-panel,
body:has(#token-details-modal:not(.hidden)) #live-feed-panel,
body:has(#confirm-modal:not(.hidden)) #live-feed-panel,
body:has(#milestone-overlay:not(.hidden)) #live-feed-panel {
    filter: blur(8px);
}

.tweet-card {
    background: #15151c !important;
    border-color: rgba(139, 92, 246, 0.15) !important;
}

.tweet-card:hover {
    background: #1a1a24 !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

#tweet-feed {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}

#tweet-feed::-webkit-scrollbar {
    width: 6px;
}

#tweet-feed::-webkit-scrollbar-track {
    background: transparent;
}

#tweet-feed::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

#tweet-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Link Preview Styles */
.tweet-link-previews,
.tweet-inner-link-previews {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tweet-inner-link-previews {
    margin-top: 8px;
}

.tweet-link-preview {
    min-height: 40px;
}

.tweet-link-preview-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tweet-link-preview-card {
    display: flex;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.tweet-link-preview-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.tweet-link-preview-image {
    width: 120px;
    min-height: 90px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.tweet-link-preview-image.is-favicon {
    background-size: 48px 48px;
    background-color: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.tweet-link-preview-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tweet-link-preview-domain {
    font-size: 11px;
    color: rgba(139, 92, 246, 0.8);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tweet-link-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tweet-link-preview-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    /* Don't truncate - show full description */
}

/* Tweet Media Styles */
.tweet-media {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.tweet-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tweet-image:hover {
    transform: scale(1.02);
}

/* Inner Tweet Panel (Replied/Retweeted) */
.tweet-inner-panel {
    margin: 12px 0;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
}

.tweet-inner-header {
    font-size: 11px;
    color: rgba(139, 92, 246, 0.8);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.tweet-inner-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
}

.tweet-inner-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tweet-inner-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tweet-inner-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.tweet-inner-username {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.tweet-inner-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
    /* Show full content, no truncation */
}

/* Tweet Card Styles */
.tweet-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
}

.tweet-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.tweet-card.tweet-entering {
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tweet Header */
.tweet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tweet-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #8b5cf6;
    object-fit: cover;
    flex-shrink: 0;
}

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

.tweet-user-name {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tweet-verified {
    color: #1d9bf0;
    font-size: 16px;
}

.tweet-username {
    font-size: 14px;
    color: #94a3b8;
}

.tweet-followers {
    font-size: 12px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Tweet Content */
.tweet-text {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tweet-text a {
    color: #1d9bf0;
    text-decoration: none;
}

.tweet-text a:hover {
    text-decoration: underline;
}

.tweet-hashtag {
    color: #8b5cf6;
    font-weight: 600;
}

/* Tweet Metadata */
.tweet-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #334155;
    margin-top: 12px;
}

.tweet-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.tweet-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tweet-stat-icon {
    font-size: 14px;
}

.tweet-stat-value {
    font-weight: 600;
    color: #e2e8f0;
}

/* Tweet Time */
.tweet-time {
    font-size: 11px;
    color: #64748b;
}

/* Deploy Button */
.tweet-deploy-btn {
    background: linear-gradient(to right, #9333ea, #ec4899);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.tweet-deploy-btn:hover {
    background: linear-gradient(to right, #7e22ce, #db2777);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.6);
}

.tweet-deploy-btn:active {
    transform: translateY(0);
}

.tweet-deploy-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
    box-shadow: none;
}

/* Split Deploy Button */
.tweet-deploy-split {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.tweet-deploy-split .tweet-deploy-btn {
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    position: relative;
    flex-direction: column;
    gap: 2px;
    padding: 6px 12px;
}

.tweet-deploy-split .tweet-deploy-main {
    background: linear-gradient(to right, #7e22ce, #9333ea);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.tweet-deploy-split .tweet-deploy-inner {
    background: linear-gradient(to right, #ec4899, #f43f5e);
    position: relative;
}

.tweet-deploy-split .tweet-deploy-inner::before {
    content: '⭐';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    opacity: 0.8;
}

.tweet-deploy-split .tweet-deploy-main:hover {
    background: linear-gradient(to right, #6d28d9, #7e22ce);
}

.tweet-deploy-split .tweet-deploy-inner:hover {
    background: linear-gradient(to right, #db2777, #e11d48);
}

.tweet-deploy-split .deploy-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.tweet-deploy-split .deploy-text {
    font-size: 13px;
    font-weight: 600;
}

/* Reply/Retweet Indicator */
.tweet-indicator {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tweet-indicator-icon {
    color: #8b5cf6;
}

/* Connection Status */
#tweet-status-indicator.connected {
    background-color: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

#tweet-status-indicator.disconnected {
    background-color: #ef4444;
}

#tweet-status-indicator.connecting {
    background-color: #f59e0b;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive adjustments */
@media (max-width: 1536px) {
    #tweet-panel {
        width: 24rem; /* 384px */
    }
}

@media (max-width: 1280px) {
    #tweet-panel {
        width: 20rem; /* 320px */
    }
    
    .tweet-card {
        padding: 12px;
    }
    
    .tweet-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Hide panel on small screens */
@media (max-width: 1024px) {
    #tweet-panel {
        display: none;
    }
}

