/* EUC Content Hub - Refined Modern Theme */
/* Keeps card layout, adds polish and sophistication */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Refined AWS Color Palette */
    --primary-color: #16191f;
    --primary-light: #232f3e;
    --secondary-color: #ff9900;
    --secondary-dark: #ec8b00;
    --accent-blue: #0073bb;
    --accent-teal: #00a1c9;
    
    /* Sophisticated Neutrals */
    --text-color: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e0;
    
    /* Enhanced Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 12px -4px rgba(0, 0, 0, 0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   HEADER - Refined & Balanced
   ============================================ */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 48px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, #2a3f54 100%);
    color: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-teal) 100%);
}

header h1 {
    font-size: 2.75rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.92;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   WHAT'S NEW CHIRON (News Ticker)
   ============================================ */
.whats-new-chiron {
    display: flex;
    align-items: stretch;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    height: 40px;
    box-shadow: var(--shadow-sm);
}

.chiron-label {
    display: flex;
    align-items: center;
    background: #FF9900;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0 16px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.chiron-track-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.chiron-track {
    display: flex;
    white-space: nowrap;
    animation: chiron-scroll 35s linear infinite;
    align-items: center;
    height: 100%;
}

.whats-new-chiron:hover .chiron-track {
    animation-play-state: paused;
}

.chiron-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    flex-shrink: 0;
}

.chiron-item .service-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

/* Service badge colors */
.service-badge.workspaces-personal { background: #2196F3; }
.service-badge.workspaces-applications { background: #4CAF50; }
.service-badge.workspaces-core { background: #9C27B0; }
.service-badge.workspaces-secure-browser { background: #FF5722; }
.service-badge.workspaces-thin-client { background: #607D8B; }
.service-badge.appstream { background: #E91E63; }
.service-badge.dcv { background: #00BCD4; }

.chiron-title {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.chiron-title:hover {
    text-decoration: underline;
    color: #fff;
}

.chiron-date {
    color: #718096;
    font-size: 0.75rem;
    white-space: nowrap;
}

.chiron-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    flex-shrink: 0;
}

.chiron-speed-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.chiron-speed-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

@keyframes chiron-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================================
   ANALYTICS CHARTS - Refined
   ============================================ */
.analytics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.chart-container {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.chart-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-hover);
}

.chart-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
    text-align: center;
    letter-spacing: -0.2px;
}

.chart-container canvas {
    max-height: 250px;
}

/* ============================================
   SEARCH & FILTERS - Refined
   ============================================ */
.search-section {
    margin-bottom: 32px;
}

#searchInput {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

#searchInput:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.filtered-count {
    background: var(--secondary-color);
    color: white;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

select, .btn-secondary {
    padding: 14px 24px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

select:hover, .btn-secondary:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border-color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #d67a00 100%);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.4);
    transform: translateY(-4px) scale(1.05);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   STATS CARDS - Refined
   ============================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.stat-card:active {
    transform: translateY(-4px) scale(0.98);
}

.stat-card.active {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
    box-shadow: var(--shadow-md);
}

.stat-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================
   POST CARDS - Refined & Modern
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.post-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.post-card:active {
    transform: translateY(-4px) scale(0.99);
}

.post-card.vote-success {
    animation: cardGlow 1s ease-out;
}

@keyframes cardGlow {
    0%, 100% { box-shadow: var(--shadow); }
    50% { 
        box-shadow: 0 0 24px rgba(76, 175, 80, 0.5);
        transform: translateY(-6px);
    }
}

.post-title {
    font-size: 1.3125rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-color);
    line-height: 1.4;
    flex: 1;
    letter-spacing: -0.3px;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--accent-blue);
}

/* Label Badges - Refined */
.label-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 0.2px;
}

.label-announcement { background: #e3f2fd; color: #1565c0; }
.label-best-practices { background: #e8f5e9; color: #2e7d32; }
.label-technical-how-to { background: #fff3e0; color: #e65100; }
.label-thought-leadership { background: #f3e5f5; color: #6a1b9a; }
.label-customer-story { background: #e0f2f1; color: #00695c; }
.label-curation { background: #fbe9e7; color: #bf360c; }

/* Post Meta - Refined */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    font-size: 1rem;
}

/* Post Summary - Refined */
.post-summary {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Vote Section - Refined */
.vote-section {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.vote-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.vote-btn {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.9375rem;
}

.vote-btn:hover:not(.disabled) {
    border-color: var(--secondary-color);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.vote-btn:active:not(.disabled) {
    transform: translateY(-1px) scale(0.98);
}

.vote-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.love-btn {
    border-color: #fce4ec;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    font-size: 1.125rem;
}

.love-btn:hover:not(.disabled) {
    border-color: #f06292;
    background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 100%);
    box-shadow: 0 6px 20px rgba(240, 98, 146, 0.3);
    transform: translateY(-4px) scale(1.08);
}

.love-btn.loved {
    border-color: #e91e63;
    background: linear-gradient(135deg, #f06292 0%, #ec407a 100%);
    color: white;
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1.05); }
    75% { transform: scale(1.12); }
}

/* ============================================
   LOADING & STATES
   ============================================ */
.loading {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    header {
        padding: 32px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .analytics-section {
        grid-template-columns: 1fr;
    }

    .whats-new-chiron {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
        height: 36px;
    }

    .chiron-label {
        font-size: 0.7rem;
        padding: 0 10px;
    }

    .chiron-title {
        font-size: 0.78rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS - Lively & Playful
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(2px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.post-card {
    animation: slideInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Stagger animation for cards */
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

/* Button press effect */
button:active, .btn-secondary:active, .vote-btn:active:not(.disabled) {
    animation: none !important;
}

/* Hover wiggle for interactive elements */
.stat-card:hover {
    animation: wiggle 0.5s ease-in-out;
}

/* Pulse animation for important buttons */
.btn-secondary {
    animation: pulse 2s ease-in-out infinite;
}

.btn-secondary:hover {
    animation: none;
}

/* Chart containers entrance */
.chart-container {
    animation: fadeIn 0.5s ease-out;
}

.chart-container:nth-child(1) { animation-delay: 0.1s; }
.chart-container:nth-child(2) { animation-delay: 0.2s; }
.chart-container:nth-child(3) { animation-delay: 0.3s; }
.chart-container:nth-child(4) { animation-delay: 0.4s; }
.chart-container:nth-child(5) { animation-delay: 0.5s; }

/* Stat cards entrance */
.stat-card {
    animation: slideInBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }
.stat-card:nth-child(7) { animation-delay: 0.35s; }


/* ============================================
   HEADER BUTTONS - Auth & Propose Article
   ============================================ */
.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

#authContainer button {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

#authContainer button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#authContainer button:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-propose-article {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-propose-article:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.btn-propose-article:active {
    transform: translateY(-1px) scale(0.98);
}

.propose-icon {
    font-size: 1.25rem;
}

/* ============================================
   PROPOSALS DROPDOWN
   ============================================ */
.proposals-dropdown {
    position: relative;
    display: inline-block;
}

.proposals-dropdown-btn {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.proposals-dropdown-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.proposals-dropdown-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.proposals-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.proposals-dropdown-menu.show {
    display: block;
}

.proposals-dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    background: none;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.proposals-dropdown-menu .dropdown-item:hover {
    background: #f0f0ff;
    color: #667eea;
}

.proposals-dropdown-menu .dropdown-item + .dropdown-item {
    border-top: 1px solid #eee;
}

/* ============================================
   POST ACTION BUTTONS - Bookmark & Cart
   ============================================ */
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bookmark-btn, .cart-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bookmark-btn:hover, .cart-btn:hover {
    transform: translateY(-4px) scale(1.15) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.bookmark-btn:active, .cart-btn:active {
    transform: translateY(-1px) scale(0.95) rotate(0deg);
    animation: buttonPop 0.3s ease-out;
}

.bookmark-btn.bookmarked {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
    animation: bookmarkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-btn.in-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
    color: white;
    animation: cartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bookmarkPop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.25) rotate(-5deg); }
}

@keyframes cartPop {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.25) translateY(-5px); }
    50% { transform: scale(1.1) translateY(-2px); }
    75% { transform: scale(1.2) translateY(-3px); }
}

@keyframes buttonPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

.bookmark-icon, .cart-icon {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.bookmark-btn:hover .bookmark-icon,
.cart-btn:hover .cart-icon {
    transform: scale(1.2);
}

/* ============================================
   POST HEADER - Title & Actions Layout
   ============================================ */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.post-title {
    flex: 1;
}

/* ============================================
   RESOLVE BUTTONS
   ============================================ */
.resolve-btn, .unresolve-btn {
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resolve-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.resolve-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.unresolve-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.resolve-btn:active, .unresolve-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   COMMENT BADGE - Clickable
   ============================================ */
.comment-badge {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--bg-hover);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.comment-badge:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.comment-badge:active {
    transform: translateY(0) scale(0.98);
}

.comment-badge.has-comments {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.comment-badge.has-comments:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

/* ============================================
   RESPONSIVE - Header Buttons
   ============================================ */
@media (max-width: 768px) {
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    #authContainer button,
    .btn-propose-article,
    .proposals-dropdown {
        width: 100%;
        justify-content: center;
    }

    .proposals-dropdown-btn {
        width: 100%;
        justify-content: center;
    }

    .proposals-dropdown-menu {
        left: 0;
        right: 0;
    }
}


/* ============================================
   LABEL FILTER BUTTONS - Updated
   ============================================ */
.label-filters-section {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.label-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.label-filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
    font-size: 0.9375rem;
}

.label-filter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.label-filter-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.label-filter-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Active state colors for each label */
.label-filter-btn[data-label="all"].active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary-color);
}

.label-filter-btn[data-label="Announcement"].active {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: white;
    border-color: #1976D2;
}

.label-filter-btn[data-label="Best Practices"].active {
    background: linear-gradient(135deg, #388E3C 0%, #2E7D32 100%);
    color: white;
    border-color: #388E3C;
}

.label-filter-btn[data-label="Curation"].active {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    color: white;
    border-color: #F57C00;
}

.label-filter-btn[data-label="Customer Story"].active {
    background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%);
    color: white;
    border-color: #7B1FA2;
}

.label-filter-btn[data-label="Technical How-To"].active {
    background: linear-gradient(135deg, #00796B 0%, #00695C 100%);
    color: white;
    border-color: #00796B;
}

.label-filter-btn[data-label="Thought Leadership"].active {
    background: linear-gradient(135deg, #C2185B 0%, #AD1457 100%);
    color: white;
    border-color: #C2185B;
}

.label-filter-count {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 700;
}

.label-filter-btn.active .label-filter-count {
    background: rgba(255, 255, 255, 0.3);
}

.label-filter-clear {
    padding: 12px 20px;
    border: 2px solid #f44336;
    border-radius: 10px;
    background: white;
    color: #f44336;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 700;
    font-size: 0.9375rem;
}

.label-filter-clear:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

.label-filter-clear:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   USER PROFILE BUTTON - Fixed
   ============================================ */
.user-profile {
    position: relative;
}

.user-profile button {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-profile button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.user-profile button:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   ZOOM MODE BUTTON - Match Cart/Bookmark Size
   ============================================ */
#zoomModeBtn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

#zoomModeBtn:hover {
    transform: translateY(-4px) scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

#zoomModeBtn:active {
    transform: translateY(-1px) scale(0.95) rotate(0deg);
    animation: buttonPop 0.3s ease-out;
}

#zoomModeBtn.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border-color: var(--secondary-color);
    color: white;
    animation: zoomPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomPop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(15deg); }
    50% { transform: scale(1.1) rotate(-10deg); }
    75% { transform: scale(1.25) rotate(5deg); }
}

/* ============================================
   RESPONSIVE - Label Filters
   ============================================ */
@media (max-width: 768px) {
    .label-filters {
        flex-direction: column;
    }
    
    .label-filter-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    #zoomModeBtn {
        bottom: 72px;
        right: 16px;
    }
}


/* ============================================
   MODAL STYLES - CRITICAL FOR PROFILE & LEGAL PAGES
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

/* Comment Form Footer */
.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.char-count {
    font-size: 0.85rem;
    color: #999;
}

.btn-submit-comment {
    padding: 10px 24px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-comment:hover:not(:disabled) {
    background: #ec8b00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-submit-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   COMMENT LIST & ITEMS - Refined Theme
   ============================================ */
.comment-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--secondary-color);
    animation: commentSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

/* Pending comment styling */
.comment-item.comment-pending {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.comment-status {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

.pending-notice {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.pending-notice strong {
    display: block;
    color: #e65100;
    margin-bottom: 6px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.pending-notice p {
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

@keyframes commentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.comment-author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9375rem;
}

/* Clickable username styling */
.clickable-username {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 4px;
}

.clickable-username:hover {
    color: var(--secondary-color);
    background: rgba(255, 153, 0, 0.1);
    transform: translateX(2px);
}

.comment-timestamp {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.comment-text {
    color: var(--text-color);
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9375rem;
}

.comment-form {
    border-top: 2px solid var(--border-color);
    padding-top: 24px;
    margin-top: 24px;
}

.comment-form textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.comment-form textarea::placeholder {
    color: var(--text-muted);
}

/* ============================================
   LOVE BUTTON - CRITICAL FIX
   ============================================ */
.love-section {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.love-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1rem;
    font-weight: 600;
}

.love-btn:not(.disabled):hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
    border-color: #E91E63;
    background: #FCE4EC;
}

.love-btn.loved {
    border-color: #E91E63;
    background: linear-gradient(135deg, #FCE4EC 0%, #ffffff 100%);
}

.love-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.love-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.love-btn:not(.disabled):hover .love-icon {
    transform: scale(1.2);
}

.love-btn.loved .love-icon {
    animation: heartBeat 0.6s ease-in-out;
}

.love-count {
    font-weight: 700;
    color: #E91E63;
    min-width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.loved-message {
    text-align: center;
    font-size: 0.85rem;
    color: #E91E63;
    font-weight: 600;
    margin-top: 8px;
}

/* ============================================
   CRAWL BUTTON - Match Reload Data Style
   ============================================ */
.btn-crawl {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-crawl:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-crawl:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-crawl.crawling {
    opacity: 0.7;
    cursor: wait;
}

.crawl-icon {
    font-size: 1.25rem;
}

.btn-crawl.crawling .crawl-icon {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   VOTE BUTTONS - Proper Styling
   ============================================ */
.vote-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.vote-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.vote-btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vote-btn.needs-update:not(.disabled):hover {
    border-color: #2196F3;
    background: #E3F2FD;
}

.vote-btn.remove-post:not(.disabled):hover {
    border-color: #f44336;
    background: #FFEBEE;
}

.vote-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-btn:not(.disabled):active {
    transform: scale(0.95);
}

.vote-btn.voting {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.vote-icon {
    font-size: 1.5rem;
}

.vote-label {
    font-weight: 600;
    color: var(--text-color);
}

.vote-count {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    transition: all 0.3s;
}

.vote-count.incrementing {
    animation: countPop 0.5s ease-out;
}

@keyframes countPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); background: #4CAF50; }
    100% { transform: scale(1); }
}

.voted-message {
    text-align: center;
    font-size: 0.85rem;
    color: #4CAF50;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE - Modal
   ============================================ */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .comment-form-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn-submit-comment {
        width: 100%;
    }
}


/* ============================================
   PROFILE MODAL - Match Refined Theme
   ============================================ */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9375rem;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    font-size: 0.8125rem;
    color: #666;
}

.streak-stats {
    background: var(--bg-hover);
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
    margin-bottom: 10px;
    border: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.streak-stats h3 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.profile-stats {
    background: var(--bg-hover);
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
    border: 2px solid var(--border-color);
}

.profile-stats h3 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Profile Modal Buttons */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 2px solid var(--border-color);
}

.btn-save-profile,
.btn-cancel {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-save-profile {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ec8b00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-save-profile:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5);
}

.btn-save-profile:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-cancel {
    background: white;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-cancel:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   CLICK ANIMATIONS - Love & Vote Buttons
   ============================================ */

/* Love button click animation */
.love-btn:not(.disabled):active {
    animation: lovePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lovePop {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1.05); }
}

/* When loved, trigger heartbeat */
.love-btn.loved {
    animation: heartBeat 0.6s ease-in-out;
}

/* Vote button click animation */
.vote-btn:not(.disabled):active {
    animation: votePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes votePop {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* Vote count animation when incrementing */
.vote-count.incrementing {
    animation: countBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countBounce {
    0% { transform: scale(1); }
    25% { transform: scale(1.4) translateY(-5px); background: #4CAF50; }
    50% { transform: scale(1.2) translateY(-2px); }
    75% { transform: scale(1.3) translateY(-3px); }
    100% { transform: scale(1); }
}

/* Love count animation */
.love-count.incrementing {
    animation: loveCountPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loveCountPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.5) rotate(-10deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.4) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Ripple effect on button click */
.vote-btn .ripple,
.love-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Amazon Email Verification Styles */
.verification-section {
    background: var(--bg-hover);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px solid var(--border-color);
}

.verification-section h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.verification-description {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.verification-status {
    margin-bottom: 15px;
}

.verification-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    border-left: 4px solid;
    transition: all 0.3s;
}

.verification-badge.verified {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-left-color: #4caf50;
}

.verification-badge.expired {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8f0 100%);
    border-left-color: #ff9800;
}

.verification-badge.unverified {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7fc 100%);
    border-left-color: #2196f3;
}

.verification-badge.revoked {
    background: linear-gradient(135deg, #ffebee 0%, #fff5f5 100%);
    border-left-color: #f44336;
}

.badge-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.badge-content {
    flex: 1;
}

.badge-title {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.badge-subtitle {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.4;
}

.verification-form {
    margin-top: 15px;
}

.verification-form .form-group {
    margin-bottom: 15px;
}

.verification-form .btn-primary {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.verification-form .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

.verification-form .btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.verification-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* ============================================
   DELETE ACCOUNT BUTTON - Danger Style
   ============================================ */
.btn-delete-account {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid #f44336;
    border-radius: 10px;
    background: white;
    color: #f44336;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 20px;
}

.btn-delete-account:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

.btn-delete-account:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   ACTIVITY VIEW - Card-Based Design
   ============================================ */
.activity-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activity-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.activity-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-tab:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.activity-tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1) 0%, rgba(255, 153, 0, 0.05) 100%);
}

.activity-tab-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.activity-tab.active .activity-tab-badge {
    background: white;
    color: var(--secondary-color);
}

.activity-tab-content {
    display: none;
}

.activity-tab-content.active {
    display: block;
}

.activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ============================================
   ACTIVITY ITEMS - Card Style
   ============================================ */
.activity-item {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow);
}

.activity-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-left-color: var(--primary-color);
}

.activity-item-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.activity-item-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s;
}

.activity-item-title:hover {
    color: var(--secondary-color);
}

.activity-item-date {
    font-size: 0.8125rem;
    color: #999;
    font-weight: 600;
}

.activity-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8125rem;
    color: #666;
    font-weight: 600;
}

.activity-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-hover);
    border-radius: 6px;
}

.activity-item-content {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-color);
    border-left: 3px solid var(--secondary-color);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1rem;
    font-weight: 600;
    background: var(--bg-hover);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.empty-state::before {
    content: '📭';
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
}

/* ============================================
   BACK TO PROFILE BUTTON
   ============================================ */
.btn-back-to-profile {
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.btn-back-to-profile:hover {
    background: var(--bg-hover);
    border-color: var(--secondary-color);
    transform: translateX(-4px);
}

.btn-back-to-profile:active {
    transform: translateX(-2px) scale(0.98);
}

/* ============================================
   VIEW ACTIVITY BUTTON
   ============================================ */
.btn-view-activity {
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 700;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    background: white;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-view-activity:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ec8b00 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
}

.btn-view-activity:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   RESPONSIVE - Activity View
   ============================================ */
@media (max-width: 768px) {
    .activity-list {
        grid-template-columns: 1fr;
    }
    
    .activity-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .activity-tab {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .activity-item {
        padding: 16px;
    }
}


/* ============================================
   BUTTON CLASSES - Primary & Danger (OVERRIDE)
   ============================================ */

/* Primary Button - Save Profile */
.btn-primary {
    padding: 12px 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border: 2px solid transparent !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ec8b00 100%) !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3) !important;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ec8b00 0%, #d67d00 100%) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5) !important;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98) !important;
}

.btn-primary:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Danger Button - Delete Account */
.btn-danger {
    padding: 12px 28px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border: 2px solid #f44336 !important;
    border-radius: 10px !important;
    background: white !important;
    color: #f44336 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5) !important;
}

.btn-danger:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* Form Actions Container */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Activity Stats in Profile */
.profile-stats {
    background: var(--bg-hover) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    margin-top: 10px !important;
    border: 2px solid var(--border-color) !important;
}

.profile-stats h3 {
    margin: 0 0 15px 0 !important;
    font-size: 1rem !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

.profile-stats ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-stats li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.profile-stats li:last-child {
    border-bottom: none;
}

.profile-stats .stat-label {
    font-weight: 600;
    color: var(--text-color);
}

.profile-stats .stat-value {
    font-weight: 700;
    color: var(--secondary-color);
    background: rgba(255, 153, 0, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

/* View Activity Button */
.btn-view-activity,
button[onclick*="showActivity"] {
    padding: 12px 24px !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    border: 2px solid var(--secondary-color) !important;
    border-radius: 10px !important;
    background: white !important;
    color: var(--secondary-color) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
}

.btn-view-activity:hover,
button[onclick*="showActivity"]:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ec8b00 100%) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4) !important;
}

.btn-view-activity:active,
button[onclick*="showActivity"]:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* Back to Profile Button */
button[onclick*="showProfileForm"] {
    padding: 10px 20px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: white !important;
    color: var(--text-color) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
}

button[onclick*="showProfileForm"]:hover {
    background: var(--bg-hover) !important;
    border-color: var(--secondary-color) !important;
    transform: translateX(-4px) !important;
}

button[onclick*="showProfileForm"]:active {
    transform: translateX(-2px) scale(0.98) !important;
}


/* ============================================
   PROFILE BUTTON ALIGNMENT - Move to Right
   ============================================ */
.user-profile {
    margin-left: auto !important;
}

/* Ensure header-right uses flexbox properly */
.header-right {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    margin-left: auto !important;
}


/* ============================================
   HEADER LAYOUT FIX - Proper Flexbox Alignment
   ============================================ */
header {
    text-align: left !important;
}

.header-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 32px !important;
}

.header-left {
    flex: 1 !important;
}

.header-right {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

#authContainer {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

/* User profile should not push left */
.user-profile {
    display: inline-flex !important;
}

/* Responsive header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
    }
    
    .header-left {
        text-align: center !important;
    }
    
    .header-right {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    #authContainer {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* ============================================
   HEADER ALIGNMENT FIX - Center text, buttons right
   ============================================ */
header {
    text-align: center !important;
    padding: 40px 20px !important;
}

.header-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 32px !important;
}

.header-left {
    flex: 1 !important;
    text-align: center !important;
}

.header-left h1 {
    margin: 0 !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

.header-left .subtitle {
    margin: 0 !important;
    font-size: 1.1rem !important;
    opacity: 0.9 !important;
}

.header-right {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

#authContainer {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

/* Responsive header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
    }
    
    .header-left {
        text-align: center !important;
    }
    
    .header-right {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    #authContainer {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* ============================================
   HEADER - SIMPLE CENTERED WITH BUTTONS RIGHT
   ============================================ */
header {
    text-align: center !important;
    margin-bottom: 40px !important;
    padding: 40px 20px !important;
    position: relative !important;
}

.header-content {
    display: block !important;
    position: relative !important;
}

.header-left {
    text-align: center !important;
}

.header-left h1 {
    font-size: 2.5rem !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
}

.header-left .subtitle,
.subtitle {
    font-size: 1.1rem !important;
    opacity: 0.9 !important;
}

.header-right {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
}

#authContainer {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

/* Responsive header */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem !important;
    }
    
    .header-right {
        position: static !important;
        flex-direction: column !important;
        margin-top: 20px !important;
    }
    
    #authContainer {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* ============================================
   SUBTITLE FIX - Center alignment
   ============================================ */
.header-left .subtitle,
.subtitle,
header .subtitle,
header p {
    text-align: center !important;
    font-size: 1.1rem !important;
    opacity: 0.9 !important;
    margin: 0 !important;
}


/* ============================================
   HEADER WIDTH FIX - Full width for centering
   ============================================ */
.header-content {
    display: block !important;
    position: relative !important;
    width: 100% !important;
}

.header-left {
    width: 100% !important;
    text-align: center !important;
    display: block !important;
}

.header-left h1 {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}

.header-left .subtitle {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}


/* ============================================
   HEADER ALIGNMENT - FINAL FIX
   Remove all conflicting rules and center everything properly
   ============================================ */
.header-content,
.header-left {
    display: block !important;
    width: 100% !important;
    text-align: inherit !important;
}

header h1,
.header-left h1 {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

header p,
header .subtitle,
.header-left p,
.header-left .subtitle {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* ============================================
   FINAL HEADER ALIGNMENT FIX - Feb 23, 2026
   Force both title and subtitle to center to same point
   ============================================ */
header {
    position: relative !important;
}

.header-content {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}

.header-left {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

header h1,
.header-left h1 {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    display: block !important;
}

header p,
header .subtitle,
.header-left p,
.header-left .subtitle {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    display: block !important;
}

.header-right {
    position: absolute !important;
    top: 20px !important;
    right: 32px !important;
    display: flex !important;
    gap: 16px !important;
    z-index: 10 !important;
}

@media (max-width: 768px) {
    .header-right {
        position: static !important;
        margin-top: 20px !important;
        justify-content: center !important;
    }
}


/* ============================================
   VISUAL CENTERING FIX - Feb 23, 2026
   Add equal padding on both sides for true visual center
   ============================================ */
header {
    position: relative !important;
    padding-left: 320px !important;
    padding-right: 320px !important;
}

header h1,
header .subtitle,
header p {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.header-content,
.header-left {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.header-right {
    position: absolute !important;
    top: 20px !important;
    right: 32px !important;
    display: flex !important;
    gap: 16px !important;
    z-index: 10 !important;
}

@media (max-width: 1024px) {
    header {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
    
    .header-right {
        position: static !important;
        margin-top: 20px !important;
        justify-content: center !important;
    }
}


/* ============================================
   PERFECT ALIGNMENT FIX - Feb 23, 2026
   Remove max-width constraint on subtitle
   ============================================ */
header .subtitle,
.header-left .subtitle,
.subtitle {
    max-width: none !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

header h1 {
    max-width: none !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}


/* ============================================
   GRADIENT BACKGROUND - Feb 23, 2026
   Add personality with subtle gradient backdrop
   ============================================ */
body {
    background: linear-gradient(135deg, 
        #1a2332 0%,
        #2a3f54 25%,
        #3a5a78 50%,
        #2a3f54 75%,
        #1a2332 100%
    ) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

/* Ensure container doesn't override */
.container {
    background: transparent !important;
}

/* Make cards stand out more with enhanced shadows */
.post-card,
.chart-container,
.stat-card,
.label-filters-section {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.post-card:hover,
.chart-container:hover,
.stat-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Enhance header to blend with gradient */
header {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}


/* ============================================
   PROPOSE ARTICLE MODAL - Refined Theme Update
   ============================================ */
.proposal-intro {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    margin-bottom: 24px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.proposal-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
}

.form-group textarea,
.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.form-group small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.btn-submit-proposal {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-submit-proposal:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.4);
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #d67a00 100%);
}

.btn-submit-proposal:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-submit-proposal:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.proposal-result {
    animation: slideInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    margin-bottom: 24px;
}

.result-success h3 {
    color: #2e7d32;
    margin-bottom: 8px;
}

.success-message {
    color: var(--text-secondary);
    margin: 0;
}

.proposal-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    background: var(--bg-color);
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.result-category {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.result-outline {
    margin-left: 20px;
    line-height: 1.8;
}

.result-outline li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.result-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-topics span {
    padding: 6px 12px;
    background: var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-color);
}

.proposal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.proposal-actions button {
    flex: 1;
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.proposal-actions .btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    border-color: var(--secondary-color);
}

.proposal-actions .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
}

.proposal-actions .btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.proposal-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
    margin-top: 24px;
    font-size: 0.875rem;
    line-height: 1.6;
}

.proposal-note strong {
    color: var(--primary-color);
}

/* Modal Large variant */
.modal-large .modal-content {
    max-width: 900px;
}


/* ============================================
   STICKY SIDEBAR LAYOUT - Feb 23, 2026
   Left: Filter stats, Right: Label filters, Center: Content
   ============================================ */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    align-items: start;
}

.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.sidebar-left::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-left::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-left::-webkit-scrollbar-thumb:hover,
.sidebar-right::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Left Sidebar - Stats as vertical list */
.sidebar-left .stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.sidebar-left .stat-card {
    padding: 16px 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-left .stat-card .stat-number {
    font-size: 1.75rem;
    min-width: 50px;
}

.sidebar-left .stat-card .stat-label {
    font-size: 0.875rem;
    text-align: left;
    text-transform: none;
}

/* Right Sidebar - Label filters vertical */
.sidebar-right .label-filters-section {
    margin: 0;
}

.sidebar-right .label-filters {
    flex-direction: column;
    gap: 10px;
}

.sidebar-right .label-filter-btn {
    width: 100%;
    justify-content: space-between;
}

/* Center Content */
.main-content {
    min-width: 0;
}

/* Search section stays in center */
.main-content .search-section {
    margin-bottom: 24px;
}

/* Hide original horizontal stats and label sections */
body:has(.content-wrapper) .stats:not(.sidebar-left .stats),
body:has(.content-wrapper) .label-filters-section:not(.sidebar-right .label-filters-section) {
    display: none !important;
}

/* Responsive - Stack on smaller screens */
@media (max-width: 1400px) {
    .content-wrapper {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left,
    .sidebar-right {
        position: static;
        max-height: none;
    }
    
    .sidebar-left .stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .sidebar-left .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar-right .label-filters {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-right .label-filter-btn {
        width: auto;
    }
}

/* Sidebar headers */
.sidebar-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}


/* ============================================
   COMPACT SIDEBAR LAYOUT - Feb 23, 2026
   Narrower sidebars for 2-column post grid
   ============================================ */
.content-wrapper {
    grid-template-columns: 220px 1fr 260px !important;
    gap: 20px !important;
}

/* Compact left sidebar */
.sidebar-left .stat-card {
    padding: 12px 16px !important;
}

.sidebar-left .stat-card .stat-number {
    font-size: 1.5rem !important;
    min-width: 40px !important;
}

.sidebar-left .stat-card .stat-label {
    font-size: 0.8125rem !important;
}

/* Compact right sidebar */
.sidebar-right .label-filter-btn {
    padding: 10px 16px !important;
    font-size: 0.875rem !important;
}

.sidebar-header {
    font-size: 1rem !important;
    padding: 10px 14px !important;
    margin-bottom: 12px !important;
}

/* Two-column post grid */
.posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
}

/* Compact post cards */
.post-card {
    padding: 24px !important;
}

.post-title {
    font-size: 1.125rem !important;
}

/* Responsive adjustments */
@media (max-width: 1600px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr 240px !important;
    }
}

@media (max-width: 1400px) {
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    }
}


/* ============================================
   POST TAGS STYLING - Feb 23, 2026
   Make tags look like actual tags
   ============================================ */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-tags .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #90caf9;
    transition: all 0.2s ease;
    cursor: default;
}

.post-tags .tag:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.post-tags .tag::before {
    content: '🏷️';
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Special styling for "+X more" tag */
.post-tags .tag:last-child:not(:first-child) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
    border-color: #ce93d8;
}

.post-tags .tag:last-child:not(:first-child)::before {
    content: '➕';
}

.post-tags .tag:last-child:not(:first-child):hover {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
}


/* ============================================
   SERVICE NAME CHANGE BADGE - Feb 23, 2026
   Compact button with CSS tooltip for renamed services
   Positioned in bottom-right of each post card
   ============================================ */

/* Ensure parent card doesn't clip tooltip and raises z-index on hover */
.post-card:has(.service-name-btn:hover) {
    z-index: 1000 !important;
    overflow: visible !important;
}

.service-name-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    cursor: help;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(255, 153, 0, 0.2);
}

.service-name-btn:hover {
    transform: translateY(-4px) scale(1.15) rotate(180deg);
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
    border-color: var(--secondary-dark);
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    z-index: 1001; /* Increase z-index on hover to ensure tooltip is on top */
}

.service-name-btn:active {
    transform: translateY(-1px) scale(0.95) rotate(0deg);
}

/* CSS Tooltip - Counter-rotate to stay upright */
.service-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px) rotate(0deg);
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    font-size: 0.8125rem;
    white-space: nowrap;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 8px;
}

.service-tooltip strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.service-tooltip em {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.service-name-btn:hover .service-tooltip {
    visibility: visible;
    opacity: 1;
    /* Counter-rotate the tooltip to keep it upright when button rotates */
    transform: translateX(-50%) translateY(0) rotate(-180deg);
}

/* Tooltip arrow */
.service-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--secondary-color);
}



/* ============================================
   USER PROFILE POPUP - Refined Theme
   ============================================ */
.user-profile-popup {
    position: fixed;
    z-index: 10000;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 0;
    min-width: 300px;
    max-width: 340px;
    animation: popupFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid var(--border-color);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-popup-content {
    padding: 24px;
}

.profile-popup-loading {
    text-align: center;
    padding: 30px 20px;
}

.profile-popup-loading .spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.profile-popup-loading p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-popup-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.profile-popup-avatar {
    font-size: 36px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.profile-popup-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 1;
    letter-spacing: -0.3px;
}

.profile-popup-bio {
    margin-bottom: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.credly-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ff6b00 0%, #e55f00 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.credly-badge-link:hover {
    background: linear-gradient(135deg, #e55f00 0%, #cc5500 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.builder-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(35, 47, 62, 0.3);
}

.builder-profile-link:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.profile-popup-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-popup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 2px solid var(--border-color);
}

.profile-popup-stat {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-popup-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.profile-popup-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.profile-popup-stat .stat-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-popup-error {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-profile-popup {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        max-width: 90%;
    }
}

/* KB Contributor Leaderboard */
.kb-leaderboard-list {
    padding: 8px 0;
}

.kb-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    overflow: hidden;
}

.kb-leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.kb-leaderboard-rank {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.kb-leaderboard-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-leaderboard-stats {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.kb-leaderboard-stats span {
    white-space: nowrap;
}

.kb-leaderboard-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}


/* ============================================
   PROPOSALS REVIEW MODAL & CARDS
   ============================================ */

/* Modal overlay */
.proposals-review-modal {
    align-items: center;
    justify-content: center;
}

.proposals-review-content {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* Filter Tabs */
.proposals-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.filter-tab {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--secondary-color);
    color: var(--text-color);
}

.filter-tab.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Proposals List Container */
.proposals-list {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proposals-loading,
.proposals-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1rem;
}

/* Proposal Card */
.proposal-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.proposal-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.proposal-card-expanded {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(255, 153, 0, 0.2);
}

/* Card Header */
.proposal-card-header {
    margin-bottom: 12px;
}

.proposal-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.proposal-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.proposal-card-category {
    display: inline-block;
    background: #e6f2ff;
    color: #2c5282;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Card Snippet */
.proposal-card-snippet {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* Card Footer */
.proposal-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.proposal-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #666;
}

.proposal-card-author {
    font-weight: 600;
    color: var(--primary-color);
}

.proposal-card-date {
    color: #999;
}

/* Vote Button */
.proposal-vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.proposal-vote-btn:hover:not(:disabled) {
    border-color: #4CAF50;
    background: #E8F5E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.proposal-vote-btn.already-voted {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-color: #4CAF50;
    color: #2E7D32;
    cursor: default;
    opacity: 0.8;
}

.proposal-vote-count {
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* Status Badges */
.status-badge.status-pending {
    background: #f59e0b;
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-badge.status-approved {
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-badge.status-rejected {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

/* Expanded Details */
.proposal-expanded-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.3s ease-out;
}

.proposal-detail-section {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.proposal-detail-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
}

.proposal-detail-section p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.proposal-detail-section ol {
    margin: 0;
    padding-left: 20px;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

.proposal-full-description {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #4a90e2;
}

.proposal-full-description h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
}

.proposal-full-description p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.proposal-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Card actions row */
.proposal-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.proposal-comment-badge {
    font-size: 0.85rem;
    color: #666;
    cursor: default;
}

/* Comments section in expanded view */
.proposal-comments-section {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #2196F3;
}

.proposal-comments-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.proposal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.no-comments-yet {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

.proposal-comment {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.proposal-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.proposal-comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.proposal-comment-date {
    color: #999;
}

.proposal-comment-text {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    white-space: pre-wrap;
}

.proposal-comment-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.proposal-comment-input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.proposal-comment-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.proposal-comment-submit {
    padding: 10px 18px;
    white-space: nowrap;
    font-size: 0.85rem;
}

/* Delete button */
.proposal-actions-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.proposal-delete-btn {
    padding: 8px 16px;
    border: 2px solid #ef4444;
    border-radius: 6px;
    background: white;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.proposal-delete-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .proposals-review-content {
        width: 95%;
        max-height: 90vh;
    }

    .proposals-filter-tabs {
        padding: 12px 16px;
        gap: 6px;
    }

    .filter-tab {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .proposals-list {
        padding: 16px;
    }

    .proposal-card-title-row {
        flex-direction: column;
        gap: 8px;
    }

    .proposal-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .proposal-vote-btn {
        align-self: flex-end;
    }
}


/* ============================================
   PROPOSAL CARD UX IMPROVEMENTS
   ============================================ */

/* Expand hint */
.proposal-expand-hint {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    padding: 8px 0 0;
    cursor: pointer;
    transition: color 0.2s;
}

.proposal-card:hover .proposal-expand-hint {
    color: var(--secondary-color);
}

/* Feedback button in card footer */
.proposal-feedback-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 2px solid #2196F3;
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2196F3;
    cursor: pointer;
    transition: all 0.3s;
}

.proposal-feedback-btn:hover {
    background: #E3F2FD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

/* Inline delete button */
.proposal-delete-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 2px solid #ef4444;
    border-radius: 50%;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.proposal-delete-btn-inline:hover {
    background: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}


/* ============================================
   PROPOSAL UP/DOWN VOTE BUTTONS
   ============================================ */
.proposal-upvote-btn,
.proposal-downvote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.proposal-upvote-btn:hover:not(:disabled) {
    border-color: #4CAF50;
    background: #E8F5E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.proposal-downvote-btn:hover:not(:disabled) {
    border-color: #ef4444;
    background: #FEE2E2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.proposal-upvote-btn.already-voted,
.proposal-downvote-btn.already-voted {
    opacity: 0.6;
    cursor: default;
}

.proposal-upvote-btn.already-voted {
    background: #E8F5E9;
    border-color: #4CAF50;
}

.proposal-downvote-btn.already-voted {
    background: #FEE2E2;
    border-color: #ef4444;
}


/* Proposals disclaimer */
.proposals-disclaimer {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-bottom: 2px solid var(--border-color);
}

.proposals-disclaimer p {
    margin: 0;
    font-size: 0.85rem;
    color: #1565C0;
    line-height: 1.5;
}

/* Badge Toast Notifications */
.badge-toast {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 360px;
}

.badge-toast.show {
    right: 20px;
}

.badge-toast-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.badge-toast-content {
    flex: 1;
}

.badge-toast-title {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 2px;
}

.badge-toast-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.badge-toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 4px;
}

.badge-toast-close:hover {
    opacity: 1;
}

/* Badge Showcase — Compact in Profile */
.profile-streak-achievements-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 12px 0;
}

.streak-stats-compact {
    flex: 0 0 auto;
    min-width: 140px;
    background: #f8f9ff;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #e8ecf1;
}

.streak-stats-compact h4 { font-size: 0.9rem; margin-bottom: 8px; }

.streak-compact-grid { display: flex; gap: 14px; }

.streak-compact-item { text-align: center; }

.streak-compact-value { display: block; font-size: 1.3rem; font-weight: 700; color: #667eea; }

.streak-compact-label { display: block; font-size: 0.65rem; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }

.badge-showcase-compact { flex: 1; min-width: 0; padding: 0; }
.badge-showcase-compact h4 { font-size: 0.9rem; margin-bottom: 8px; }

/* Activity — Compact */
.profile-stats-compact {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #e8ecf1;
    margin-bottom: 12px;
}
.profile-stats-compact h4 { font-size: 0.9rem; margin-bottom: 8px; }
.activity-compact-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.activity-compact-item { text-align: center; }
.activity-compact-value { font-size: 1.1rem; font-weight: 700; color: #667eea; }
.activity-compact-label { font-size: 0.65rem; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-view-activity { font-size: 0.8rem; padding: 4px 12px; margin-left: auto; }
.badge-count-label { font-size: 0.85rem; font-weight: 400; color: #999; }
.earned-badge-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.earned-badge-icon { font-size: 1.8rem; cursor: default; transition: transform 0.15s; }
.earned-badge-icon:hover { transform: scale(1.2); }
.badge-empty-hint { color: #999; font-size: 0.85rem; font-style: italic; }
.btn-view-badges { font-size: 0.85rem; padding: 6px 16px; }

/* Badges Modal */
.badges-modal-content { max-width: 720px; width: 95%; }
.badges-modal-body { max-height: 70vh; overflow-y: auto; padding: 20px; }
.badges-modal-category { margin-bottom: 24px; }
.badges-modal-category h4 { font-size: 0.95rem; font-weight: 600; color: #667eea; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid #eee; }
.badges-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }

/* Flip Card */
.badge-flip-card { perspective: 600px; width: 110px; height: 130px; cursor: pointer; }
.badge-flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s; transform-style: preserve-3d; }
.badge-flip-card.flipped .badge-flip-inner { transform: rotateY(180deg); }
.badge-flip-front, .badge-flip-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; text-align: center; }
.badge-flip-front { background: #f8f9ff; border: 2px solid #e8ecf1; }
.badge-flip-card.earned .badge-flip-front { border-color: #667eea; background: linear-gradient(135deg, #f8f9ff 0%, #eef0ff 100%); }
.badge-flip-card.locked .badge-flip-front { opacity: 0.45; filter: grayscale(1); }
.badge-flip-back { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; transform: rotateY(180deg); }
.badge-flip-card.locked .badge-flip-back { background: linear-gradient(135deg, #666 0%, #444 100%); }
.badge-flip-icon { font-size: 2.2rem; margin-bottom: 6px; }
.badge-flip-name { font-size: 0.75rem; font-weight: 600; color: #333; }
.badge-flip-card.locked .badge-flip-name { color: #999; }
.badge-flip-status { font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; }
.badge-flip-progress { font-size: 0.7rem; opacity: 0.9; line-height: 1.3; }

/* Public Profile Popup Badges */
.profile-popup-badges { padding: 8px 12px; border-top: 1px solid #eee; }
.profile-popup-badges-title { font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: #667eea; }
.profile-popup-badges-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.profile-popup-badge { font-size: 1.3rem; cursor: default; }

@media (max-width: 768px) {
    .badges-card-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
    .badge-flip-card { width: 90px; height: 110px; }
    .badge-flip-icon { font-size: 1.8rem; }
    .profile-streak-achievements-row { flex-direction: column; gap: 12px; }
    .streak-stats-compact { width: 100%; }
}


/* ============================================
   Post Flip Cards
   ============================================ */

.post-card {
    perspective: 800px;
    height: 300px;
    cursor: pointer;
    position: relative;
}

.post-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.post-card.flipped .post-flip-inner {
    transform: rotateY(180deg);
}

.post-flip-front,
.post-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 16px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-flip-front {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-flip-back {
    transform: rotateY(180deg);
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-color, #333);
}

/* Front face elements */
.post-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.post-status-badge.resolved { background: #d4edda; color: #155724; }
.post-status-badge.archived { background: #e2e3e5; color: #383d41; }

.post-front-title {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.post-title-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #232f3e);
    text-decoration: none;
    line-height: 1.3;
}

.post-title-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.post-front-author {
    font-size: 0.8rem;
    color: #666;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-front-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    flex-wrap: wrap;
}

.post-source-tag {
    font-size: 0.85rem;
}

.post-front-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color, #eee);
    padding-top: 8px;
}

.post-action-btn {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 3px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--text-color, #555);
    transition: background 0.15s;
}

.post-action-btn:hover:not([disabled]) {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.post-action-btn[disabled] {
    opacity: 0.5;
    cursor: default;
}

.post-action-btn.loved { color: #e74c3c; }
.post-action-btn.bookmarked { color: #f39c12; }
.post-action-btn.in-cart { color: #27ae60; }

.comment-badge {
    cursor: pointer;
}

/* Back face elements */
.post-back-summary {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.85rem;
}

.post-back-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-back-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.post-back-tag {
    font-size: 0.7rem;
    background: #f0f0ff;
    color: #667eea;
    padding: 2px 8px;
    border-radius: 10px;
}

.post-back-source {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 8px;
}

.post-back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.post-back-link:hover {
    text-decoration: underline;
}

/* Posts grid override for flip cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Mobile */
@media (max-width: 768px) {
    .post-card { height: 320px; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-front-actions { gap: 2px; }
    .post-action-btn { font-size: 0.75rem; padding: 4px 5px; }
}


/* Pipeline Status Indicator */
.pipeline-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary, #666);
    box-shadow: var(--shadow-sm);
}


/* ============================================
   FEATURE PROPOSAL STYLES
   ============================================ */

/* Feature Proposal Modal */
.feature-proposal-content {
    max-width: 640px;
    width: 95%;
}

.feature-proposal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
}

.feature-proposal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-proposal-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color, #333);
}

.feature-proposal-form .field-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: #999;
}

.feature-proposal-form select,
.feature-proposal-form input,
.feature-proposal-form textarea {
    padding: 10px 12px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--card-bg, #fff);
    color: var(--text-color, #333);
}

.feature-proposal-form select:focus,
.feature-proposal-form input:focus,
.feature-proposal-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color, #667eea);
}

.feature-proposal-form .char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
}

.submit-feature-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
}

/* Feature Proposal Result */
.feature-proposal-result {
    padding: 20px 24px;
}

.feature-proposal-result .result-section {
    margin-bottom: 16px;
}

.feature-proposal-result .result-section h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color, #333);
}

.feature-proposal-result .result-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary-color, #232f3e);
}

.feature-proposal-result .result-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color, #555);
}

.feature-proposal-result .result-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Feature Request Badge */
.feature-request-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

/* Service Tag */
.service-tag {
    display: inline-block;
    background: #e8f4fd;
    color: #1976d2;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

/* Priority Tags */
.priority-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

.priority-tag.priority-nice-to-have {
    background: #e8f5e9;
    color: #2e7d32;
}

.priority-tag.priority-important {
    background: #fff3e0;
    color: #e65100;
}

.priority-tag.priority-critical {
    background: #ffebee;
    color: #c62828;
}

/* Proposals Type Filter */
.proposals-type-filter {
    display: flex;
    gap: 8px;
    padding: 8px 24px 12px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.type-filter-btn {
    padding: 6px 16px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 20px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color, #666);
    cursor: pointer;
    transition: all 0.2s;
}

.type-filter-btn:hover {
    border-color: var(--secondary-color, #667eea);
    color: var(--text-color, #333);
}

.type-filter-btn.active {
    background: var(--secondary-color, #667eea);
    border-color: var(--secondary-color, #667eea);
    color: white;
}

@media (max-width: 768px) {
    .proposals-type-filter {
        padding: 8px 16px;
        flex-wrap: wrap;
    }

    .type-filter-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .feature-proposal-form {
        padding: 16px;
    }

    .feature-proposal-result {
        padding: 16px;
    }
}


/* Fix dropdown clipping in header */
header, .header-right, .proposals-dropdown {
    overflow: visible !important;
}
.proposals-dropdown-menu {
    z-index: 10000 !important;
    min-width: 200px !important;
}

/* ============================================
   PANEL EXPANDER - Expand Button (Task 1.1)
   ============================================ */
.chart-container {
    position: relative;
}

.panel-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    opacity: 0;
}

.chart-container:hover .panel-expand-btn {
    opacity: 1;
    background: rgba(0, 0, 0, 0.12);
}

.panel-expand-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.panel-expand-btn:focus-visible {
    opacity: 1;
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

.panel-expand-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* ============================================
   PANEL EXPANDER - Overlay & Content (Task 1.2)
   ============================================ */
.panel-expand-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.panel-expand-overlay.visible {
    display: flex;
}

.panel-expand-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.panel-expand-content {
    position: relative;
    background: #0e1628;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 95vw;
    max-height: 90vh;
    width: 95vw;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.panel-expand-overlay.visible .panel-expand-content {
    animation: panelExpandIn 300ms ease-out forwards;
}

.panel-expand-overlay.closing .panel-expand-content {
    animation: panelExpandOut 200ms ease-in forwards;
}

@keyframes panelExpandIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes panelExpandOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.95);
        opacity: 0;
    }
}

.panel-expand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.panel-expand-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.panel-expand-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.panel-expand-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.panel-expand-close:focus-visible {
    outline: 2px solid #FF9900;
    outline-offset: 2px;
}

.panel-expand-controls {
    padding: 12px 24px 0;
    flex-shrink: 0;
}

.panel-expand-body {
    flex: 1;
    padding: 16px 24px 24px;
    overflow: auto;
    min-height: 0;
}

.panel-expand-canvas {
    width: 100%;
    height: 100%;
}

/* Time Period Toggle */
.panel-expand-time-toggle {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.time-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.time-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.time-toggle-btn.active {
    background: #FF9900;
    color: #fff;
    border-color: #FF9900;
}

/* KB Leaderboard HTML Content */
.panel-expand-html-content {
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* KB Contributor Drill-Down Detail */
.panel-expand-detail {
    display: inline-block;
    padding: 12px 16px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #FF9900;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Empty State */
.panel-expand-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    text-align: center;
    padding: 40px;
}

/* Error State */
.panel-expand-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    text-align: center;
    gap: 16px;
    padding: 40px;
}

.panel-expand-error button {
    background: #FF9900;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.panel-expand-error button:hover {
    background: #ec8b00;
}

/* ============================================
   PANEL EXPANDER - Mobile Responsive (Task 1.3)
   ============================================ */
@media (max-width: 768px) {
    .panel-expand-content {
        max-width: 100vw;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .panel-expand-close {
        min-width: 44px;
        min-height: 44px;
    }

    .panel-expand-time-toggle {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .panel-expand-header {
        padding: 12px 16px;
    }

    .panel-expand-controls {
        padding: 8px 16px 0;
    }

    .panel-expand-body {
        padding: 12px 16px 16px;
    }

    .panel-expand-title {
        font-size: 1.1rem;
    }

    .panel-expand-mobile-tooltip {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 12px 16px;
        margin-top: 12px;
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.875rem;
        line-height: 1.5;
    }
}


/* ============================================
   SOURCE FILTER TOGGLE
   ============================================ */
.source-filter-container {
    margin: 16px 0;
}

.source-filter-toggle {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.source-filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.source-filter-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.source-filter-btn:hover:not(.active) {
    background: rgba(255, 153, 0, 0.06);
    color: var(--text-color);
}

.source-filter-btn.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: #fff;
}

.source-filter-btn.active .source-filter-count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.source-filter-icon {
    font-size: 1.1rem;
}

.source-filter-count {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

@media (max-width: 768px) {
    .source-filter-toggle {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .source-filter-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   INNOVATION HUB STYLES
   ═══════════════════════════════════════════════════════════════════════ */

.innovation-hub-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 10000;
    display: none; overflow-y: auto;
}
.innovation-hub-container.active { display: block; }
.innovation-hub-inner {
    max-width: 1200px; margin: 0 auto; padding: 20px;
}
.innovation-hub-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.innovation-hub-header h2 { color: #fff; margin: 0; font-size: 1.5rem; }
.innovation-hub-header-actions { display: flex; gap: 10px; align-items: center; }
.innovation-hub-close {
    background: none; border: 1px solid #555; color: #ccc; padding: 8px 16px;
    border-radius: 6px; cursor: pointer; font-size: 0.9rem;
}
.innovation-hub-close:hover { background: #333; color: #fff; }

.innovation-nav-btn {
    background: linear-gradient(135deg, #10b981, #059669); color: #fff;
    border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.innovation-nav-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.4); }

.innovation-disclaimer {
    background: linear-gradient(135deg, #fef3c7, #fde68a); border-left: 4px solid #f59e0b;
    padding: 12px 16px; border-radius: 6px; margin-bottom: 20px;
    color: #92400e; font-size: 0.85rem; font-weight: 500;
}

.innovation-featured {
    background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid #10b981;
    border-radius: 12px; padding: 20px; margin-bottom: 24px; position: relative;
}
.innovation-featured-badge {
    position: absolute; top: -10px; left: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
    padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 700;
}
.innovation-featured h3 { color: #10b981; margin: 8px 0 6px; font-size: 1.1rem; }
.innovation-featured p { color: #94a3b8; font-size: 0.85rem; margin: 0; }
.innovation-featured-meta { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

.innovation-filters {
    display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center;
}
.innovation-filters select, .innovation-filters input[type="text"] {
    background: #1e293b; color: #e2e8f0; border: 1px solid #334155;
    padding: 8px 12px; border-radius: 6px; font-size: 0.85rem;
}
.innovation-filters input[type="text"] { flex: 1; min-width: 180px; }
.innovation-filters select:focus, .innovation-filters input:focus {
    outline: none; border-color: #10b981;
}

.innovation-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px; margin-bottom: 30px;
}

.innovation-card {
    background: #1e293b; border: 1px solid #334155; border-radius: 10px;
    padding: 16px; cursor: pointer; transition: transform 0.15s, border-color 0.15s;
    display: flex; flex-direction: column; gap: 10px;
}
.innovation-card:hover { transform: translateY(-2px); border-color: #10b981; }
.innovation-card h3 { color: #f1f5f9; margin: 0; font-size: 1rem; line-height: 1.3; }
.innovation-card-desc { color: #94a3b8; font-size: 0.82rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.innovation-card-disclaimer { color: #f59e0b; font-size: 0.7rem; font-style: italic; }
.innovation-card-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.innovation-card-stats { display: flex; gap: 10px; color: #94a3b8; font-size: 0.8rem; }
.innovation-card-stats span { display: flex; align-items: center; gap: 3px; }

.innovation-complexity-badge {
    padding: 3px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.innovation-complexity-badge.beginner { background: rgba(16,185,129,0.2); color: #10b981; }
.innovation-complexity-badge.intermediate { background: rgba(249,115,22,0.2); color: #f97316; }
.innovation-complexity-badge.advanced { background: rgba(239,68,68,0.2); color: #ef4444; }

.innovation-service-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.innovation-service-tag {
    background: rgba(59,130,246,0.15); color: #60a5fa; padding: 2px 8px;
    border-radius: 8px; font-size: 0.7rem; white-space: nowrap;
}

/* Detail Modal */
.innovation-detail-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 10001; display: none; overflow-y: auto;
}
.innovation-detail-modal.active { display: block; }
.innovation-detail-inner {
    max-width: 900px; margin: 30px auto; padding: 24px;
    background: #0f172a; border: 1px solid #334155; border-radius: 12px;
}
.innovation-detail-header {
    display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
}
.innovation-detail-header h2 { color: #f1f5f9; margin: 0; font-size: 1.3rem; flex: 1; }
.innovation-detail-close {
    background: none; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
}
.innovation-detail-close:hover { color: #fff; }
.innovation-detail-section { margin-bottom: 20px; }
.innovation-detail-section h3 { color: #10b981; font-size: 0.95rem; margin: 0 0 8px; }
.innovation-detail-section p, .innovation-detail-section div { color: #cbd5e1; font-size: 0.9rem; line-height: 1.6; }
.innovation-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; color: #94a3b8; font-size: 0.85rem; }
.innovation-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.innovation-detail-actions button {
    background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
    padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; gap: 4px; transition: background 0.15s;
}
.innovation-detail-actions button:hover { background: #334155; }
.innovation-detail-actions button.active { border-color: #10b981; color: #10b981; }

/* Code blocks */
.innovation-code-block { margin-bottom: 16px; border-radius: 8px; overflow: hidden; border: 1px solid #334155; }
.innovation-code-label {
    background: #334155; color: #94a3b8; padding: 6px 12px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.innovation-code-block pre { margin: 0; border-radius: 0; }
.innovation-code-block pre code { font-size: 0.82rem; }

/* Comments section in detail */
.innovation-comments { margin-top: 20px; border-top: 1px solid #334155; padding-top: 16px; }
.innovation-comments h3 { color: #f1f5f9; font-size: 1rem; margin: 0 0 12px; }
.innovation-comment {
    background: #1e293b; border-radius: 8px; padding: 12px; margin-bottom: 8px;
}
.innovation-comment-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.innovation-comment-author { color: #10b981; font-weight: 600; font-size: 0.85rem; }
.innovation-comment-time { color: #64748b; font-size: 0.75rem; }
.innovation-comment-text { color: #cbd5e1; font-size: 0.85rem; line-height: 1.5; }
.innovation-comment-form { display: flex; gap: 8px; margin-top: 12px; }
.innovation-comment-form textarea {
    flex: 1; background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
    padding: 10px; border-radius: 6px; font-size: 0.85rem; resize: vertical; min-height: 60px;
}
.innovation-comment-form textarea:focus { outline: none; border-color: #10b981; }
.innovation-comment-form button {
    background: #10b981; color: #fff; border: none; padding: 10px 16px;
    border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; white-space: nowrap;
}
.innovation-comment-form button:hover { background: #059669; }

/* Submission Modal */
.innovation-submission-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 10002; display: none; overflow-y: auto;
}
.innovation-submission-modal.active { display: block; }
.innovation-submission-inner {
    max-width: 750px; margin: 30px auto; padding: 24px;
    background: #0f172a; border: 1px solid #334155; border-radius: 12px;
}
.innovation-submission-inner h2 { color: #f1f5f9; margin: 0 0 16px; font-size: 1.3rem; }
.innovation-form-group { margin-bottom: 16px; }
.innovation-form-group label { display: block; color: #94a3b8; font-size: 0.85rem; margin-bottom: 4px; font-weight: 600; }
.innovation-form-group input, .innovation-form-group textarea, .innovation-form-group select {
    width: 100%; background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
    padding: 10px; border-radius: 6px; font-size: 0.9rem; box-sizing: border-box;
}
.innovation-form-group textarea { resize: vertical; min-height: 80px; }
.innovation-form-group input:focus, .innovation-form-group textarea:focus, .innovation-form-group select:focus {
    outline: none; border-color: #10b981;
}
.innovation-form-error { color: #ef4444; font-size: 0.75rem; margin-top: 4px; display: none; }
.innovation-form-group.has-error input, .innovation-form-group.has-error textarea {
    border-color: #ef4444;
}
.innovation-form-group.has-error .innovation-form-error { display: block; }
.innovation-snippet-list { display: flex; flex-direction: column; gap: 10px; }
.innovation-snippet-item {
    background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 12px;
}
.innovation-snippet-item select { width: auto; margin-bottom: 8px; }
.innovation-snippet-item textarea { min-height: 100px; font-family: monospace; }
.innovation-snippet-remove {
    background: none; border: none; color: #ef4444; cursor: pointer; font-size: 0.8rem; float: right;
}
.innovation-add-snippet {
    background: none; border: 1px dashed #334155; color: #10b981; padding: 8px;
    border-radius: 6px; cursor: pointer; font-size: 0.85rem; width: 100%;
}
.innovation-add-snippet:hover { border-color: #10b981; }
.innovation-complexity-radios { display: flex; gap: 16px; flex-wrap: wrap; }
.innovation-complexity-radios label {
    display: flex; align-items: center; gap: 6px; color: #e2e8f0; font-weight: 400; cursor: pointer;
}
.innovation-submit-btn {
    background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none;
    padding: 12px 24px; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600;
    width: 100%; margin-top: 8px;
}
.innovation-submit-btn:hover { opacity: 0.9; }
.innovation-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.innovation-submission-close {
    background: none; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer;
    position: absolute; top: 16px; right: 16px;
}
.innovation-submission-header {
    display: flex; justify-content: space-between; align-items: center; position: relative;
}

.innovation-empty { text-align: center; color: #64748b; padding: 40px; font-size: 0.95rem; }

/* Responsive */
@media (max-width: 768px) {
    .innovation-grid { grid-template-columns: 1fr; }
    .innovation-filters { flex-direction: column; }
    .innovation-detail-inner, .innovation-submission-inner { margin: 10px; padding: 16px; }
    .innovation-hub-inner { padding: 12px; }
}


/* Innovation Hub nav button — positioned on the left side of header */
header .innovation-nav-btn {
    position: absolute !important;
    top: 20px !important;
    left: 32px !important;
    z-index: 10 !important;
}

@media (max-width: 1024px) {
    header .innovation-nav-btn {
        position: static !important;
        margin-top: 12px !important;
    }
}


/* Mermaid diagram container */
.innovation-mermaid-container {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.innovation-mermaid-container .mermaid {
    display: flex;
    justify-content: center;
}

.innovation-mermaid-container svg {
    max-width: 100%;
    height: auto;
}


/* Innovation comment delete button */
.innovation-comment-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}
.innovation-comment-delete:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}
.innovation-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
