/* index_styles.css - Dark Red Elegant Theme with White News Cards - โทนแดงเข้มสบายตา */

:root {
    /* Dark Red Elegant Theme - Professional & Eye-Comfortable */
    /* Background Colors - โทนเข้มสบายตา */
    --bg-primary: #0f0f0f;          /* ดำเข้มมาก */
    --bg-secondary: #1a1012;        /* ดำแดงเข้ม */
    --bg-card: #2d1b1f;             /* แดงดำเข้ม */
    --bg-hover: #3d252a;            /* แดงเข้มอ่อน */
    
    /* White backgrounds for news cards */
    --news-bg-primary: #ffffff;     /* ขาวสำหรับข่าว */
    --news-bg-hover: #f8f9fa;       /* ขาวเทาอ่อนเมื่อ hover */
    --news-text-primary: #1a202c;   /* ข้อความเข้มบนพื้นขาว */
    --news-text-secondary: #4a5568; /* ข้อความรองบนพื้นขาว */
    --news-text-muted: #718096;     /* ข้อความจางบนพื้นขาว */
    
    /* Text Colors - ขาวนวลสบายตา */
    --text-primary: #f8f6f7;        /* ขาวนวล */
    --text-secondary: #e8dfe2;      /* ขาวแดงอ่อน */
    --text-muted: #c4a5ab;          /* แดงเทาอ่อน */
    --text-subtle: #a08389;         /* แดงเทา */
    
    /* Accent Colors - โทนแดงเลือดหมูเรียบหรู */
    --accent-main: #dc2626;         /* แดงเลือดหมูหลัก */
    --accent-second: #b91c1c;       /* แดงเข้มรอง */
    --accent-warm: #ef4444;         /* แดงอุ่น */
    --accent-soft: #f87171;         /* แดงอ่อน */
    --accent-gold: #d97706;         /* ทองแดง */
    --accent-blue: #dc2626;         /* ใช้แดงแทนน้ำเงิน */
    
    /* เพิ่มสีน้ำเงินเข้มสำหรับ Active State */
    --accent-blue-dark: #1e3a8a;    /* น้ำเงินเข้ม */
    --accent-blue-darker: #1e40af;  /* น้ำเงินเข้มกว่า */
    
    /* Border Colors - เข้มสบายตา */
    --border-primary: #3d252a;
    --border-secondary: #4d2f35;
    --news-border: #e2e8f0;         /* เส้นขอบสำหรับข่าว */
}

/* Tab Navigation - Modern & Minimal */
.tab-navigation {
    background: linear-gradient(135deg, rgba(26, 16, 18, 0.95), rgba(45, 27, 31, 0.9));
    border-bottom: 2px solid var(--accent-main);
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 15px rgba(220, 38, 38, 0.3);
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-container {
    display: flex;
    gap: 2px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 50px;
    align-items: center;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
    position: relative;
    white-space: nowrap;
    background: transparent;
    border-bottom: 2px solid transparent;
}

.tab-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-main), var(--accent-warm));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.tab-item:hover::before {
    width: 80%;
}

.tab-item:hover {
    color: var(--text-secondary);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

.tab-item.active {
    color: var(--text-primary);
    background: rgba(220, 38, 38, 0.15);
    border-bottom-color: var(--accent-main);
}

.tab-item.active::before {
    width: 100%;
}

.tab-item i {
    font-size: 16px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.tab-item:hover i,
.tab-item.active i {
    opacity: 1;
    color: var(--accent-main);
    transform: scale(1.05);
}

.tab-item span {
    letter-spacing: -0.01em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.5;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
}

/* Content */
.content-wrapper { 
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
}

/* Sidebar */
.left-sidebar, .right-sidebar {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-primary);
    height: fit-content;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
}

.left-sidebar h3, .right-sidebar h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-main);
    background: linear-gradient(135deg, var(--accent-main), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* ========== NEWS CARDS WITH WHITE BACKGROUNDS ========== */

/* Left sidebar cards - WHITE BACKGROUNDS */
.left-card {
    background: var(--news-bg-primary); /* เปลี่ยนเป็นพื้นขาว */
    border: 2px solid var(--news-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.left-card:hover {
    background: var(--news-bg-hover);
    border-color: var(--accent-main);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

.left-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.left-card:hover .left-image img {
    transform: scale(1.05);
}

.left-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--news-bg-primary); /* พื้นขาวสำหรับเนื้อหา */
}

.left-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--news-text-primary); /* ใช้สีข้อความเข้มบนพื้นขาว */
    margin-bottom: 8px;
    line-height: 1.4;
    flex: 1;
}

.left-meta {
    font-size: 11px;
    color: var(--news-text-muted); /* ใช้สีข้อความจางบนพื้นขาว */
    margin-bottom: 8px;
}

/* Right sidebar cards - WHITE BACKGROUNDS */
.right-card {
    background: var(--news-bg-primary); /* เปลี่ยนเป็นพื้นขาว */
    border: 2px solid var(--news-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.right-card:hover {
    background: var(--news-bg-hover);
    border-color: var(--accent-main);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

.right-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.right-card:hover .right-image img {
    transform: scale(1.05);
}

.right-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--news-bg-primary); /* พื้นขาวสำหรับเนื้อหา */
}

.right-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--news-text-primary); /* ใช้สีข้อความเข้มบนพื้นขาว */
    margin-bottom: 8px;
    line-height: 1.4;
    flex: 1;
}

.right-meta {
    font-size: 11px;
    color: var(--news-text-muted); /* ใช้สีข้อความจางบนพื้นขาว */
    margin-bottom: 8px;
}

.left-meta, .right-meta {
    font-size: 11px;
    color: var(--news-text-muted); /* ใช้สีข้อความจางบนพื้นขาว */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Center Main */
.center-main {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-radius: 12px;
    padding: 20px;
    border: 2px solid var(--border-primary);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
}

/* Main cards and double cards - WHITE BACKGROUNDS */
.main-card, .double-card {
    background: var(--news-bg-primary); /* เปลี่ยนเป็นพื้นขาว */
    border: 2px solid var(--news-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.main-card:hover, .double-card:hover {
    background: var(--news-bg-hover);
    border-color: var(--accent-main);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.4);
}

.double-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.main-card img, .double-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-card:hover img, .double-card:hover img {
    transform: scale(1.05);
}

.double-card img { height: 150px; }

.main-card-content, .double-card-content {
    padding: 15px;
    background: var(--news-bg-primary); /* พื้นขาวสำหรับเนื้อหา */
}

.main-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--news-text-primary); /* ใช้สีข้อความเข้มบนพื้นขาว */
    margin-bottom: 8px;
    line-height: 1.3;
}

.double-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--news-text-primary); /* ใช้สีข้อความเข้มบนพื้นขาว */
    margin-bottom: 6px;
    line-height: 1.3;
}

.main-description {
    font-size: 13px;
    color: var(--news-text-secondary); /* ใช้สีข้อความรองบนพื้นขาว */
    margin-bottom: 10px;
    line-height: 1.4;
}

.main-meta, .double-meta {
    font-size: 11px;
    color: var(--news-text-muted); /* ใช้สีข้อความจางบนพื้นขาว */
    display: flex;
    justify-content: space-between;
}

/* Hashtags - ปรับสีให้เข้ากับพื้นขาว */
.hashtag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.hashtag-tag {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.15));
    color: var(--accent-main);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(220, 38, 38, 0.3);
    line-height: 1.2;
    font-weight: 500;
}

.hashtag-tag:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.25));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

/* Stats */
.mini-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--accent-main);
}

.mini-stats h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-main), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.mini-stat-item {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.mini-stat-item:hover {
    border-color: var(--accent-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.mini-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.mini-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-main);
}

/* News Stats - ปรับสีให้เข้ากับพื้นขาว */
.news-stats {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    font-size: 10px;
    color: var(--news-text-muted); /* ใช้สีสำหรับพื้นขาว */
    padding: 6px 0;
    /* border-top: 1px solid rgba(220, 38, 38, 0.2); เอาออก */
}

.news-stats span {
    display: flex;
    align-items: center;
    gap: 2px;
    transition: color 0.3s ease;
}

.news-stats span:hover {
    color: var(--accent-main);
}

/* Action Bar - Enhanced สำหรับการ์ดข่าว */
.action-bar {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: rgba(248, 249, 250, 0.9); /* พื้นขาวอ่อนสำหรับ action bar */
    /* border-top: 2px solid var(--accent-main); เอาออก */
    gap: 6px;
}

.action-btn {
    flex: 1;
    padding: 8px 10px;
    border: 2px solid var(--accent-main); /* เปลี่ยนจากเทาเป็นแดง */
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05)); /* เปลี่ยนเป็นแดงอ่อน */
    color: var(--accent-main); /* เปลี่ยนเป็นแดงเข้ม */
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2); /* เปลี่ยนเป็นเงาแดง */
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.15));
    border-color: #e2e8f0; /* เปลี่ยนเป็นเทาอ่อน */
    color: var(--accent-second);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.action-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.action-btn:hover i {
    transform: scale(1.1);
}

.comment-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.15));
    border-color: #e2e8f0; /* เปลี่ยนเป็นเทาอ่อน */
    color: var(--accent-second);
}

.like-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border-color: #e2e8f0; /* เปลี่ยนเป็นเทาอ่อน */
    color: var(--accent-warm);
}

.share-btn:hover {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(245, 158, 11, 0.15));
    border-color: #e2e8f0; /* เปลี่ยนเป็นเทาอ่อน */
    color: var(--accent-gold);
}

/* Active States for Buttons - เปลี่ยนเป็นสีน้ำเงินเข้ม */
.like-btn.active,
.like-btn.liked {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(30, 64, 175, 0.2)) !important;
    border-color: var(--accent-blue-dark) !important;
    color: var(--accent-blue-dark) !important;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    transform: translateY(-2px);
}

.share-btn.active,
.share-btn.shared {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(30, 64, 175, 0.2)) !important;
    border-color: var(--accent-blue-dark) !important;
    color: var(--accent-blue-dark) !important;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    transform: translateY(-2px);
}

.comment-btn.active,
.comment-btn.commented {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(30, 64, 175, 0.2)) !important;
    border-color: var(--accent-blue-dark) !important;
    color: var(--accent-blue-dark) !important;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    transform: translateY(-2px);
}

/* Disabled states (for liked buttons) */
.like-btn:disabled {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 64, 175, 0.3)) !important;
    border-color: var(--accent-blue-darker) !important;
    color: var(--accent-blue-darker) !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Right sidebar action bar - compact */
.right-card .action-bar {
    padding: 8px 6px;
}

.right-card .action-btn {
    padding: 6px 8px;
    font-size: 10px;
    min-height: 28px;
}

.right-card .action-btn i {
    font-size: 9px;
}

/* Left sidebar action bar - compact */
.left-card .action-bar {
    padding: 8px 6px;
}

.left-card .action-btn {
    padding: 6px 8px;
    font-size: 10px;
    min-height: 28px;
}

.left-card .action-btn i {
    font-size: 9px;
}

/* Hashtags Section */
.popular-hashtags-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--accent-main);
}

.popular-hashtags-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-main), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popular-hashtag {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.popular-hashtag:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(185, 28, 28, 0.1));
    border-color: var(--accent-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.popular-hashtag span:first-child {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.popular-hashtag span:last-child {
    font-size: 11px;
    color: var(--accent-main);
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading-spinner {
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-top: 3px solid var(--accent-main);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 14px;
}

/* Load More */
.load-more {
    background: linear-gradient(135deg, var(--accent-main), var(--accent-second));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin: 20px auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.load-more:hover { 
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.5);
}

.load-more:disabled { 
    background: var(--text-muted); 
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    padding: 20px;
    text-align: center;
    border-top: 2px solid var(--accent-main);
    margin-top: 30px;
    box-shadow: 0 -4px 15px rgba(220, 38, 38, 0.2);
}

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

.footer-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.footer-links a:hover {
    color: var(--accent-main);
    background: rgba(220, 38, 38, 0.1);
}

/* Comment Popup */
.comment-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
}

.comment-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border: 2px solid var(--accent-main);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(220, 38, 38, 0.6);
}

.comment-popup-header {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    padding: 15px 20px;
    border-bottom: 2px solid var(--accent-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-popup-header h3 {
    font-size: 16px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-main), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.comment-popup-close {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-popup-close:hover {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

.comment-popup-news {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
}

.comment-news-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.comment-news-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.comments-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 300px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.comment-item {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-main);
    transition: all 0.3s ease;
    border: 2px solid var(--border-primary);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
}

.comment-item:hover {
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-card));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.comment-item.reply {
    margin-left: 20px;
    border-left-color: var(--accent-warm);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.comment-like-btn, .comment-reply-btn {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--accent-main);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.comment-like-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-warm);
}

.comment-reply-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent-warm);
}

.comment-form {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    padding: 15px 20px;
    border-top: 2px solid var(--accent-main);
}

.comment-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-form-group {
    flex: 1;
}

.comment-form-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.comment-form-group input,
.comment-form-group textarea {
    width: 100%; 
    padding: 12px 16px; 
    border: 2px solid var(--border-primary); 
    border-radius: 8px; 
    font-size: 14px; 
    font-family: inherit;
    transition: all 0.3s ease; 
    background: var(--bg-card);
    color: var(--text-primary);
    resize: vertical; 
    min-height: 100px;
}

.comment-form-group input:focus,
.comment-form-group textarea:focus {
    outline: none; 
    border-color: var(--accent-main); 
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
    background: var(--bg-hover);
}

.comment-form-group input::placeholder,
.comment-form-group textarea::placeholder {
    color: var(--text-muted);
}

.comment-form-group textarea {
    height: 60px;
    resize: vertical;
}

.comment-submit-btn {
    background: linear-gradient(135deg, var(--accent-main), var(--accent-second));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-size: 13px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px dashed rgba(220, 38, 38, 0.3);
    border-radius: 8px;
}

/* ==================== ADVANCED REACTIONS SYSTEM ==================== */

/* Base Reactions Container */
.comment-reactions-container {
    margin: 10px 0 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(45, 27, 31, 0.6);
    border-radius: 12px;
    padding: 8px;
    border: 2px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
}

.comment-reactions-container:hover {
    background: rgba(45, 27, 31, 0.8);
    border-color: var(--accent-main);
}

/* Reactions Display Summary */
.comment-reactions-display {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 24px;
}

.reaction-summary {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.15));
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.reaction-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.3), transparent);
    transition: left 0.6s ease;
}

.reaction-summary:hover::before {
    left: 100%;
}

.reaction-summary:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(185, 28, 28, 0.2));
    border-color: var(--accent-main);
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.reaction-summary-emojis {
    display: flex;
    gap: 2px;
    font-size: 14px;
}

.reaction-summary-count {
    font-weight: 700;
    margin-left: 4px;
    color: var(--accent-main);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Reaction Action Buttons */
.comment-reactions-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 2px;
}

.reaction-btn {
    background: rgba(45, 27, 31, 0.8);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
    user-select: none;
}

.reaction-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.3), transparent);
    transition: left 0.5s ease;
}

.reaction-btn:hover::before {
    left: 100%;
}

.reaction-btn:hover {
    transform: scale(1.2) rotate(5deg);
    border-color: var(--accent-main);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    z-index: 10;
}

.reaction-btn:active {
    transform: scale(1.1) rotate(0deg);
}

.reaction-btn.active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(185, 28, 28, 0.3));
    border-color: var(--accent-main);
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.6);
    transform: scale(1.15);
    z-index: 5;
}

/* Individual Reaction Colors - สีแดงโทน */
.reaction-btn[data-reaction="like"]:hover,
.reaction-btn[data-reaction="like"].active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(185, 28, 28, 0.3));
    border-color: var(--accent-main);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
}

.reaction-btn[data-reaction="love"]:hover,
.reaction-btn[data-reaction="love"].active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.3));
    border-color: var(--accent-warm);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.reaction-btn[data-reaction="laugh"]:hover,
.reaction-btn[data-reaction="laugh"].active {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.4), rgba(245, 158, 11, 0.3));
    border-color: var(--accent-gold);
    box-shadow: 0 8px 30px rgba(217, 119, 6, 0.5);
}

.reaction-btn[data-reaction="wow"]:hover,
.reaction-btn[data-reaction="wow"].active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(185, 28, 28, 0.2));
    border-color: var(--accent-second);
    box-shadow: 0 8px 30px rgba(185, 28, 28, 0.5);
}

.reaction-btn[data-reaction="sad"]:hover,
.reaction-btn[data-reaction="sad"].active {
    background: linear-gradient(135deg, rgba(160, 131, 137, 0.4), rgba(196, 165, 171, 0.3));
    border-color: var(--text-subtle);
    box-shadow: 0 8px 30px rgba(160, 131, 137, 0.5);
}

.reaction-btn[data-reaction="angry"]:hover,
.reaction-btn[data-reaction="angry"].active {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.5), rgba(153, 27, 27, 0.4));
    border-color: var(--accent-second);
    box-shadow: 0 8px 30px rgba(185, 28, 28, 0.6);
}

.reaction-btn[data-reaction="think"]:hover,
.reaction-btn[data-reaction="think"].active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(196, 165, 171, 0.2));
    border-color: var(--text-muted);
    box-shadow: 0 8px 30px rgba(196, 165, 171, 0.4);
}

.reaction-btn[data-reaction="fire"]:hover,
.reaction-btn[data-reaction="fire"].active {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.5), rgba(234, 88, 12, 0.4));
    border-color: var(--accent-gold);
    box-shadow: 0 8px 30px rgba(217, 119, 6, 0.6);
}

/* Reaction Count Badges */
.reaction-count {
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.9), rgba(26, 16, 18, 0.8));
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    text-align: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
    opacity: 0;
    transform: scale(0) rotate(-15deg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reaction-btn.has-count .reaction-count {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.reaction-btn:hover .reaction-count {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

/* Advanced Animations */
@keyframes reactionPop {
    0% { 
        transform: scale(1) rotate(0deg); 
    }
    25% { 
        transform: scale(1.4) rotate(10deg); 
    }
    50% { 
        transform: scale(1.2) rotate(-5deg); 
    }
    75% { 
        transform: scale(1.3) rotate(5deg); 
    }
    100% { 
        transform: scale(1.15) rotate(0deg); 
    }
}

@keyframes reactionPulse {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.4); 
    }
    25% { 
        box-shadow: 0 0 35px rgba(220, 38, 38, 0.6); 
    }
    50% { 
        box-shadow: 0 0 45px rgba(220, 38, 38, 0.8); 
    }
    75% { 
        box-shadow: 0 0 40px rgba(220, 38, 38, 0.7); 
    }
}

.reaction-btn.just-reacted {
    animation: 
        reactionPop 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        reactionPulse 1.5s ease-in-out 0.6s;
}

/* Loading States */
.reaction-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s infinite ease-in-out;
    cursor: wait;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

/* No Reactions State */
.no-reactions {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
    padding: 6px 0;
    text-align: center;
    opacity: 0.7;
    background: rgba(45, 27, 31, 0.4);
    border-radius: 8px;
    border: 2px dashed rgba(220, 38, 38, 0.3);
}

/* ==================== MOBILE RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .left-sidebar, .right-sidebar {
        order: 2;
    }
    
    .center-main {
        order: 1;
    }
    
    .double-row {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .comment-popup {
        width: 95%;
        max-height: 90vh;
    }
    
    .comment-form-row {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Mobile action buttons with text */
    .action-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .left-card .action-btn,
    .right-card .action-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    /* Mobile Reactions */
    .comment-reactions-container {
        padding: 6px;
        gap: 6px;
        margin: 8px 0 6px 0;
    }
    
    .comment-reactions-actions {
        gap: 2px;
        justify-content: center;
    }
    
    .reaction-btn {
        min-width: 28px;
        height: 28px;
        font-size: 14px;
        padding: 4px 6px;
        border-radius: 16px;
    }
    
    .reaction-btn:hover {
        transform: scale(1.1) rotate(3deg);
    }
    
    .reaction-count {
        font-size: 9px;
        top: -6px;
        right: -6px;
        min-width: 16px;
        padding: 1px 4px;
    }
    
    .reaction-summary {
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 12px;
    }
    
    .reaction-summary-emojis {
        font-size: 12px;
        gap: 1px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .comment-reactions-actions {
        gap: 1px;
    }
    
    .reaction-btn {
        min-width: 26px;
        height: 26px;
        font-size: 13px;
        padding: 3px 5px;
    }
    
    .reaction-count {
        font-size: 8px;
        top: -5px;
        right: -5px;
        min-width: 14px;
        padding: 1px 3px;
    }
}

/* Dark Theme Enhancements */
@media (prefers-color-scheme: dark) {
    .comment-reactions-container {
        background: rgba(45, 27, 31, 0.8);
        border-color: rgba(220, 38, 38, 0.3);
    }
    
    .reaction-btn {
        background: rgba(45, 27, 31, 0.9);
        border-color: rgba(220, 38, 38, 0.4);
    }
    
    .reaction-summary {
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(185, 28, 28, 0.2));
        border-color: rgba(220, 38, 38, 0.5);
    }
}

/* High Performance Mode (Reduced Animations) */
@media (prefers-reduced-motion: reduce) {
    .reaction-btn,
    .reaction-summary,
    .reaction-count,
    .action-btn,
    .comment-item,
    .main-card,
    .double-card {
        transition: none;
        animation: none;
    }
    
    .reaction-btn:hover {
        transform: scale(1.05);
    }
    
    .reaction-summary:hover {
        transform: scale(1.02);
    }
    
    .action-btn:hover,
    .comment-item:hover,
    .main-card:hover,
    .double-card:hover {
        transform: translateY(-1px);
    }
}

/* Comment Integration Styles for Enhanced Visual Feedback */
.comment-btn.comment-updated {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(185, 28, 28, 0.3)) !important;
    border-color: var(--accent-main) !important;
    color: var(--accent-warm) !important;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    animation: commentPulse 0.6s ease-out;
}

.comment-btn.comment-added {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(185, 28, 28, 0.2)) !important;
    border-color: var(--accent-main) !important;
    color: var(--accent-warm) !important;
    animation: commentAdded 2s ease-out;
}

.comment-btn.comment-opened {
    background: linear-gradient(135deg, rgba(196, 165, 171, 0.3), rgba(160, 131, 137, 0.2)) !important;
    border-color: var(--text-muted) !important;
    color: var(--text-muted) !important;
    animation: commentOpened 1s ease-out;
}

.comment-btn.comment-liked {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.3)) !important;
    border-color: var(--accent-warm) !important;
    color: var(--accent-soft) !important;
    animation: commentLiked 1.5s ease-out;
}

@keyframes commentPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 25px rgba(220, 38, 38, 0.7); }
    100% { transform: scale(1); }
}

/* Print Styles */
@media print {
    .comment-reactions-container,
    .reaction-btn,
    .action-bar {
        display: none !important;
    }
    
    .reaction-summary {
        background: none !important;
        border: 1px solid #ccc !important;
        color: #333 !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}