:root {
    --bg-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --text-color: #333;
    --text-secondary: #777;
    --accent: #eef2f5;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 12px;
    --font-family: 'Inter', sans-serif;
}

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

/* Sidebar */
.app-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    border-right: 1px solid #e1e4e8;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 20px;
}

.brand h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-btn {
    background: none;
    border: none;
    text-align: left;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--accent);
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.post-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.post-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #e1e4e8;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.visible {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 400px;
    max-width: 90%;
}

.close-modal {
    float: right;
    cursor: pointer;
    font-size: 1.5rem;
}

.status-message {
    margin-top: 10px;
    font-weight: bold;
}

.success {
    color: green;
}

.error {
    color: red;
}

/* Sites List */
.site-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.site-item:last-child {
    border-bottom: none;
}

#remote-site-title {
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Site Item Truncation */
.site-item div {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-item div:last-child {
    max-width: 40%;
    display: flex;
    justify-content: flex-end;
}

.long-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SEO Styles */
.seo-section {
    padding: 15px;
    margin-bottom: 20px;
}

.seo-results {
    display: flex;
    align-items: start;
    gap: 20px;
    margin-top: 15px;
}

.seo-score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f1;
    display: flex;
    align-items: start;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    border: 4px solid #ccc;
    line-height: 52px;
    /* Center text vertically */
}

.seo-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.seo-item {
    margin-bottom: 5px;
    color: #555;
}

.seo-item.pass {
    color: #28a745;
    font-weight: 500;
}

.seo-item.fail {
    color: #dc3545;
}

/* Dynamic Score Colors */
.score-bad {
    border-color: #dc3545;
    color: #dc3545;
}

.score-ok {
    border-color: #ffc107;
    color: #856404;
}

.score-good {
    border-color: #28a745;
    color: #28a745;
}