.seo-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.seo-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.seo-editor-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.seo-editor-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.seo-editor-header .close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.seo-editor-header .close-button:hover {
    background: #f5f5f5;
    color: #333;
}

.seo-editor-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Platform Tabs */
.seo-platform-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.seo-platform-tabs::-webkit-scrollbar {
    height: 6px;
}

.seo-platform-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.seo-platform-tabs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.seo-platform-tabs::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.platform-tab:hover {
    border-color: #702A2A;
    color: #702A2A;
}

.platform-tab.active {
    background: #702A2A;
    color: white;
    border-color: #702A2A;
}

.platform-tab svg {
    width: 20px;
    height: 20px;
}

.preview-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-tab:hover {
    border-color: #702A2A;
    color: #702A2A;
}

.preview-tab.active {
    background: #702A2A;
    color: white;
    border-color: #702A2A;
}

.preview-tab svg {
    width: 18px;
    height: 18px;
}

.seo-preview-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    background: white;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    flex-wrap: wrap;
}

.seo-preview-tabs::-webkit-scrollbar {
    height: 6px;
}

.seo-preview-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.seo-preview-tabs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.seo-preview-tabs::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Main Editor Layout */
.seo-editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow-y: auto;
}

.seo-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seo-preview-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seo-preview-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Sections */
.form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #702A2A;
    box-shadow: 0 0 0 3px rgba(112, 42, 42, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

.char-counter {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
    text-align: right;
}

/* Save Button */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #702A2A;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.btn-primary:hover {
    background: #5a2222;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 42, 42, 0.2);
}

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

/* Platform Previews */
.platform-preview {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.platform-preview h3 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Google Preview */
.google-preview-content {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
    font-family: Arial, sans-serif;
}

.google-url {
    font-size: 0.85rem;
    color: #006621;
    margin-bottom: 0.25rem;
}

.google-title {
    font-size: 1.2rem;
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.google-description {
    font-size: 0.9rem;
    color: #545454;
    line-height: 1.5;
}

/* Facebook Preview */
.facebook-preview-content {
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 0.5rem;
}

.facebook-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    overflow: hidden;
}

.facebook-image {
    width: 100%;
    height: 120px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.facebook-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facebook-content {
    padding: 0.75rem;
}

.facebook-url {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.25rem;
}

.facebook-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.facebook-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* WhatsApp Preview */
.whatsapp-preview-content {
    padding: 1rem;
    background: #ecf5e0;
    border-radius: 0.5rem;
    font-family: Arial, sans-serif;
}

.whatsapp-card {
    display: flex;
    gap: 0.75rem;
    background: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
}

.whatsapp-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: #e0e0e0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.whatsapp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.whatsapp-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.whatsapp-url {
    font-size: 0.75rem;
    color: #999;
}

/* Instagram Preview */
.instagram-preview-content {
    padding: 1rem;
    background: #fafafa;
    border-radius: 0.5rem;
}

.instagram-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.instagram-image {
    width: 100%;
    height: 180px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.instagram-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-content {
    padding: 0.75rem;
    text-align: center;
}

.instagram-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.instagram-url {
    font-size: 0.8rem;
    color: #999;
}

/* TikTok Preview */
.tiktok-preview-content {
    padding: 1rem;
    background: #000;
    border-radius: 0.5rem;
}

.tiktok-card {
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.tiktok-image {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tiktok-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tiktok-content {
    padding: 0.75rem;
    text-align: center;
}

.tiktok-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.tiktok-url {
    font-size: 0.8rem;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .seo-editor-main {
        grid-template-columns: 1fr;
    }

    .platform-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .platform-tab svg {
        display: none;
    }
}

@media (max-width: 768px) {
    .seo-editor-container {
        height: auto;
        max-height: 90vh;
    }

    .seo-editor-header {
        padding: 1rem;
    }

    .seo-editor-header h2 {
        font-size: 1.25rem;
    }

    .seo-platform-tabs {
        padding: 0.75rem;
        gap: 0.25rem;
    }

    .platform-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .seo-editor-main {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .platform-preview {
        padding: 1rem;
    }
}

/* Scrollbar Styling */
.seo-editor-main::-webkit-scrollbar {
    width: 8px;
}

.seo-editor-main::-webkit-scrollbar-track {
    background: transparent;
}

.seo-editor-main::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.seo-editor-main::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Modal for SEOEditor */
#seo-editor-modal {
    --modal-z-index: 10000;
}

/* Button Styles */
.btn-secondary {
    background-color: white;
    color: #702A2A;
    border: 2px solid #702A2A;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #702A2A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(112, 42, 42, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(112, 42, 42, 0.15);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background-color: #702A2A;
    color: white;
    border: 2px solid #702A2A;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #5a1f1f;
    border-color: #5a1f1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(112, 42, 42, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(112, 42, 42, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}