/*
    Giao diện Module Cộng Đồng - XSKT
    Sử dụng màu đỏ thương hiệu và gradient hiện đại
*/

:root {
    --red-primary: #e51919;
    --red-dark: #b51515;
    --gold: #ffc107;
    --bg-light: #f8f5f0;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --bg-gray: #f2f4f7;
    --text-muted: #64748b;
}

/* GLOBAL PREMIUM SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 3px solid #f8fafc;
    background-clip: padding-box;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox support */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

@media (min-width: 769px) {
    .container {
        max-width: 1440px !important;
    }
}
/* QUICK FILTERS */
.ctdd-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.filter-chip {
    padding: 6px 14px;
    background: var(--bg-gray);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.filter-chip:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.filter-chip.active {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
    box-shadow: 0 4px 10px rgba(229, 25, 25, 0.2);
}

.community-container, .leaderboard-page, .profile-page {
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 50px;
    font-family: 'Inter', sans-serif;
}

/* MARQUEE TICKER */
.live-ticker {
    background: #000;
    color: #fff;
    padding: 8px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}
.ticker-label {
    background: var(--red-primary);
    padding: 0 15px;
    font-weight: 800;
    margin-right: 15px;
    font-size: 12px;
}
.ticker-item { margin-right: 40px; }

/* BREADCRUMB */
.comm-breadcrumb {
    padding: 15px 24px;
    font-size: 13px;
    color: #666;
}
.comm-breadcrumb a { color: var(--red-primary); text-decoration: none; }
.comm-breadcrumb span { margin: 0 8px; color: #ccc; }

/* SUBMIT SECTION */
.comm-header {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    flex-wrap: wrap;
    gap: 20px;
}
.comm-title h1 { font-size: 28px; font-weight: 900; margin: 0; }
.comm-title h1 span { color: var(--red-primary); }
.comm-title p { color: #888; margin-top: 5px; }

/* NEW PILL SUBMIT FORM */
.ctdd-user-action-card {
    background: #fff;
    padding: 15px 20px 10px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    flex: 1;
    min-width: 320px;
}
.submit-title {
    font-size: 15px;
    color: #444;
    margin-bottom: 20px;
    font-weight: 500;
}
.pill-inputs-group {
    display: flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px;
    gap: 5px;
    transition: all 0.3s;
}
.pill-inputs-group:focus-within {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(229, 25, 25, 0.1);
    background: #fff;
}
.pill-select-wrapper, .pill-input-wrapper {
    display: flex;
    align-items: center;
    padding: 0 5px;
    position: relative;
}
.pill-select-wrapper i, .pill-input-wrapper i {
    color: #94a3b8;
    font-size: 14px;
    margin-right: 5px;
}
.pill-select-wrapper {
    flex: 1.2;
    border-right: 1px solid #e2e8f0;
}
.pill-input-wrapper {
    flex: 1;
}
.pill-select-wrapper select, .pill-input-wrapper input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    padding: 10px 0;
}
.pill-submit-btn {
    background: var(--red-primary);
    color: #fff;
    border: none;
    padding: 0 10px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.pill-submit-btn:hover {
    background: var(--red-dark);
    transform: translateX(2px);
}
.pill-submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}
.pill-submit-btn.loading i {
    animation: ctdd-spin 1s linear infinite;
}
@keyframes ctdd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.submit-feedback-new {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    min-height: 20px;
}
.submit-feedback-new.success { color: #059669; }
.submit-feedback-new.error { color: #dc2626; }

@media (max-width: 640px) {
    .pill-inputs-group {
        flex-direction: column;
        border-radius: 12px;
        padding: 10px;
    }
    .pill-select-wrapper { border-right: none; border-bottom: 1px solid #e2e8f0; }
    .pill-submit-btn { width: 100%; justify-content: center; padding: 15px; margin-top: 5px; }
}

/* REGION CARDS */
.comm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 24px;
}
@media (max-width: 1024px) { .comm-grid { grid-template-columns: 1fr; } }

.region-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.region-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
    border-bottom: 2px solid #eee;
}
.region-info .name { font-weight: 900; font-size: 18px; display: block; }
.region-info .provinces { font-size: 12px; color: #888; }
.region-time { background: #eee; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.yesterday-box {
    padding: 10px 15px;
    background: #fcfcfc;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
}
.yesterday-box .label { font-size: 12px; color: #888; margin-right: 15px; }
.yesterday-box .nums .n { background: #fee; color: #c00; font-weight: 700; padding: 2px 6px; margin-right: 4px; border-radius: 4px; }

.expert-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f9f9f9;
}
.expert-row .rank { width: 25px; font-weight: 800; color: #ccc; }
.expert-row .avatar { font-size: 24px; margin-right: 12px; }
.expert-row .info { flex: 1; }
.expert-row .name { font-weight: 700; color: #333; }
.expert-row .badge { color: var(--gold); margin-left: 5px; }
.expert-row .stats { font-size: 11px; color: #888; }
.expert-row .streak { color: orange; font-weight: 600; margin-left: 5px; }
.expert-row .the-num {
    background: var(--red-primary);
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 18px;
}
.btn-like { background: none; border: none; font-size: 12px; cursor: pointer; color: #888; }


@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&display=swap');

.leaderboard-page {
    background: #f4f6fb;
    padding-bottom: 80px;
    font-family: 'Be Vietnam Pro', 'Inter', -apple-system, sans-serif;
}

.leaderboard-page .comm-breadcrumb {
    max-width: 1200px;
    margin: 0 auto 0;
    padding: 24px 24px 0;
    font-size: 13px;
    color: #a0aec0;
    font-weight: 500;
}
.leaderboard-page .comm-breadcrumb a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.leaderboard-page .comm-breadcrumb a:hover { color: #e51919; }
.leaderboard-page .comm-breadcrumb span { margin: 0 8px; color: #89898a; }
.leaderboard-page .comm-breadcrumb .current { color: #e51919; font-weight: 700; }

/* === Hero Header === */
.lb-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 48px;
    padding: 48px 20px 0;
}
.lb-header h1 {
    font-size: 38px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.15;
}
.lb-header h1 span { 
    background: linear-gradient(135deg, #e51919, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lb-header p { font-size: 15px; color: #64748b; font-weight: 400; line-height: 1.7; margin: 0; }

/* === Grid Layout === */
.lb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 1024px) { .lb-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .lb-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; } }

/* === Section Cards - Không border, dùng shadow === */
.lb-section {
    background: #fff;
    border-radius: 22px;
    padding: 28px 24px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.lb-section:hover {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
}

/* Accent icon thay cho border-top */
.lb-section .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 22px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.lb-section .title::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
.lb-section .title.monthly {
    color: #dc2626;
}
.lb-section .title.monthly::before {
    background-color: rgba(229, 25, 25, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e51919'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}
.lb-section .title.streak {
    color: #d97706;
}
.lb-section .title.streak::before {
    background-color: rgba(245, 158, 11, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d97706'%3E%3Cpath d='M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2Z'/%3E%3C/svg%3E");
}
.lb-section .title.likes {
    color: #2563eb;
}
.lb-section .title.likes::before {
    background-color: rgba(37, 99, 235, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/%3E%3C/svg%3E");
}

/* === Danh sách hàng Cao Thủ === */
.lb-list { display: flex; flex-direction: column; gap: 4px; }

.lb-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
    background: transparent;
}
.lb-row:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

/* Zebra striping cực tinh tế */
.lb-row:nth-child(even) { background: #fafbfd; }
.lb-row:nth-child(even):hover { background: #f1f5f9; transform: translateX(5px); }

/* Top 3 Glow - Không border, chỉ dùng shadow + gradient nền */
.lb-row:nth-child(1) {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(255, 236, 153, 0.04));
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(251, 191, 36, 0.15);
    margin-bottom: 4px;
}
.lb-row:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(255, 236, 153, 0.08));
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.22);
    transform: translateX(5px) scale(1.01);
}
.lb-row:nth-child(2) {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(203, 213, 225, 0.04));
    border-radius: 16px;
}
.lb-row:nth-child(3) {
    background: linear-gradient(135deg, rgba(180, 120, 60, 0.09), rgba(231, 168, 100, 0.04));
    border-radius: 16px;
    margin-bottom: 4px;
}

/* Huy hiệu Rank */
.lb-row .rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    margin-right: 14px;
    color: #94a3b8;
    background: #f1f5f9;
    flex-shrink: 0;
}
.lb-rank--1 { 
    background: linear-gradient(135deg, #fbbf24, #f97316) !important; 
    color: #fff !important; 
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45) !important; 
}
.lb-rank--2 { 
    background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important; 
    color: #fff !important; 
}
.lb-rank--3 { 
    background: linear-gradient(135deg, #b87333, #e8a87c) !important; 
    color: #fff !important; 
}

/* Avatar */
.lb-row .avatar {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    background: #f1f5f9;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    overflow: hidden;
}
.lb-row .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info block */
.lb-row .info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lb-row .info .name { 
    font-size: 14px; font-weight: 700; color: #0f172a; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.lb-row .info .label { font-size: 11px; color: #94a3b8; font-weight: 500; }

/* Score */
.lb-row .score { text-align: right; flex-shrink: 0; }
.lb-row .score .val { display: block; font-weight: 800; color: #e51919; font-size: 18px; line-height: 1.2; }
.lb-row .score .desc { font-size: 10px; color: #94a3b8; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }

/* My Rank highlighting */
.lb-my-rank {
    margin-top: 12px;
    background: #fdf2f2;
    padding: 14px 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: pfSlideUp 0.4s ease;
}
.lb-my-rank .rank {
    font-size: 14px;
    font-weight: 900;
    color: #e51919;
    background: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(229, 25, 25, 0.1);
}
.lb-my-rank .info {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    flex: 1;
    margin-left: 15px;
}
.lb-my-rank .val {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

@media (max-width: 768px) {
    .lb-header { padding-top: 32px; }
    .lb-header h1 { font-size: 26px; }
}


/* =====================================================
   PREMIUM PROFILE PAGE - Clean, No-Border Design
   ===================================================== */
.profile-page {
    background: #f7f8fc;
    padding-bottom: 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pf-container { max-width: 860px; margin: 0 auto; padding: 40px 20px 0; }

/* Header Card - Không border, dùng shadow tinh tế */
.pf-header-card {
    background: #fff;
    border-radius: 28px;
    padding: 36px 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.pf-header-card::before {
    content: '';
    position: absolute;
    right: -100px; top: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(229, 25, 25, 0.05), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pf-main-info { display: flex; align-items: center; gap: 24px; z-index: 2; flex: 1; min-width: 200px; }

.pf-avatar {
    font-size: 52px;
    width: 100px; height: 100px;
    border-radius: 30px;
    display: flex; align-items: center; justify-content: center;
    background: #f8f9fa;
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
    flex-shrink: 0;
    overflow: hidden;
}
.pf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-identity .pf-name { font-size: 28px; font-weight: 800; color: #0f172a; margin: 0 0 8px; letter-spacing: -0.5px; }
.pf-identity .pf-title {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(229, 25, 25, 0.08);
    color: var(--red-primary);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}
.pf-identity .pf-bio { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; }

/* Quick Stats - Cards không border, dùng nền xám nhạt */
.pf-quick-stats { display: flex; gap: 12px; z-index: 2; flex-wrap: wrap; }
.pf-quick-stats .stat {
    background: #f8f9fa;
    padding: 16px 22px;
    border-radius: 18px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-width: 90px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pf-quick-stats .stat:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.pf-quick-stats strong { display: block; font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 4px; transition: transform 0.2s, color 0.2s; }
.pf-quick-stats strong.pop { transform: scale(1.3); color: #e51919; }
.pf-quick-stats strong.positive { color: #16a34a; }
.pf-quick-stats strong.streak { color: #ea580c; }
.pf-quick-stats span { font-size: 10px; color: #94a3b8; text-transform: uppercase; font-weight: 700; letter-spacing: 0.8px; }

/* Actions - Nút hành động có màu accent */
.pf-actions { display: flex; gap: 10px; z-index: 2; flex-wrap: wrap; }
.btn-pf-edit, .btn-pf-follow {
    background: linear-gradient(135deg, #e51919, #ff4c4c);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: 50px;
    font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.25s; text-decoration: none;
    box-shadow: 0 4px 14px rgba(229, 25, 25, 0.3);
    display: inline-flex; align-items: center;
}
.btn-pf-edit:hover, .btn-pf-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(229, 25, 25, 0.4);
    color: #fff;
}
.btn-pf-follow.active { background: #f1f5f9; color: #64748b; box-shadow: none; }
.btn-pf-chat {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: 50px;
    font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.25s; text-decoration: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-pf-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
    color: #fff;
}
.btn-pf-repute {
    background: #f8f9fa; color: #475569;
    border: none; padding: 11px 22px;
    border-radius: 50px; font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.btn-pf-repute:hover { background: #fee2e2; color: var(--red-primary); box-shadow: 0 4px 14px rgba(229,25,25,0.1); }

/* History Section */
.pf-history-section {
    background: #fff;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0,0,0,0.04);
}
.pf-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.province-tag {
    font-size: 11px;
    background: #eff6ff; 
    color: #3b82f6; 
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 4px;
}

.pf-history-list { display: flex; flex-direction: column; gap: 6px; }

.pf-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 14px;
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}
/* Zebra stripes tinh tế */
.pf-history-row:nth-child(odd) { background: #fafbfc; }
.pf-history-row:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.pf-history-row .date { font-size: 13px; color: #94a3b8; font-weight: 500; min-width: 85px; }
.pf-history-row .region { font-size: 13px; font-weight: 700; color: #3b82f6; width: 80px; }
.pf-history-row .number { font-size: 24px; font-weight: 900; color: var(--red-primary); flex: 1; text-align: center; letter-spacing: 2px; }

/* Status badges - màu nền, không border */
.pf-history-row .status {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.pf-history-row .status.correct { background: rgba(22, 163, 74, 0.1); color: #16a34a; }
.pf-history-row .status.wrong   { background: rgba(239, 68, 68, 0.1);  color: #ef4444; }
.pf-history-row .status.pending { background: rgba(234, 179, 8, 0.1);  color: #a16207; }

.pf-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .pf-container { padding: 65px 12px 0 0; }
    .pf-header-card { 
        flex-direction: column; 
        padding: 24px 16px; 
        gap: 20px; 
        text-align: center;
        border-radius: 20px;
    }
    .pf-main-info { flex-direction: column; gap: 12px; }
    .pf-avatar { width: 80px; height: 80px; border-radius: 24px; font-size: 40px; }
    .pf-identity .pf-name { font-size: 22px; }
    
    .pf-quick-stats { 
        display: grid; 
        grid-template-columns: repeat(3, 1fr); 
        gap: 8px; 
        width: 100%;
    }
    .pf-quick-stats .stat { 
        padding: 12px 8px; 
        min-width: 0; 
        border-radius: 14px;
    }
    .pf-quick-stats strong { font-size: 16px; }
    .pf-quick-stats span { font-size: 8px; }

    .pf-actions { width: 100%; flex-direction: column; }
    .pf-actions button, .pf-actions a { width: 100%; justify-content: center; }

    .pf-history-section { padding: 20px 15px; border-radius: 20px; }
    .pf-history-row { 
        padding: 12px; 
        margin-bottom: 8px;
        background: #f8fafc !important; 
        border: 1px solid #edf2f7;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    .pf-history-row:hover { transform: none; }
    .pf-history-row .date { font-size: 11px; min-width: auto; margin-right: 10px; }
    .pf-history-row .region { font-size: 11px; width: auto; color: #4a5568; font-weight: 500; }
    .pf-history-row .number { 
        flex: 0 0 100%; 
        order: 2; 
        font-size: 20px; 
        margin: 8px 0;
        letter-spacing: 1px;
    }
    .pf-history-row .status { order: 3; padding: 4px 10px; font-size: 10px; }
    .pf-history-row .actions { order: 4; margin-left: 0; }
    .pf-identity .pf-bio { font-size: 13px; max-width: 280px; margin: 0 auto; }
    .lb-grid { grid-template-columns: 1fr; }
}

/* Modal Edit Profile */
.pf-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); align-items: center; justify-content: center;
}
.pf-modal-content {
    background: #fff; padding: 32px; border-radius: 24px; width: 90%; max-width: 450px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); animation: pfSlideUp 0.3s ease;
}
@keyframes pfSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pf-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.pf-modal-header h3 { font-size: 20px; font-weight: 800; color: #1e293b; margin: 0; }
.pf-modal-close { background: none; border: none; font-size: 24px; color: #94a3b8; cursor: pointer; }

.pf-form-group { margin-bottom: 20px; }
.pf-form-group label { display: block; font-size: 13px; font-weight: 700; color: #64748b; margin-bottom: 8px; }
.pf-form-group input, .pf-form-group textarea {
    width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid #e2e8f0; font-family: inherit; font-size: 14px; transition: 0.2s;
}
.pf-form-group input:focus { outline: none; border-color: #e51919; box-shadow: 0 0 0 3px rgba(229, 25, 25, 0.1); }
.pf-modal-footer { display: flex; gap: 12px; margin-top: 24px; }
.btn-save { flex: 1; background: #e51919; color: #fff; border: none; padding: 12px; border-radius: 50px; font-weight: 700; cursor: pointer; }
.btn-cancel { flex: 1; background: #f1f5f9; color: #64748b; border: none; padding: 12px; border-radius: 50px; font-weight: 700; cursor: pointer; }

/* Like Button in Row */
.pf-history-row .actions { display: flex; align-items: center; gap: 15px; margin-left: 20px; }
.btn-like-row {
    background: none; border: none; display: flex; align-items: center; gap: 5px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #94a3b8; transition: 0.2s;
}
.btn-like-row i { font-size: 16px; }
.btn-like-row.active { color: #e51919; }
.btn-like-row.active i { animation: pfHeartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes pfHeartPop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* === Layout Restructure Overrides === */
.ctdd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; margin-top: 0; }
@media (max-width: 991px) {
    .ctdd-grid { grid-template-columns: 1fr; }
}

.embedded-chat-wrap { height: 600px !important; }

/* Bottom Action Buttons Fixed Strict Sizes & Hovers */
.ctdd-btn-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px; /* Force strict height */
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    cursor: pointer;
}
.ctdd-btn-main {
    background: #c33129;
    color: #fff;
    border: 1px solid #c33129;
    box-shadow: 0 4px 6px rgba(195, 49, 41, 0.2);
}
.ctdd-btn-main:hover {
    background: #a5261f;
    border-color: #a5261f;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(195, 49, 41, 0.3);
}
.ctdd-btn-outline {
    background: #fff;
    color: #b45309;
    border: 1px solid #fcd34d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.ctdd-btn-outline:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(245, 158, 11, 0.2);
}
