/* RSS Feed Reader - Modern CSS Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.app-title i {
    font-size: 28px;
}

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

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #334155;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px);
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 0;
}

.sidebar-nav {
    flex: 1;
}

.nav-list {
    list-style: none;
    padding: 0 16px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
}

.nav-item.active .nav-link {
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 0 16px;
    margin-top: auto;
}

.upgrade-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}

.upgrade-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #fbbf24;
}

.upgrade-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upgrade-card p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.upgrade-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.content-wrapper {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Content */
.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.dashboard-header p {
    font-size: 16px;
    color: #64748b;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-content p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-change.positive {
    background: #dcfce7;
    color: #16a34a;
}

.stat-change.negative {
    background: #fef2f2;
    color: #dc2626;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.card-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.card-action {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-action:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Activity List */
.activity-list {
    padding: 24px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.activity-icon .fa-facebook {
    background: #1877f2;
}

.activity-icon .fa-twitter {
    background: #1da1f2;
}

.activity-icon .fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.activity-content p {
    font-size: 14px;
    color: #334155;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #64748b;
}

/* Quick Actions */
.quick-actions {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    grid-column: 1 / -1;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn.secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        padding: 24px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0 16px;
    }
    
    .app-title span {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 20px 16px;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .dashboard-grid {
        gap: 16px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .sidebar-backdrop {
        display: block;
    }
}

@media (max-width: 480px) {
    .top-header {
        height: 60px;
        padding: 0 12px;
    }
    
    .sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        width: 100%;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    .content-wrapper {
        padding: 16px 12px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .dashboard-header p {
        font-size: 14px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-content h3 {
        font-size: 24px;
    }
    
    .user-dropdown {
        right: -12px;
        min-width: 180px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .upgrade-card {
        display: none;
    }
    
    .sidebar-content {
        padding: 16px 0;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-title i {
    color: #f59e0b;
}

.page-title {
    font-size: 1.25rem;
    color: #1f2937;
}

.back-link {
    color: #6b7280;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.back-link:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.user-menu {
    position: relative;
}

.username {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.username:hover {
    background: #e5e7eb;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover {
    background: #f9fafb;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 1rem;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filter and Feed Lists */
.filter-list, .feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-item, .feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: #374151;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.filter-item:hover, .feed-item:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.filter-item.active, .feed-item.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.filter-item i, .feed-item i {
    margin-right: 0.5rem;
    width: 16px;
}

.feed-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.count, .unread-count {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.unread-count {
    background: #3b82f6;
    color: #fff;
}

/* Facebook Status */
.facebook-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-connected, .status-disconnected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.status-connected {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-disconnected {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.facebook-pages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.facebook-pages label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.facebook-pages select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    font-size: 0.875rem;
    color: #374151;
}

.facebook-pages select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Main Content */
.main-content {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.view-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
}

/* Articles */
.articles-container {
    padding: 1.5rem;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: #fff;
}

.article-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.article-card.unread {
    border-left: 4px solid #3b82f6;
}

.article-card.read {
    opacity: 0.7;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feed-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
}

.article-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-icon.starred {
    color: #f59e0b;
}

.btn-icon.btn-facebook {
    color: #1877f2;
}

.btn-icon.btn-facebook:hover {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-icon.btn-facebook.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-icon.btn-facebook.disabled:hover {
    background: transparent;
    color: #9ca3af;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-title a {
    color: #1f2937;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: #3b82f6;
}

.article-excerpt {
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.article-author {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* Article Images */
.article-image {
    margin-bottom: 1rem;
}

.article-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease;
}

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

/* Full Content Display */
.article-full-content {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    border-left: 3px solid #3b82f6;
}

.article-full-content p {
    margin-bottom: 1rem;
}

.article-full-content p:last-child {
    margin-bottom: 0;
}

/* Content Toggle Button */
.btn-content-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.btn-content-toggle:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-content-toggle i {
    font-size: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.75rem;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: #1f2937;
}

.card-body {
    padding: 1.5rem;
}

/* Account Page Grid */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.account-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.account-card .card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.account-card > :not(.card-header) {
    padding: 1.5rem;
}

@media (max-width: 1024px) {
    .account-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Feed Management */
.feed-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-feeds {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feed-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.feed-info strong {
    display: block;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.feed-info span {
    color: #6b7280;
    font-size: 0.875rem;
}

.feeds-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feed-item-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: #fff;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.feed-info h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.feed-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.feed-url, .feed-website {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.feed-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.feed-stats {
    display: flex;
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feed-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feed-timestamps {
    color: #9ca3af;
    font-size: 0.75rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6b7280;
}

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

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.demo-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #0369a1;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.btn-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .view-tabs {
        justify-content: center;
    }
    
    .content-actions {
        justify-content: center;
    }
    
    .article-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-actions {
        align-self: flex-end;
    }
    
    .feed-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feed-stats {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .feed-suggestion {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-content {
        padding: 0 0.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .dashboard-container {
        padding: 0.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .articles-container {
        padding: 1rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .feed-item-card {
        padding: 1rem;
    }
}

/* Print Styles */
/* Facebook Post Popup Dialog */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.popup-dialog {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.popup-header h3 {
    margin: 0;
    color: #1877f2;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.popup-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.popup-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.post-preview {
    margin-bottom: 1.5rem;
}

.post-image-container {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.post-image-container img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.post-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-title {
    margin: 0;
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-description {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.post-url {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.post-url:hover {
    color: #1d4ed8;
}

.post-options {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.popup-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.popup-footer .btn {
    min-width: 100px;
}

/* Responsive popup */
@media (max-width: 640px) {
    .popup-dialog {
        width: 95%;
        margin: 1rem;
    }
    
    .popup-header,
    .popup-content,
    .popup-footer {
        padding: 1rem;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .popup-footer .btn {
        width: 100%;
    }
}

@media print {
    .header,
    .sidebar,
    .content-header,
    .article-actions,
    .pagination,
    .popup-overlay {
        display: none;
    }
    
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        border: 1px solid #000;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
}

/* Message notifications */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background-color: #10b981;
    border-left: 4px solid #059669;
}

.message-error {
    background-color: #ef4444;
    border-left: 4px solid #dc2626;
}

.message-info {
    background-color: #3b82f6;
    border-left: 4px solid #2563eb;
}

.message-warning {
    background-color: #f59e0b;
    border-left: 4px solid #d97706;
}

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

/* New Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f8fafc;
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.notification-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.user-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 0.5rem;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.user-menu-item:hover {
    background-color: #f9fafb;
    color: #374151;
    text-decoration: none;
}

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

.user-menu-item i {
    margin-right: 0.5rem;
    width: 1rem;
}

/* Main Content Area */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.nav-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
}

.nav-item i {
    margin-right: 0.75rem;
    width: 1.25rem;
}

.sidebar-section {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.facebook-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-connected,
.status-disconnected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-connected {
    color: #059669;
}

.status-disconnected {
    color: #6b7280;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-filters {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
}

.filter-tab.active {
    background: #2563eb;
    color: white;
}

.filter-tab .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-tab.active .count {
    background: rgba(255, 255, 255, 0.2);
}

.feed-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    min-width: 200px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .top-header {
        padding: 0 1rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0 0.75rem;
        height: 56px;
    }
    
    .app-title {
        font-size: 1.125rem;
        display: none; /* Hide on mobile to save space */
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .notification-btn,
    .sidebar-toggle,
    .user-menu-toggle {
        padding: 0.375rem;
        font-size: 1rem;
    }
    
    .user-avatar {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        height: calc(100vh - 56px);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        width: 260px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-content {
        padding: 16px 0;
    }
    
    .nav-list {
        padding: 0 12px;
    }
    
    .nav-link {
        padding: 12px 16px;
        gap: 12px;
        font-size: 0.9rem;
    }
    
    .nav-link i {
        font-size: 16px;
        width: 18px;
    }
    
    .content-area {
        margin-left: 0;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .content-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    /* User menu dropdown adjustments for mobile */
    .user-dropdown {
        right: 0;
        left: auto;
        min-width: 200px;
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0 0.5rem;
        height: 52px;
    }
    
    .header-left {
        gap: 0.5rem;
    }
    
    .header-right {
        gap: 0.25rem;
    }
    
    .notification-btn,
    .sidebar-toggle,
    .user-menu-toggle {
        padding: 0.25rem;
        font-size: 0.9rem;
    }
    
    .user-avatar {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .notification-badge {
        font-size: 0.625rem;
        padding: 0.0625rem 0.25rem;
        min-width: 1rem;
    }
    
    .sidebar {
        top: 52px;
        height: calc(100vh - 52px);
        width: 240px; /* Narrower on very small screens */
    }
    
    .sidebar-content {
        padding: 12px 0;
    }
    
    .nav-list {
        padding: 0 8px;
    }
    
    .nav-link {
        padding: 10px 12px;
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .nav-link i {
        font-size: 14px;
        width: 16px;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .user-dropdown {
        min-width: 180px;
        font-size: 0.875rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .top-header {
        height: 48px;
    }
    
    .sidebar {
        top: 48px;
        height: calc(100vh - 48px);
        width: 220px;
    }
    
    .sidebar-content {
        padding: 8px 0;
    }
    
    .nav-list {
        padding: 0 6px;
    }
    
    .nav-link {
        padding: 8px 10px;
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .nav-link i {
        font-size: 13px;
        width: 15px;
    }
    
    .main-content {
        padding: 0.5rem;
    }
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Dashboard Welcome */
.dashboard-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.welcome-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.welcome-icon {
    font-size: 4rem;
    color: #4267B2;
    margin-bottom: 1.5rem;
}

.welcome-card h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
}

.welcome-card p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Account Page Styles */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.account-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: #4267B2;
}

.card-description {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* Form Styles */
.add-page-form {
    padding: 1.5rem;
}

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

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-label i {
    color: #6b7280;
    font-size: 0.8rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4267B2;
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #365899 0%, #2d4373 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 103, 178, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Pages List */
.pages-list {
    padding: 1.5rem;
}

.page-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.page-item:hover {
    border-color: #cbd5e1;
}

.page-item:last-child {
    margin-bottom: 0;
}

.page-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.page-details {
    flex: 1;
}

.page-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.page-id {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.page-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-token {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.page-token .form-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background: #f8fafc;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    margin: 0;
    line-height: 1.5;
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
}

/* Responsive Design for Account Page */
@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .page-actions {
        justify-content: center;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .add-page-form,
    .pages-list {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .page-item {
        padding: 1rem;
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
    
    .form-input,
    .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Facebook Connect Styles */
.facebook-connect {
    text-align: center;
    padding: 1.5rem;
}

.connect-description {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-facebook {
    background: #1877f2;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
    color: white;
    text-decoration: none;
}

.connect-help {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: left;
}

.connect-help small {
    color: #64748b;
    line-height: 1.5;
}

/* Upload progress bar */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb; /* gray-200 */
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #dc2626; /* red-600 for YouTube */
    transition: width 0.2s ease;
}
.progress-text {
    min-width: 40px;
    font-size: 12px;
    color: #4b5563; /* gray-600 */
    text-align: right;
}