html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4F46E5;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background-color: #FDFDFB;
}

/* ========================================
   MODERN SIDEBAR STYLES
   ======================================== */

.modern-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-item .nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
    color: #6B7280;
}

.nav-item .nav-link:hover {
    background: #F3F4F6;
    color: #111827;
}

.nav-item .nav-link:hover i {
    color: #4F46E5;
}

.nav-item .nav-link.active {
    background: #4F46E5;
    color: #FFFFFF;
}

.nav-item .nav-link.active i {
    color: #FFFFFF;
}

.sidebar-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #E5E7EB;
}

.sidebar-footer .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.sidebar-footer .nav-link:hover {
    background: #F3F4F6;
    color: #6B7280;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 24px;
    width: 24px;
    height: 24px;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    background: #fff;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.sidebar-toggle:hover {
    background: #F3F4F6;
    color: #111827;
}

.logo-icon {
    display: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: #4F46E5;
}

/* Sidebar Collapsed State */
.modern-sidebar.collapsed {
    width: 70px;
}

.modern-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.modern-sidebar.collapsed .logo-text {
    display: none;
}

.modern-sidebar.collapsed .logo-icon {
    display: block;
}

.modern-sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.modern-sidebar.collapsed .nav-link span,
.modern-sidebar.collapsed .sidebar-footer .nav-link span {
    display: none;
}

.modern-sidebar.collapsed .nav-item {
    margin: 0.25rem 0.5rem;
}

.modern-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.modern-sidebar.collapsed .nav-link i {
    font-size: 1.25rem;
    width: auto;
}

.modern-sidebar.collapsed .sidebar-footer .nav-link {
    justify-content: center;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #FDFDFB;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    color: #6B7280;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-menu-btn:hover {
    background: #F3F4F6;
    color: #111827;
}

/* Hide mobile menu button when sidebar is open */
.modern-sidebar.show ~ .mobile-menu-btn,
body:has(.modern-sidebar.show) .mobile-menu-btn {
    display: none;
}

/* Sidebar Close Button (mobile) */
.sidebar-close-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #9CA3AF;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sidebar-close-btn:hover {
    color: #111827;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .modern-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .modern-sidebar.show {
        transform: translateX(0);
    }

    .modern-sidebar.collapsed {
        width: 260px;
    }

    .sidebar-toggle {
        display: none;
    }

    .main-content,
    .main-content.expanded {
        margin-left: 0;
    }

    .dashboard-content {
        padding: .1rem;
        padding-top: 4rem;
    }

    /* Override collapsed state on mobile - always show full sidebar with text */
    .modern-sidebar.collapsed .nav-link span,
    .modern-sidebar.collapsed .sidebar-footer .nav-link span {
        display: inline !important;
    }

    .modern-sidebar.collapsed .nav-link {
        justify-content: flex-start !important;
        padding: 0.75rem 1rem !important;
    }

    .modern-sidebar.collapsed .nav-item {
        margin: 0.25rem 0.75rem !important;
    }

    .modern-sidebar.collapsed .logo-text {
        display: block !important;
    }

    .modern-sidebar.collapsed .logo-icon {
        display: none !important;
    }

    .modern-sidebar.collapsed .sidebar-logo {
        justify-content: flex-start !important;
    }

    .modern-sidebar.collapsed .sidebar-footer .nav-link {
        justify-content: flex-start !important;
    }
}

/* ========================================
   END SIDEBAR STYLES
   ======================================== */

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Homepage Hero Section - Unified Theme */
.homepage-hero {
    padding: 1.25rem 2rem 0.75rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.3px;
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Stats Strip */
.stats-strip {
    padding: 0 0.5rem 0.35rem 0.5rem;
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;

    padding: 0.1rem 0.4rem;

    background: #ffffff;
    border-radius: 14px;

    /* modern SaaS shadow */
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.06);

    max-width: 520px;
    margin: 0 auto;

    transition: all 0.2s ease;
}

.stats-container:hover {
    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 8px 20px rgba(0,0,0,0.08);
}

/* remove uppercase noisy label */
.stats-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
}

.stats-items {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* strong stat number (modern SaaS emphasis) */
.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* softer label */
.stat-name {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* remove dividers completely for modern look */
.stat-divider,
.stat-separator {
    display: none;
}

.stats-microcopy {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 0.4rem;
    margin-bottom: 0.2rem;
}

/* mobile */
@media (max-width: 767px) {

    .stats-container {
        gap: 1.5rem;
        padding: 0.8rem 1rem;
        border-radius: 12px;
    }

    .stats-items {
        gap: 1.4rem;
    }

    .stat-value {
        font-size: 1rem;
    }
}


/* Modern Card Styles - Unified Theme */
.hover-card {
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
}

/* Subtle hover effect */
.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #E5E7EB;
}

/* Card accent on hover - left border */
.hover-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4F46E5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hover-card:hover::before {
    opacity: 1;
}

/* Card icon - unified style */
.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.08);
    transition: all 0.2s ease;
}

.card-icon i {
    color: #4F46E5;
    font-size: 1.25rem;
}

/* Card title styling */
.card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.hover-card:hover .card-title a {
    color: #4F46E5;
}

/* Card text */
.card-text {
    color: #6B7280;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Post details in cards */
.post-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-platforms {
    font-size: 0.8125rem;
    color: #6B7280;
    margin-bottom: 0.25rem;
}

.post-time {
    font-size: 0.8125rem;
    color: #9CA3AF;
    margin-bottom: 0.75rem;
}

.post-performance-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4F46E5;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.2s ease;
}

.post-performance-link:hover {
    color: #3730A3;
}

.post-performance-link i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.post-performance-link:hover i {
    transform: translateX(3px);
}

/* Accessibility: Focus state for keyboard navigation */
.hover-card:focus-within {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
    border-color: #4F46E5;
}

.card-title a:focus {
    outline: none;
}

.dashboard-content {
    padding: 0 0.2rem 0.2rem 0.2rem;
}

.hover-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: .1rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 16px;
    pointer-events: none;
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
}

.hover-card .card-body {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hover-card h3 {
    color: #667eea;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hover-card p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.hover-card .btn,
.hover-card a.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none !important;
    display: inline-block;
    margin-top: 1rem;
}

.hover-card .btn:hover,
.hover-card a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

/* If you have icons in the cards */
.hover-card i,
.hover-card .bi {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* If you have lists in the cards */
.hover-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.hover-card ul li {
    padding: 0.5rem 0;
    color: #4a5568;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}

.hover-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .homepage-hero {
        padding: 1rem .5rem 0.5rem .5rem;
    }

    .dashboard-content {
        padding: 0 .5rem .5rem .5rem;
    }
    
    .hover-card {
        padding: .1rem;
    }
    
    .hover-card .card-body {
        padding: .25rem;
    }
    
    .hover-card h3 {
        font-size: 1.15rem;
    }
    
    .hover-card p {
        font-size: 0.9rem;
    }
    
    .hover-card .btn,
    .hover-card a.btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.375rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .hover-card {
        padding: .01rem;
        border-radius: 6px;
    }
    
    .hover-card .card-body {
        padding: .5rem;
        border-radius: 10px;
    }
    
    .hover-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .hover-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .hover-card i,
    .hover-card .bi {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .hover-card ul li {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }
    
    .hover-card .btn,
    .hover-card a.btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin-top: 0.85rem;
    }

    .hover-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .hover-card {
        padding: 0.3rem;
    }
    
    .hover-card .card-body {
        padding: 0.3rem;
    }
    
    .hover-card h3 {
        font-size: 1.05rem;
    }
    
    .hover-card p {
        font-size: 0.82rem;
    }
    
    .hover-card .btn,
    .hover-card a.btn {
        font-size: 0.82rem;
        padding: 0.55rem 1rem;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .hover-card {
        padding: .1rem;
    }
    
    .hover-card .card-body {
        padding: .75rem;
    }
    
    .hover-card h3 {
        font-size: 1.35rem;
    }
    
    .hover-card p {
        font-size: 1rem;
    }
    
    .hover-card .btn,
    .hover-card a.btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }
}
.trending-section {
    padding: 0.05rem 0.05rem;
}

.trending-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 0.9rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    max-height: 42vh;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.trending-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 16px;
    pointer-events: none;
}

.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.trending-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: white;
    letter-spacing: -0.02em;
}

.category-dropdown {
    padding: 0.55rem 0.95rem;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    font-size: 0.85rem;
    background: #fafafa;
    font-weight: 500;
    color: #18181b;
    transition: all 0.15s ease;
}

.category-dropdown:hover {
    background: #ffffff;
    border-color: #d4d4d8;
}

.category-dropdown:focus {
    outline: none;
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}



.custom-category-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.custom-category-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.custom-category-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.custom-category-btn:hover {
    background: white;
    border-color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.custom-category-btn:active {
    transform: translateY(0);
}

.trending-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.trending-header h2 {
    margin: 0;
    flex-shrink: 0;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    transition: opacity 0.3s ease;
}

.platform-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.15rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 0;
}

.platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: white;
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.78rem;
    color: #667eea;
    margin-bottom: 0.45rem;
    flex-shrink: 0;
}

.platform-header i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.platform-header span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topics-container {
    display: flex;
    flex-direction: column;
    gap: 0.20rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: 145px;
}

.topic-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    min-height: 26px;
    flex-shrink: 0;
    cursor: help;
    padding: 0.15rem 0;
}

.topic-row:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 4px;
}

.topic-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    overflow: hidden;
}

.topic-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    min-width: 0;
}

.topic-desc {
    font-size: 0.6rem;
    color: #718096;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    min-width: 0;
}

.topic-source {
    font-size: 0.6rem;
    color: #a0aec0;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.topic-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.read-btn {
    padding: 0.28rem 0.55rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.67rem;
    box-shadow: 0 2px 6px rgba(72, 187, 120, 0.3);
    white-space: nowrap;
    display: inline-block;
}

.read-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(72, 187, 120, 0.4);
    color: white !important;
    text-decoration: none !important;
}

.read-btn:visited,
.read-btn:active,
.read-btn:focus {
    color: white !important;
    text-decoration: none !important;
}

.post-btn {
    padding: 0.12rem 0.15rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.67rem;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    display: inline-block;
}

.post-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    color: white !important;
    text-decoration: none !important;
}

.post-btn:visited,
.post-btn:active,
.post-btn:focus {
    color: white !important;
    text-decoration: none !important;
}

#loadingIndicator {
    position: relative;
    z-index: 1;
    color: white;
}

/* Tablet Optimization (iPad, Surface) */
@media (max-width: 1024px) and (min-width: 768px) {
    .trending-container {
        max-height: 38vh;
        min-height: 340px;
        padding: 1.1rem 1.1rem;
    }
    
    .trending-header h2 {
        font-size: 1.05rem;
    }
    
    .category-dropdown {
        font-size: 0.78rem;
    }
    
    .platform-grid {
        gap: 0.5rem;
    }
    
    .platform-card {
        padding: 0.5rem;
    }
    
    .platform-header {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .platform-header i {
        font-size: 1rem;
    }
    
    .topic-row {
        min-height: 24px;
    }
    
    .topic-text {
        font-size: 0.72rem;
    }
    
    .post-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Small Tablet / Large Phone */
@media (max-width: 767px) and (min-width: 481px) {
    .trending-section {
        padding: 0.2rem 0.2rem;
        margin-bottom: 2rem;
    }

    .trending-container {
        padding: 0.6rem;
        max-height: none;
        min-height: auto;
    }
    
    .trending-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .trending-header h2 {
        font-size: 1.1rem;
    }
    
    .category-dropdown {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    .platform-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-height: none;
        overflow: visible;
    }
    
    .platform-card {
        padding: 0.85rem;
        max-height: none;
        overflow: visible;
    }
    
    .platform-header {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .platform-header i {
        font-size: 1.1rem;
    }
    
    .topics-container {
        gap: 0.45rem;
        max-height: none;
        overflow: visible;
    }
    
    .topic-row {
        padding: 0.35rem 0;
        min-height: 28px;
        grid-template-columns: 1fr auto;
    }
    
    .topic-text {
        font-size: 0.82rem;
        line-height: 1.4;
    }
    
    .post-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.7rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .trending-section {
        padding: 0.5rem 0.75rem;
        margin-bottom: 2rem;
    }

    .trending-container {
        padding: 0.6rem ;
        max-height: none;
        min-height: auto;
        border-radius: 12px;
    }
    
    .trending-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .trending-header h2 {
        font-size: 1.05rem;
    }
    
    .category-dropdown {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .platform-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-height: none;
        overflow: visible;
    }
    
    .platform-card {
        padding: 0.85rem;
        border-radius: 10px;
        max-height: none;
        overflow: visible;
    }
    
    .platform-header {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .platform-header i {
        font-size: 1.1rem;
    }
    
    .topics-container {
        gap: 0.45rem;
        max-height: none;
        overflow: visible;
    }
    
    .topic-row {
        padding: 0.35rem 0;
        min-height: 30px;
        gap: 0.6rem;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
    }
    
    .topic-text {
        font-size: 0.82rem;
        line-height: 1.4;
        word-break: break-word;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .post-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.65rem;
        border-radius: 6px;
        min-width: 85px;
        align-self: start;
    }
}

/* Extra Small Phones */
@media (max-width: 375px) {
    .trending-container {
        padding: 0.9rem     0.9rem;
    }
    
    .trending-header h2 {
        font-size: 1rem;
    }
    
    .category-dropdown {
        font-size: 0.82rem;
        padding: 0.48rem 0.7rem;
    }
    
    .platform-grid {
        gap: 0.7rem;
    }
    
    .platform-card {
        padding: 0.8rem;
    }
    
    .platform-header {
        font-size: 0.88rem;
    }
    
    .platform-header i {
        font-size: 1.05rem;
    }
    
    .topic-row {
        min-height: 32px;
    }
    
    .topic-text {
        font-size: 0.8rem;
    }
    
    .post-btn {
        font-size: 0.76rem;
        padding: 0.38rem 0.6rem;
        min-width: 80px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .trending-container {
        max-height: 80vh;
        min-height: auto;
    }
    
    .trending-header {
        flex-direction: row;
        margin-bottom: 0.5rem;
    }
    
    .category-dropdown {
        width: auto;
    }
    
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .trending-container {
        max-height: 26vh;
        min-height: 360px;
        padding: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .trending-header h2 {
        font-size: 1.25rem;
    }
    
    .category-dropdown {
        font-size: 0.85rem;
        padding: 0.4rem 0.85rem;
    }
    
    .platform-grid {
        gap: 0.65rem;
    }
    
    .platform-card {
        padding: 0.2rem 0.5rem 0.1rem .8rem;
    }
    
    .platform-header {
        font-size: 0.82rem;
        margin-bottom: 0.2rem;
    }
    
    .platform-header i {
        font-size: 1.05rem;
    }
    
    .topic-row {
        min-height: 24px;
    }
    
    .topic-text {
        font-size: 0.72rem;
    }
    
    .post-btn {
        font-size: 0.72rem;
        padding: 0.32rem 0.65rem;
    }
}

/* ===================================
   MODERN ADDITIONS - Animations & Utilities
   =================================== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

.fade-out {
    animation: fadeIn 0.3s ease-out reverse;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* Toast Notifications */
.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 500px;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

/* Loading Spinner */
.spinner-modern {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(67, 163, 221, 0.2);
    border-top-color: #43A3DD;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #d3d3d3;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hover-lift {
    transition: transform 0.3s, box-shadow 0.3s;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cursor-pointer {
    cursor: pointer;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-draft {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Action Buttons */
.btn-action {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-action i {
    margin-right: 0.25rem;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-action-primary {
    background: linear-gradient(135deg, #43A3DD, #2E7BA8);
    color: white;
}

.btn-action-primary:hover {
    box-shadow: 0 4px 12px rgba(67, 163, 221, 0.4);
}

.btn-action-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-action-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F7F7F7;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-action-buttons {
        grid-template-columns: 1fr;
    }
}
