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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #15202b;
    color: #ffffff;
    overflow-x: auto;
}

.header {
    background-color: #1da1f2;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #38444d;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.config-btn {
    background-color: #ffffff;
    color: #1da1f2;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.config-btn:hover {
    background-color: #f7f9fa;
    transform: translateY(-1px);
}

.config-btn.secondary {
    background-color: #38444d;
    color: #ffffff;
}

.config-btn.secondary:hover {
    background-color: #4a5568;
}

.dashboard {
    display: flex;
    height: calc(100vh - 70px);
    gap: 1px;
    background-color: #38444d;
}

.column {
    flex: 1;
    background-color: #192734;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    border-right: 1px solid #38444d;
}

.column:last-child {
    border-right: none;
}

.column-header {
    background-color: #253341;
    padding: 15px;
    border-bottom: 1px solid #38444d;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.social-icon {
    width: 24px;
    height: 24px;
}

.column-header span {
    font-weight: bold;
    font-size: 16px;
    flex-grow: 1;
}

.edit-url {
    background: none;
    border: none;
    color: #8899a6;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.edit-url:hover {
    background-color: #38444d;
    color: #ffffff;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.placeholder {
    text-align: center;
    color: #8899a6;
    margin-top: 50px;
}

.placeholder p {
    font-size: 16px;
    line-height: 1.5;
}

.social-embed {
    width: 100%;
    height: 500px;
    border: none;
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #192734;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #38444d;
}

.modal-header {
    background-color: #253341;
    padding: 20px;
    border-bottom: 1px solid #38444d;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: bold;
}

.close {
    color: #8899a6;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 20px;
}

.url-config {
    margin-bottom: 20px;
}

.url-config label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffff;
}

.url-config input {
    width: 100%;
    padding: 12px;
    border: 2px solid #38444d;
    border-radius: 8px;
    background-color: #253341;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.url-config input:focus {
    outline: none;
    border-color: #1da1f2;
}

.url-config input::placeholder {
    color: #8899a6;
}

.save-btn {
    width: 100%;
    background-color: #1da1f2;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #1a91da;
}

.api-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #253341;
    border-radius: 8px;
    border-left: 4px solid #1da1f2;
}

.api-info p {
    margin: 0;
    color: #ffffff;
}

.url-config small {
    display: block;
    margin-top: 5px;
    color: #8899a6;
    font-size: 12px;
}

.url-config small a {
    color: #1da1f2;
    text-decoration: none;
}

.url-config small a:hover {
    text-decoration: underline;
}

.api-status {
    margin-top: 20px;
    padding: 15px;
    background-color: #38444d;
    border-radius: 8px;
    text-align: center;
}

.api-status p {
    margin: 0;
    color: #8899a6;
}

.api-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.api-test-results {
    margin-top: 20px;
    padding: 15px;
    background-color: #192734;
    border-radius: 8px;
    border: 1px solid #38444d;
}

.api-test-results h4 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 14px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #8899a6;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #38444d;
    border-top: 4px solid #1da1f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }
    
    .column {
        min-height: 400px;
        min-width: unset;
    }
}

/* Social Feed Styles */
.social-feed {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feed-header {
    background-color: #253341;
    padding: 15px;
    border-bottom: 1px solid #38444d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -20px -20px 20px -20px;
    position: relative;
}

.api-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #38444d;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.api-indicator.success {
    background-color: #1d9bf0;
    color: white;
}

.api-indicator.error {
    background-color: #f91880;
    color: white;
}

.error-message {
    background-color: #2a1a1a;
    border: 1px solid #f91880;
    color: #f91880;
    padding: 10px;
    margin: 10px;
    border-radius: 8px;
    font-size: 12px;
    word-break: break-word;
}

.feed-header h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.view-profile {
    color: #1da1f2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-profile:hover {
    text-decoration: underline;
}

.demo-post {
    background-color: #253341;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #38444d;
}

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

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #1da1f2, #657786);
    margin-right: 12px;
    flex-shrink: 0;
}

.post-avatar-real {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #38444d;
}

.ig-avatar {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.ln-avatar {
    background: linear-gradient(45deg, #0077b5, #00a0dc);
}

.post-info strong {
    color: #ffffff;
    font-size: 15px;
    display: block;
}

.post-time {
    color: #8899a6;
    font-size: 13px;
    margin-top: 2px;
}

.post-content {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
}

.post-image::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.7;
}

.post-image-real {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #38444d;
}

.post-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
}

.view-tweet {
    color: #1da1f2;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

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

.post-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #38444d;
}

.fb-avatar {
    background: linear-gradient(45deg, #1877F2, #42a5f5);
}

.post-stats {
    display: flex;
    gap: 16px;
    color: #8899a6;
    font-size: 13px;
    padding-top: 8px;
    border-top: 1px solid #38444d;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.facebook-feed, .instagram-feed, .linkedin-feed {
    flex: 1;
    overflow-y: auto;
}

.instagram-post .post-image {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.linkedin-post {
    background-color: rgba(10, 102, 194, 0.1);
    border-color: rgba(10, 102, 194, 0.3);
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .config-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .column-content {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .feed-header {
        margin: -15px -15px 15px -15px;
    }
}